Hi Im developing a file system filter driver which adds a metadata at the begining of the file created in a specified folder.Only a set of users should be able to read the content of the file + meta data and renaming all users should not see the metat data.I made changes to IRP_MJ_QUERT_INFORMATION, IRP_MJ_DIRECTORY_CONTROL And FastIOs so that there wont be any problem with file sizes.Im setting the Byteoffset in IRP_NOCACHE Read and Write IRPs accordingly.Im having some problems with IRP_PAGING_IO. Metadata Header size is 512 bytes. So an empty file by default is 512bytes.When i try to add content to the file using WriteFile API, In IRP_MJ_WRITE with IRP_PAGING_IO bit set it is showing a 0 bytes written???Is it that paging io cannot change the size of file?Should is use CcSetFileSizes and how exactly should I use this function??Regards,Vishnu.
>Im developing a file system filter driver which adds a metadata at the begining of the file created in a specified folder.
Not again )))
Im having some problems with IRP_PAGING_IO.
We know )))
When i try to add content to the file using WriteFile API, In IRP_MJ_WRITE with IRP_PAGING_IO bit set it is showing a 0 bytes written???
Paging IO is not similar to non-paging, i.e. MdlAddress and UserBuffer should be set appropriately. Also, paging IO has special processing on completion, i.e. MDL is not unlocked and freed.
Is it that paging io cannot change the size of file?
Yes, paging write can’t change the file size.
Should is use CcSetFileSizes and how exactly should I use this function??
No, only FSD can use it.
–
Slava Imameyev, xxxxx@hotmail.com
“vishnu chaitanya” wrote in message news:xxxxx@ntfsd…
Hi
Im developing a file system filter driver which adds a metadata at the begining of the file created in a specified folder.
Only a set of users should be able to read the content of the file + meta data and renaming all users should not see the metat data.
I made changes to IRP_MJ_QUERT_INFORMATION, IRP_MJ_DIRECTORY_CONTROL And FastIOs so that there wont be any problem with file sizes.
Im setting the Byteoffset in IRP_NOCACHE Read and Write IRPs accordingly.
Im having some problems with IRP_PAGING_IO.
Metadata Header size is 512 bytes. So an empty file by default is 512bytes.
When i try to add content to the file using WriteFile API, In IRP_MJ_WRITE with IRP_PAGING_IO bit set it is showing a 0 bytes written???
Is it that paging io cannot change the size of file?
Should is use CcSetFileSizes and how exactly should I use this function??
Regards,
Vishnu.
Looks like an old question from ages…
On 25 Apr 2007 21:18:38 -0000, “vishnu chaitanya”
wrote:
>Hi Im developing a file system filter driver which adds a metadata at the begining of the file created in a specified folder.Only a set of users should be able to read the content of the file + meta data and renaming all users should not see the metat data.I made changes to IRP_MJ_QUERT_INFORMATION, IRP_MJ_DIRECTORY_CONTROL And FastIOs so that there wont be any problem with file sizes.Im setting the Byteoffset in IRP_NOCACHE Read and Write IRPs accordingly.Im having some problems with IRP_PAGING_IO. Metadata Header size is 512 bytes. So an empty file by default is 512bytes.When i try to add content to the file using WriteFile API, In IRP_MJ_WRITE with IRP_PAGING_IO bit set it is showing a 0 bytes written???Is it that paging io cannot change the size of file?Should is use CcSetFileSizes and how exactly should I use this function??Regards,Vishnu.