EndOfFile manipulation.

Hello!
I wanted to know how does the FSD handle a request of setting the end of file to a new offset which is greater than the old one…
Suppose and application opens a file with EOF at O1, and sets its end of file to Offset O2, where O2 > O1. It does not write anything to the file and simply closes the handle.

I want to know the sequence & processing of IRPs in 2 scenarios:

  1. An application opens the file in cached mode.
  2. An application opens the file in non cached mode.

Additionally, i want to know the following:
What kind of calls will i see in my mini filter?
What role does the cache manager plays in it?
Does the FSD zeroes out the space between the old EOF and new EOF… or does it contain junk data?

Thanks in advance!

When I read your post, an issue of NT Insider comes into my mind…where
“Peter Pontificates”: Wanted, Engineering Discipline.
So, why don’t you answer these questions yourself by writing a short
testset? And don’t forget to tell us the results.

wrote news:xxxxx@ntfsd…
> Hello!
> I wanted to know how does the FSD handle a request of setting the end of
> file to a new offset which is greater than the old one…
> Suppose and application opens a file with EOF at O1, and sets its end of
> file to Offset O2, where O2 > O1. It does not write anything to the file
> and simply closes the handle.
>
> I want to know the sequence & processing of IRPs in 2 scenarios:
>
> 1. An application opens the file in cached mode.
> 2. An application opens the file in non cached mode.
>
> Additionally, i want to know the following:
> What kind of calls will i see in my mini filter?
> What role does the cache manager plays in it?
> Does the FSD zeroes out the space between the old EOF and new EOF… or
> does it contain junk data?
>
>
> Thanks in advance!
>

Try to reverse-engineer the FsRtlCopyWrite routine, it does this
manipulation.

Also the write paths of FASTFAT sample can be useful.


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

wrote in message news:xxxxx@ntfsd…
> Hello!
> I wanted to know how does the FSD handle a request of setting the end of file
to a new offset which is greater than the old one…
> Suppose and application opens a file with EOF at O1, and sets its end of file
to Offset O2, where O2 > O1. It does not write anything to the file and simply
closes the handle.
>
> I want to know the sequence & processing of IRPs in 2 scenarios:
>
> 1. An application opens the file in cached mode.
> 2. An application opens the file in non cached mode.
>
> Additionally, i want to know the following:
> What kind of calls will i see in my mini filter?
> What role does the cache manager plays in it?
> Does the FSD zeroes out the space between the old EOF and new EOF… or does
it contain junk data?
>
>
> Thanks in advance!
>