[OpenAFS-devel] Re: Avoid mixed use of Win32/CRTL in the servers

Rod Widdowson rdw@steadingsoftware.com
Mon, 24 Jan 2011 17:20:49 -0000


As an update to this, I got a way through the actual changes =
vol-salvage.c and it started getting very grubby.  When the changes =
leaked into namei_ops.c I decided to take a step back.

At Jeff's urging I'm going to do an audit of the use of FILE *fp/int =
fd/FD_t fd in the entire vol package and report it back here (as new =
posting).  That should provide a better basis for review than monstrous =
changes to gerrit...

> -----Original Message-----
> From: openafs-devel-admin@openafs.org =
[mailto:openafs-devel-admin@openafs.org] On Behalf Of Rod
> Widdowson
> Sent: 19 January 2011 09:52
> To: openafs-devel@openafs.org
> Subject: RE: [OpenAFS-devel] Re: Avoid mixed use of Win32/CRTL in the =
servers
>=20
> > On Windows the C Run Time Library functions such as fopen() and =
open() are implemented using a very
> > restricted set of Win32 APIs CreateFile, ReadFile, WriteFile, =
CloseHandle, etc. and modes such that
> > not only is performance horrible but the currently documented =
functionality can't possibly work.
> For
> > example, in namei_ops.c, there are a couple of locations where it is =
stated that nt_unlink() is used
> > in order to permit a file to be marked for deletion while it is in =
use.  Since the file is in use as
> a
> > result of an fopen() or open() CRT library call, it is not possible =
to mark the file for delete on
> > close.  This is because those libraries do not call CreateFile() =
with the DELETE privilege and
> > FILE_SHARE_DELETE lock option.
>=20
> Thanks Jeff. Apologies for not being clearer...
>=20
> _______________________________________________
> OpenAFS-devel mailing list
> OpenAFS-devel@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-devel