By the way, I believe it is the TRUNCATE_EXISTING parameter to WIN32’s
CreateFile API that results in the behavior of specifying an AllocationSize of zero
to NtCreateFile.
-----Original Message-----
From: Fuller, Rob
Sent: Friday, September 27, 2002 11:16 AM
To: ‘File Systems Developers’
Subject: RE: [ntfsd] Re: When is a IRP_MJ_SET_INFORMATION request issued?
You would think AllocationSize is a logical way to implement this.
As it turns out, the behavior of setting FileAllocationInformation or specifying
the AllocationSize parameter to XxCreateFile is inconsistent between FASTFAT
and NTFS, particularly in the case where it is used as a mechanism
to reduce the size of the file. Curiously though, setting the AllocationSize
to zero does work consistently on both file systems, and is used by some
programs to truncate files. However, outside of this special case, I’ve never
seen AllocationSize used by any component, Microsoft or otherwise, in any other
fashion. Perhaps this is the reason WIN32’s CopyFile API sets FileEndOfFileInformation
instead of relying on the AllocationSize mechanism of XxCreateFile.
-----Original Message-----
From: Bill Todd [mailto:xxxxx@metrocast.net]
Sent: Tuesday, September 24, 2002 2:54 AM
To: File Systems Developers
Subject: [ntfsd] Re: When is a IRP_MJ_SET_INFORMATION request issued?
Apologies for a pure curiosity question, but I thought that I remembered
that the NT native interface allowed one to express the desired size of a
file during the NtCreateFile (or ZwCreateFile) operation (which, if so, I’d
expect to be the mechanism used by, e.g., CopyFile to pre-set the output
file size without zero-filling it). And it’s not clear to me (any more,
anyway - I may just have forgotten this detail) why the absence of valid
data length support (e.g., in FASTFAT) would inhibit the use of such a
preallocation mechanism, as long as EOF were kept from getting ahead of the
sequentially-copied data.
Thanks,
----- Original Message -----
From: “Fuller, Rob”
To: “File Systems Developers”
Sent: Monday, September 23, 2002 11:40 AM
Subject: [ntfsd] Re: When is a IRP_MJ_SET_INFORMATION request issued?
Certainly in the case of FASTFAT whose on-disk structure doesn’t support the
notion of valid data length, I have observed this wasteful paging behavior
in my filters. In spite of this, setting the end of file before writing the
file’s contents has a clear advantage in that the file is less likely to be
fragmented if its disk space is allocated all at once instead of piecemeal.
-----Original Message-----
From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
Sent: Sunday, September 22, 2002 8:23 AM
To: File Systems Developers
Subject: [ntfsd] Re: When is a IRP_MJ_SET_INFORMATION request issued?
Doubts. Setting the EOF will trigger CcZeroData, and the same disk
blocks will be written twice - first with zeroes, then with real data.
I don’t think the OS will do such a disk bandwidth waste.
Max
----- Original Message -----
From: “Greg Pearce”
To: “File Systems Developers”
Sent: Saturday, September 21, 2002 8:31 AM
Subject: [ntfsd] Re: When is a IRP_MJ_SET_INFORMATION request issued?
> I’m a newbie, so dont believe me, but when a copy operation is
happening,
> I think if the OS “knows” how big the output file is, it will to set
EOF
> before any writes, to ensure available disk space. Also, it happens
if
> the user program explicitly sets EOF. CC Does it according to the
> previous comments in this thread.
>
> gap
>
> —
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to %%email.unsub%%
>
—
You are currently subscribed to ntfsd as: xxxxx@inin.com
To unsubscribe send a blank email to %%email.unsub%%
—
You are currently subscribed to ntfsd as: xxxxx@metrocast.net
To unsubscribe send a blank email to %%email.unsub%%
—
You are currently subscribed to ntfsd as: xxxxx@inin.com
To unsubscribe send a blank email to %%email.unsub%%