On 1/18/2011 2:09 PM, Andrew Season wrote:
> On Tue, 18 Jan 2011 18:36:41 -0000
> "Rod Widdowson" <[email protected]> wrote:
> 
>> Mixing CRTL IO and Win32 is a recipe for disaster, and I have been
>> looking at the servers with a view to reducing this.
> 
> CRTL is... C Run-Time Lib? I suppose CRTL I/O is e.g. open() and Win32
> I/O is some CamelCase family of functions?

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.

The conversion from fopen() and open() to nt_open() and related
functions is the next step at producing a Windows file server that can
scream.

>> 1) Redirect IO through the afs_XXXX operations.  
> 
> Not OS_OPEN &co?

I do question why we have both.  In both cases the macros refer to
nt_open() on Windows.

Jeffrey Altman


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to