FileSize Changes

Hi,

I am facing a problem with filesize changes. I have to add a trailer to all the file that we encrypt.during WRITE. As i read i cant change the filesize during PAGING IO but there are no other places that seem to me where i can change the file size to reflect my addition of trailer.

I am trying this for a month now please help me out here that where i can make filesize changes to reflect the addition of trailer to the end of file.

Thanks
Suhail

You cannot modify EOF in paging IO paths.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: Suhail Ansari
To: Windows File Systems Devs Interest List
Sent: Friday, December 17, 2004 7:48 PM
Subject: [ntfsd] FileSize Changes

Hi,

I am facing a problem with filesize changes. I have to add a trailer to all the file that we encrypt.during WRITE. As i read i cant change the filesize during PAGING IO but there are no other places that seem to me where i can change the file size to reflect my addition of trailer.

I am trying this for a month now please help me out here that where i can make filesize changes to reflect the addition of trailer to the end of file.

Thanks
Suhail

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, that is my problem which i want to clear. I cant modify EOF during PAGING IO. So i have to do it somewhere else. I dont see a NON CACHED IO without PAGING IO. So according to this i have to make changes to EOF only during CACHED IO. I cant add my trailer to the data that i am writing to the cache. I have to add that during my PAGING IO but to reflect that addition of trailer i have to change the EOF as well.

I guess that is where i am stuck.

Thanks
Suhail
----- Original Message -----
From: Maxim S. Shatskih
To: Windows File Systems Devs Interest List
Sent: Friday, December 17, 2004 1:24 PM
Subject: Re: [ntfsd] FileSize Changes

You cannot modify EOF in paging IO paths.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: Suhail Ansari
To: Windows File Systems Devs Interest List
Sent: Friday, December 17, 2004 7:48 PM
Subject: [ntfsd] FileSize Changes

Hi,

I am facing a problem with filesize changes. I have to add a trailer to all the file that we encrypt.during WRITE. As i read i cant change the filesize during PAGING IO but there are no other places that seem to me where i can change the file size to reflect my addition of trailer.

I am trying this for a month now please help me out here that where i can make filesize changes to reflect the addition of trailer to the end of file.

Thanks
Suhail

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

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

Maintain the crypto header of the file in some separate database-style place, or in the registry, or in the separate file which will be hidden by your filter.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: Suhail Ansari
To: Windows File Systems Devs Interest List
Sent: Friday, December 17, 2004 11:46 PM
Subject: Re: [ntfsd] FileSize Changes

Maxim, that is my problem which i want to clear. I cant modify EOF during PAGING IO. So i have to do it somewhere else. I dont see a NON CACHED IO without PAGING IO. So according to this i have to make changes to EOF only during CACHED IO. I cant add my trailer to the data that i am writing to the cache. I have to add that during my PAGING IO but to reflect that addition of trailer i have to change the EOF as well.

I guess that is where i am stuck.

Thanks
Suhail
----- Original Message -----
From: Maxim S. Shatskih
To: Windows File Systems Devs Interest List
Sent: Friday, December 17, 2004 1:24 PM
Subject: Re: [ntfsd] FileSize Changes

You cannot modify EOF in paging IO paths.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: Suhail Ansari
To: Windows File Systems Devs Interest List
Sent: Friday, December 17, 2004 7:48 PM
Subject: [ntfsd] FileSize Changes

Hi,

I am facing a problem with filesize changes. I have to add a trailer to all the file that we encrypt.during WRITE. As i read i cant change the filesize during PAGING IO but there are no other places that seem to me where i can change the file size to reflect my addition of trailer.

I am trying this for a month now please help me out here that where i can make filesize changes to reflect the addition of trailer to the end of file.

Thanks
Suhail

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

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

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 i cant do that because the files can be exchanged on the linux box as well. If possible i would have done that . The design also adds padding to the encrypted last page so i cant work around this problem. I guess this can be done in a much easier way on linux.

So i have to add the trailer as well as padding to the file. I dont think that i can encrypt cached data. I can encrypt only data that is coming to the DISK. So if u have any suggestion for this issue please let me know. It has been almost a month trying to solve this problem but still i am not able to do it in a correct general way. All your help is really appreciated.

