Information about FsContext

Hi all
Does anybody can tell me the exact purpose of FsContect in
FileObject? Actually i am beginner in developing File System driver. So if
anybody is having any resources regarding this then please let me know.
Thanks in advance

Regards
Saurav

If you are able to read the Nagar book that will help you a lot. The samples
code and documentation in WDK/IFS are also very useful.

In the file systems space FileObject->FsContext points to a File Control
Block (FCB) [also from time ot time called a Stream Control Block (SCB)]
which is a piece of data about the file [stream] common to all file objects
for the same file [stream] that belongs to the file system.

“Saurav Gupta” wrote in message news:xxxxx@ntfsd…
Hi all
Does anybody can tell me the exact purpose of FsContect in
FileObject? Actually i am beginner in developing File System driver. So if
anybody is having any resources regarding this then please let me know.
Thanks in advance

Regards
Saurav

It points to FSRTL_COMMON_FCB_HEADER structure, which contains the file
size values and 2 ERESOURCE locks and is used for memory mapped files and
caching.
Note that usually this “common FCB header” is a part of the larger
FS-defined FCB structure, which is 1-per-disk-file, several opens of the same
disk file will result to several file objects and only 1 FCB, your FSD must
handle this.
The ->FsContext field, so, links the file object to the FCB.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Saurav Gupta”
To: “Windows File Systems Devs Interest List”
Sent: Friday, February 24, 2006 1:24 PM
Subject: [ntfsd] Information about FsContext

Hi all
Does anybody can tell me the exact purpose of FsContect in
FileObject? Actually i am beginner in developing File System driver. So if
anybody is having any resources regarding this then please let me know.
Thanks in advance

Regards
Saurav


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Maxim S. Shatskih wrote:

It points to FSRTL_COMMON_FCB_HEADER structure, which contains the file
size values and 2 ERESOURCE locks and is used for memory mapped files and
caching.
Note that usually this “common FCB header” is a part of the larger
FS-defined FCB structure, which is 1-per-disk-file, several opens of the same
disk file will result to several file objects and only 1 FCB, your FSD must
handle this.
The ->FsContext field, so, links the file object to the FCB.

If I may, I have a question, in which case should you hold a the
ERESOURCE locks?

Edouard

Edouard, I think you should find your answer in the Nagar book. :slight_smile:

“Edouard A.” wrote in message
news:xxxxx@ntfsd…
> Maxim S. Shatskih wrote:
>> It points to FSRTL_COMMON_FCB_HEADER structure, which contains the
>> file
>> size values and 2 ERESOURCE locks and is used for memory mapped files and
>> caching.
>> Note that usually this “common FCB header” is a part of the larger
>> FS-defined FCB structure, which is 1-per-disk-file, several opens of the
>> same
>> disk file will result to several file objects and only 1 FCB, your FSD
>> must
>> handle this.
>> The ->FsContext field, so, links the file object to the FCB.
>
> If I may, I have a question, in which case should you hold a the
> ERESOURCE locks?
>
> –
>
> Edouard
>
>

> If I may, I have a question, in which case should you hold a the

ERESOURCE locks?

This is the most complex thing with the FSDs :slight_smile: study the FASTFAT source to
get some idea. In short - these locks guard the file sizes.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

Lyndon J. Clarke wrote:

Edouard, I think you should find your answer in the Nagar book. :slight_smile:

gr8 I have it. :slight_smile:

Edouard