It will never be OK to acquire a filesystem’s resources on its behalf.
Valid data length is synchronized going by the main resource. Truncation
requires both the main and paging io resources, the idea being that any
number of paging io’s can be outstanding UNLESS the file is being
truncated. If that didn’t happen we could race a paging IO with clusters
being reallocated to other files.
-----Original Message-----
From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
Sent: Friday, June 16, 2000 3:38 PM
To: File Systems Developers
Subject: [ntfsd] RE: very stuck with a bug - very long and involved
RE: [ntfsd] RE: very stuck with a bug - very long and involvedBTW,
Daniel,
is there any document from MS on how to use FCB resources
(except FASTFAT source, surely)?
Is there any MS’s guidelines for FSD writers on locking?
For instance - is it OK to acquire PagingIoResource shared on page reads
and advance valid data length without acquiring PagingIoResource and
thus
possibly with a collision with page read in progress? Looks like FASTFAT
does so (incrementing valid data length - MainResource exclusively,
truncating valid data length - both PagingIoResource and MainResource
exclusively. Looks like this is the only place in FASTFAT where
PagingIoResource is taken exclusively).
Am I right that the idea is that PagingIoResource must be used only for
truncations?
Max
----- Original Message -----
From: Daniel Lovinger
To: File Systems Developers
Sent: Friday, June 16, 2000 9:14 PM
Subject: [ntfsd] RE: very stuck with a bug - very long and involved
Acquring the resource works only because it happens to be the one FAT
uses
on that path. Other FS may require more/different synchronization.
Reaching
in and grabbing sychronization resources by hand is never going to be
the
right thing to do.
-----Original Message-----
From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
Sent: Friday, June 16, 2000 8:43 AM
To: File Systems Developers
Subject: [ntfsd] RE: very stuck with a bug - very long and involved
RE: [ntfsd] RE: very stuck with a bug - very long and involved>Please,
no
one implement/ship the one that pre-acquires the resource. This
will not be correct for general filesystems.
What if the caller will also set TopLevelIrp to FSP_TOP_LEVEL_IRP?
Will it still be wrong? Looks like Mm does exactly this when requesting
file
growth from CreateFileMapping/NtCreateSection.
Max
You are currently subscribed to ntfsd as: xxxxx@exchange.microsoft.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)
You are currently subscribed to ntfsd as: xxxxx@exchange.microsoft.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)