Thanks
Suhail
----- Original Message -----
From: Maxim S. Shatskih
To: Windows File Systems Devs Interest List
Sent: Friday, December 17, 2004 3:18 PM
Subject: Re: [ntfsd] FileSize Changes

Maintain the crypto header of the file in some separate database-style place, or in the registry, or in the separate file which will be hidden by your filter.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: Suhail Ansari
To: Windows File Systems Devs Interest List
Sent: Friday, December 17, 2004 11:46 PM
Subject: Re: [ntfsd] FileSize Changes

Maxim, that is my problem which i want to clear. I cant modify EOF during PAGING IO. So i have to do it somewhere else. I dont see a NON CACHED IO without PAGING IO. So according to this i have to make changes to EOF only during CACHED IO. I cant add my trailer to the data that i am writing to the cache. I have to add that during my PAGING IO but to reflect that addition of trailer i have to change the EOF as well.

I guess that is where i am stuck.

Thanks
Suhail
----- Original Message -----
From: Maxim S. Shatskih
To: Windows File Systems Devs Interest List
Sent: Friday, December 17, 2004 1:24 PM
Subject: Re: [ntfsd] FileSize Changes

You cannot modify EOF in paging IO paths.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: Suhail Ansari
To: Windows File Systems Devs Interest List
Sent: Friday, December 17, 2004 7:48 PM
Subject: [ntfsd] FileSize Changes

Hi,

I am facing a problem with filesize changes. I have to add a trailer to all the file that we encrypt.during WRITE. As i read i cant change the filesize during PAGING IO but there are no other places that seem to me where i can change the file size to reflect my addition of trailer.

I am trying this for a month now please help me out here that where i can make filesize changes to reflect the addition of trailer to the end of file.

Thanks
Suhail

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

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

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

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

Use Counter mode of encryption. You dont need to make any file sizes
especially for padding and can access the byte stream easily.


Regards
Rakesh

“Suhail Ansari” wrote in message
news:xxxxx@ntfsd…
Maxim i cant do that because the files can be exchanged on the linux box as
well. If possible i would have done that . The design also adds padding to
the encrypted last page so i cant work around this problem. I guess this can
be done in a much easier way on linux.

So i have to add the trailer as well as padding to the file. I dont think
that i can encrypt cached data. I can encrypt only data that is coming to
the DISK. So if u have any suggestion for this issue please let me know. It
has been almost a month trying to solve this problem but still i am not able
to do it in a correct general way. All your help is really appreciated.

Thanks
Suhail
----- Original Message -----
From: Maxim S. Shatskih
To: Windows File Systems Devs Interest List
Sent: Friday, December 17, 2004 3:18 PM
Subject: Re: [ntfsd] FileSize Changes

Maintain the crypto header of the file in some separate database-style
place, or in the registry, or in the separate file which will be hidden by
your filter.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: Suhail Ansari
To: Windows File Systems Devs Interest List
Sent: Friday, December 17, 2004 11:46 PM
Subject: Re: [ntfsd] FileSize Changes

Maxim, that is my problem which i want to clear. I cant modify EOF during
PAGING IO. So i have to do it somewhere else. I dont see a NON CACHED IO
without PAGING IO. So according to this i have to make changes to EOF only
during CACHED IO. I cant add my trailer to the data that i am writing to the
cache. I have to add that during my PAGING IO but to reflect that addition
of trailer i have to change the EOF as well.

I guess that is where i am stuck.

Thanks
Suhail
----- Original Message -----
From: Maxim S. Shatskih
To: Windows File Systems Devs Interest List
Sent: Friday, December 17, 2004 1:24 PM
Subject: Re: [ntfsd] FileSize Changes

You cannot modify EOF in paging IO paths.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: Suhail Ansari
To: Windows File Systems Devs Interest List
Sent: Friday, December 17, 2004 7:48 PM
Subject: [ntfsd] FileSize Changes

Hi,

I am facing a problem with filesize changes. I have to add a trailer to all
the file that we encrypt.during WRITE. As i read i cant change the filesize
during PAGING IO but there are no other places that seem to me where i can
change the file size to reflect my addition of trailer.

I am trying this for a month now please help me out here that where i can
make filesize changes to reflect the addition of trailer to the end of file.

