Joseph,
Below are the answers to your questions from the Redirector team:
A.) Doesn’t this need a lock, or did rdbss already take the
lock for me?
RDBSS will acquire the lock exclusive for you.
B.) Should I also set FileSize and/or ValidDataLength or
is rdbss doing this for me as well?
For each of the set-information calls, RDBSS will do the default thing.
For example for SetAllocationInfo, RDBSS will set the AllocationInfo on
the FCB before calling into nulmrx. It will also adjust the file size
and the valid data length if necessary.
The mini-rdr should in general only bother about performing the required
action on the wire. Of course it has the choice to override the changes
which RDBSS made with its own values. (For example - in SetEndOfFile,
RDBSS will set the filesize and adjust the allocation size to be equal
to the file size. The clever mini-rdr might chose to bump up the
allocation size before returning.
C.) What about in the routines NulMRxExtendFile()
and NulMRxTruncateFile() ? Do they need to update
these fields, and do they need a lock to do so?
All necessary locks are acquired by RDBSS before it calls the mini-rdr.
Neal Christiansen
Microsoft File System Filter Group Lead
This posting is provided “AS IS” with no warranties, and confers no
rights
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Joseph Galbraith
Sent: Friday, August 27, 2004 8:33 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] NulMrx changing capFcb->Header.AllocationSize w/o a
lock?
I’ve started my redirector based on Nul Mrx…
In fileinfo.c, in the NulMRxSetFileInformation() function,
in the processing of FileEndOfFileInformation case,
I see the following code:
//
// Change the file allocation
//
capFcb->Header.AllocationSize.QuadPart = NewAllocationSize.QuadPart;
in the extend case only (this is @ line 482 in the wnet version
from the filter manager beta, but the code is in the previous
versions of the IFS and in the wxp trees as well.)
My questions are:
A.) Doesn’t this need a lock, or did rdbss already take the
lock for me?
B.) Should I also set FileSize and/or ValidDataLength or
is rdbss doing this for me as well?
C.) What about in the routines NulMRxExtendFile()
and NulMRxTruncateFile() ? Do they need to update
these fields, and do they need a lock to do so?
I did look at the smb sample as well, but couldn’t find
where it takes locks or updates these field either,
which makes me suspect that I don’t need to do, but
I’m hoping someone with a little more experience can
confirm and say yes, and this is why.
On the other hand, I’m not very familiar with the SMB
sample, and it is quite complex to follow, so I may
have missed where it did so.
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com