Thanks
Suhail

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

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

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

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

> Maintain the crypto header of the file in some separate database-style place,

or in the registry, or in the separate file > which will be hidden by your filter.

This solution has many negative effects, which will appear later
after the encryption driver development is complete.

It is difficult to keep the information in that database up-to-date,
especially if you will start to play with removable media (copy something
to removable media, move to another computer, delete some file)
or network media (the file can be moved on the server).

You can never prevent end user from doing that, which will
result in never-ending questions to hotline.

I dont think that i can encrypt cached data.

You think right :-). Remember that there are also
applications that don’t use cached read at all,
(they use memory mapped files). Even more,
if you want to encrypt EXE file, it is mapped to
the memory too, so if you keep encrypted data in the cache,
you will not able to run encrypted EXEs.

I cant modify EOF during PAGING IO.

Yes, but you can do it when IRP_MJ_SET_INFORMATION
sets the file size.

L.

Hi Ladislav,

As i understood, IRP_MJ_SET_INFORMATION is only useful when intercepted when paging IO is not set. But there are some application that i see (like wordpad when writing RTF file) not issuing this type of set info. I guess the cache takes care of the size there. I do see a SET INFO with Paging IO though. So here the problem stays where to change the EOF in a general way.

Thanks
Suhail
----- Original Message -----
From: Ladislav Zezula
To: Windows File Systems Devs Interest List
Sent: Monday, December 20, 2004 2:27 AM
Subject: Re: [ntfsd] FileSize Changes

Maintain the crypto header of the file in some separate database-style place,
> or in the registry, or in the separate file > which will be hidden by your filter.

This solution has many negative effects, which will appear later
after the encryption driver development is complete.

It is difficult to keep the information in that database up-to-date,
especially if you will start to play with removable media (copy something
to removable media, move to another computer, delete some file)
or network media (the file can be moved on the server).

You can never prevent end user from doing that, which will
result in never-ending questions to hotline.

I dont think that i can encrypt cached data.

You think right :-). Remember that there are also
applications that don’t use cached read at all,
(they use memory mapped files). Even more,
if you want to encrypt EXE file, it is mapped to
the memory too, so if you keep encrypted data in the cache,
you will not able to run encrypted EXEs.

I cant modify EOF during PAGING IO.

Yes, but you can do it when IRP_MJ_SET_INFORMATION
sets the file size.

L.


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

You must intercept non-paging I/O too and ensure that when
the paging I/O comes, then the size will be set.

L.

Hi Ladislav,

So u mean that i should send my own SET INFO when i receive a NON PAGING IO Write. Because that only seems a thing that i can do because i dont receive any SET INFO(NON PAGING IO). I only receive a SET INFO(PAGING IO) after i receive a (PAGING IO) Write.

Thanks
Suhail
----- Original Message -----
From: Ladislav Zezula
To: Windows File Systems Devs Interest List
Sent: Tuesday, December 21, 2004 2:58 AM
Subject: Re: [ntfsd] FileSize Changes

You must intercept non-paging I/O too and ensure that when
the paging I/O comes, then the size will be set.

L.


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

Paging I/O does not extend the size of the file. Even when you get a
set info from the cache manager it turns out the file systems don’t
really DO anything with it.

This is because the memory mapping APIs exposed to user mode do not
support file size extension; the cache manager has a private internal
API for extending it, but only does so when the file system asks it to
extend the size (via CcSetFileSizes) and thus you would have already
seen the file size extension.

Thus, you should only worry about set information calls that are not
from the cache manager (IRP_PAGING_IO bit is set, AdvanceOnly is TRUE).

Of course, like all observed behavior, this is subject to change -
particularly in the Longhorn timeframe.

Regards,

Tony

Tony Mason

Consulting Partner

OSR Open Systems Resources, Inc.

http://www.osr.com

Looking forward to seeing you at the Next OSR File Systems Class April
4, 2004 in Boston!


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Suhail Ansari
Sent: Tuesday, December 21, 2004 11:55 AM
To: ntfsd redirect
Subject: Re: [ntfsd] FileSize Changes

Hi Ladislav,

So u mean that i should send my own SET INFO when i receive a NON PAGING
IO Write. Because that only seems a thing that i can do because i dont
receive any SET INFO(NON PAGING IO). I only receive a SET INFO(PAGING
IO) after i receive a (PAGING IO) Write.

Thanks

Suhail

----- Original Message -----

From: Ladislav Zezula mailto:xxxxx

To: Windows File Systems Devs Interest List
mailto:xxxxx

Sent: Tuesday, December 21, 2004 2:58 AM

Subject: Re: [ntfsd] FileSize Changes

You must intercept non-paging I/O too and ensure that when

the paging I/O comes, then the size will be set.

L.


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@listsosr.com mailto:xxxxx


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</mailto:xxxxx></mailto:xxxxx></mailto:xxxxx>

Hi Tony,

I understand this part. But i have one confusion in mind that i want to clear. Does all the write generates set information calls. If yes then i can intercept and change the file size accordingly but if not then there has to be some other place where i have to change.

Thanks
Suhail
----- Original Message -----
From: Tony Mason
To: Windows File Systems Devs Interest List
Sent: Tuesday, December 21, 2004 11:20 AM
Subject: RE: [ntfsd] FileSize Changes

Paging I/O does not extend the size of the file. Even when you get a set info from the cache manager it turns out the file systems don’t really DO anything with it.

This is because the memory mapping APIs exposed to user mode do not support file size extension; the cache manager has a private internal API for extending it, but only does so when the file system asks it to extend the size (via CcSetFileSizes) and thus you would have already seen the file size extension.

Thus, you should only worry about set information calls that are not from the cache manager (IRP_PAGING_IO bit is set, AdvanceOnly is TRUE).

Of course, like all observed behavior, this is subject to change - particularly in the Longhorn timeframe.

Regards,

Tony

Tony Mason

Consulting Partner

OSR Open Systems Resources, Inc.

http://www.osr.com

Looking forward to seeing you at the Next OSR File Systems Class April 4, 2004 in Boston!


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Suhail Ansari
Sent: Tuesday, December 21, 2004 11:55 AM
To: ntfsd redirect
Subject: Re: [ntfsd] FileSize Changes

Hi Ladislav,

So u mean that i should send my own SET INFO when i receive a NON PAGING IO Write. Because that only seems a thing that i can do because i dont receive any SET INFO(NON PAGING IO). I only receive a SET INFO(PAGING IO) after i receive a (PAGING IO) Write.

Thanks

Suhail

----- Original Message -----

From: Ladislav Zezula

To: Windows File Systems Devs Interest List

Sent: Tuesday, December 21, 2004 2:58 AM

Subject: Re: [ntfsd] FileSize Changes

You must intercept non-paging I/O too and ensure that when

the paging I/O comes, then the size will be set.

L.


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@listsosr.com


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


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

User mode writes do not generate set information calls. An application
MAY change file sizes explicitly, but a write at, or past, EOF will
extend the file implicitly. MM does not extend the file via write
operations, however.

Regards,

Tony

Tony Mason

Consulting Partner

OSR Open Systems Resources, Inc.

http://www.osr.com

Looking forward to seeing you at the Next OSR File Systems Class April
4, 2004 in Boston!


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Suhail Ansari
Sent: Tuesday, December 21, 2004 12:33 PM
To: ntfsd redirect
Subject: Re: [ntfsd] FileSize Changes

Hi Tony,

I understand this part. But i have one confusion in mind that i want to
clear. Does all the write generates set information calls. If yes then i
can intercept and change the file size accordingly but if not then there
has to be some other place where i have to change.

Thanks

Suhail

----- Original Message -----

From: Tony Mason mailto:xxxxx

To: Windows File Systems Devs Interest List
mailto:xxxxx

Sent: Tuesday, December 21, 2004 11:20 AM

Subject: RE: [ntfsd] FileSize Changes

Paging I/O does not extend the size of the file. Even when you
get a set info from the cache manager it turns out the file systems
don’t really DO anything with it.

This is because the memory mapping APIs exposed to user mode do
not support file size extension; the cache manager has a private
internal API for extending it, but only does so when the file system
asks it to extend the size (via CcSetFileSizes) and thus you would have
already seen the file size extension.

Thus, you should only worry about set information calls that are
not from the cache manager (IRP_PAGING_IO bit is set, AdvanceOnly is
TRUE).

Of course, like all observed behavior, this is subject to change
- particularly in the Longhorn timeframe.

Regards,

Tony

Tony Mason

Consulting Partner

OSR Open Systems Resources, Inc.

http://www.osr.com

Looking forward to seeing you at the Next OSR File Systems Class
April 4, 2004 in Boston!

________________________________

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Suhail Ansari
Sent: Tuesday, December 21, 2004 11:55 AM
To: ntfsd redirect
Subject: Re: [ntfsd] FileSize Changes

Hi Ladislav,

So u mean that i should send my own SET INFO when i receive a
NON PAGING IO Write. Because that only seems a thing that i can do
because i dont receive any SET INFO(NON PAGING IO). I only receive a SET
INFO(PAGING IO) after i receive a (PAGING IO) Write.

Thanks

Suhail

----- Original Message -----

From: Ladislav Zezula mailto:xxxxx

To: Windows File Systems Devs Interest List
mailto:xxxxx

Sent: Tuesday, December 21, 2004 2:58 AM

Subject: Re: [ntfsd] FileSize Changes

You must intercept non-paging I/O too and ensure that
when

the paging I/O comes, then the size will be set.

L.


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@listsosr.com mailto:xxxxx


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


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


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</mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx>

Hi Tony,

So basically as i understood which i think i am right is that i have to change EOF at two places.

  1. In IRP_MJ_SET_INFORMATION when it is not coming from cache manager.
  2. During Cached Write i.e. Write (NON PAGING IO).

Thanks
Suhail
----- Original Message -----
From: Tony Mason
To: Windows File Systems Devs Interest List
Sent: Tuesday, December 21, 2004 11:51 AM
Subject: RE: [ntfsd] FileSize Changes

User mode writes do not generate set information calls. An application MAY change file sizes explicitly, but a write at, or past, EOF will extend the file implicitly. MM does not extend the file via write operations, however.

Regards,

Tony

Tony Mason

Consulting Partner

OSR Open Systems Resources, Inc.

http://www.osr.com

Looking forward to seeing you at the Next OSR File Systems Class April 4, 2004 in Boston!


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Suhail Ansari
Sent: Tuesday, December 21, 2004 12:33 PM
To: ntfsd redirect
Subject: Re: [ntfsd] FileSize Changes

Hi Tony,

I understand this part. But i have one confusion in mind that i want to clear. Does all the write generates set information calls. If yes then i can intercept and change the file size accordingly but if not then there has to be some other place where i have to change.

Thanks

Suhail

----- Original Message -----

From: Tony Mason

To: Windows File Systems Devs Interest List

Sent: Tuesday, December 21, 2004 11:20 AM

Subject: RE: [ntfsd] FileSize Changes

Paging I/O does not extend the size of the file. Even when you get a set info from the cache manager it turns out the file systems don’t really DO anything with it.

This is because the memory mapping APIs exposed to user mode do not support file size extension; the cache manager has a private internal API for extending it, but only does so when the file system asks it to extend the size (via CcSetFileSizes) and thus you would have already seen the file size extension.

Thus, you should only worry about set information calls that are not from the cache manager (IRP_PAGING_IO bit is set, AdvanceOnly is TRUE).

Of course, like all observed behavior, this is subject to change - particularly in the Longhorn timeframe.

Regards,

Tony

Tony Mason

Consulting Partner

OSR Open Systems Resources, Inc.

http://www.osr.com

Looking forward to seeing you at the Next OSR File Systems Class April 4, 2004 in Boston!


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Suhail Ansari
Sent: Tuesday, December 21, 2004 11:55 AM
To: ntfsd redirect
Subject: Re: [ntfsd] FileSize Changes

Hi Ladislav,

So u mean that i should send my own SET INFO when i receive a NON PAGING IO Write. Because that only seems a thing that i can do because i dont receive any SET INFO(NON PAGING IO). I only receive a SET INFO(PAGING IO) after i receive a (PAGING IO) Write.

Thanks

Suhail

----- Original Message -----

From: Ladislav Zezula

To: Windows File Systems Devs Interest List

Sent: Tuesday, December 21, 2004 2:58 AM

Subject: Re: [ntfsd] FileSize Changes

You must intercept non-paging I/O too and ensure that when

the paging I/O comes, then the size will be set.

L.


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@listsosr.com


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


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


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


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

Hi Sunil,

(2) should be from any IRP_MJ_WRITE that does not set the IRP_PAGING_IO
bit. This includes both cached and non-cached write operations.

Regards,

Tony

Tony Mason

Consulting Partner

OSR Open Systems Resources, Inc.

http://www.osr.com http:</http:>


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Suhail Ansari
Sent: Tuesday, December 21, 2004 5:37 PM
To: ntfsd redirect
Subject: Re: [ntfsd] FileSize Changes

Hi Tony,

So basically as i understood which i think i am right is that i have to
change EOF at two places.

  1. In IRP_MJ_SET_INFORMATION when it is not coming from cache manager.

  2. During Cached Write i.e. Write (NON PAGING IO).

Thanks

Suhail

----- Original Message -----

From: Tony Mason mailto:xxxxx

To: Windows File Systems Devs Interest List
mailto:xxxxx

Sent: Tuesday, December 21, 2004 11:51 AM

Subject: RE: [ntfsd] FileSize Changes

User mode writes do not generate set information calls. An
application MAY change file sizes explicitly, but a write at, or past,
EOF will extend the file implicitly. MM does not extend the file via
write operations, however.

Regards,

Tony

Tony Mason

Consulting Partner

OSR Open Systems Resources, Inc.

http://www.osr.com

Looking forward to seeing you at the Next OSR File Systems Class
April 4, 2004 in Boston!



From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Suhail Ansari
Sent: Tuesday, December 21, 2004 12:33 PM
To: ntfsd redirect
Subject: Re: [ntfsd] FileSize Changes

Hi Tony,

I understand this part. But i have one confusion in mind that i
want to clear. Does all the write generates set information calls. If
yes then i can intercept and change the file size accordingly but if not
then there has to be some other place where i have to change.

Thanks

Suhail

----- Original Message -----

From: Tony Mason mailto:xxxxx

To: Windows File Systems Devs Interest List
mailto:xxxxx

Sent: Tuesday, December 21, 2004 11:20 AM

Subject: RE: [ntfsd] FileSize Changes

Paging I/O does not extend the size of the file. Even
when you get a set info from the cache manager it turns out the file
systems don’t really DO anything with it.

This is because the memory mapping APIs exposed to user
mode do not support file size extension; the cache manager has a private
internal API for extending it, but only does so when the file system
asks it to extend the size (via CcSetFileSizes) and thus you would have
already seen the file size extension.

Thus, you should only worry about set information calls
that are not from the cache manager (IRP_PAGING_IO bit is set,
AdvanceOnly is TRUE).

Of course, like all observed behavior, this is subject
to change - particularly in the Longhorn timeframe.

Regards,

Tony

Tony Mason

Consulting Partner

OSR Open Systems Resources, Inc.

http://www.osr.com

Looking forward to seeing you at the Next OSR File
Systems Class April 4, 2004 in Boston!



From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Suhail Ansari
Sent: Tuesday, December 21, 2004 11:55 AM
To: ntfsd redirect
Subject: Re: [ntfsd] FileSize Changes

Hi Ladislav,

So u mean that i should send my own SET INFO when i
receive a NON PAGING IO Write. Because that only seems a thing that i
can do because i dont receive any SET INFO(NON PAGING IO). I only
receive a SET INFO(PAGING IO) after i receive a (PAGING IO) Write.

Thanks

Suhail

----- Original Message -----

From: Ladislav Zezula mailto:xxxxx

To: Windows File Systems Devs Interest List
mailto:xxxxx

Sent: Tuesday, December 21, 2004 2:58 AM

Subject: Re: [ntfsd] FileSize Changes

You must intercept non-paging I/O too and ensure
that when

the paging I/O comes, then the size will be set.

L.


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@listsosr.com mailto:xxxxx


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


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


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


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


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</mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx>

> So u mean that i should send my own SET INFO when

i receive a NON PAGING IO Write.

Yes. You must do this on every non-paging-IO write
that exceeds the current file size.

L.