MetadataManager bug?

Hi,

FmmCreate() is declared as PAGED_CODE. Isn´t a bug to fault a code page
during paging file creation?.

Also in FmmPostCreate()->FmmTargetIsVolume() routine,
Cbd->Iopb->TargetFileObject is referenced. This seems to be done in case of
(Cbd->IoStatus.Status < 0).

My last doubt is whether FLTFL_OPERATION_REGISTRATION_SKIP_PAGING_IO has any
meaning for IRP differents than IRP_MJ_READ/WRITE, as this flag is present
in all the callbacks registered by the metadatamanager sample.

Thanks,
mK


Express yourself instantly with MSN Messenger! Download today it’s FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

Misha,

It is fine to have your create routine in PAGED code even when creating a paging file. Remember, you are not doing any paging IO on it at this time.

The call to FmmTargetIsVolume is safe even if the create fails. This is because the file object is allocated by the IO Manager and is still valid. The flag it is testing (FO_VOLUME_OPEN) is set before your minifilter is called on pre-create and is not touched by the file system so it will still be valid in post-create even on a failure.

There are other operations besides read/write which can have the PAGING_IO flag set (query file information for one). It may be unnecessary for other operations but there is certainly no harm in setting it on all operations.

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 Misha Karpin
Sent: Tuesday, February 22, 2005 8:21 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] MetadataManager bug?

Hi,

FmmCreate() is declared as PAGED_CODE. Isn?t a bug to fault a code page
during paging file creation?.

Also in FmmPostCreate()->FmmTargetIsVolume() routine,
Cbd->Iopb->TargetFileObject is referenced. This seems to be done in case of
(Cbd->IoStatus.Status < 0).

My last doubt is whether FLTFL_OPERATION_REGISTRATION_SKIP_PAGING_IO has any
meaning for IRP differents than IRP_MJ_READ/WRITE, as this flag is present
in all the callbacks registered by the metadatamanager sample.

Thanks,
mK


Express yourself instantly with MSN Messenger! Download today it’s FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


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

Neal,

Thank you very much for your answers. I had mistaken assumptions about
page/hibernation file creation.

In MetadataManager!FmmTargetIsVolume() i wanted to remark the fact that in
post-create callback “Status” can be set to
STATUS_FLT_POST_OPERATION_CLEANUP and therefore TargetFileObject shouldn´t
be referenced. I think this was one case where it is not safe to check for
the FO_VOLUME_OPEN flag.

Thanks,
mK

-----Mensaje original-----
De: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] En nombre de Neal Christiansen
Enviado el: domingo, 06 de marzo de 2005 1:40
Para: Windows File Systems Devs Interest List
Asunto: RE: [ntfsd] MetadataManager bug?

Misha,

It is fine to have your create routine in PAGED code even when creating a
paging file. Remember, you are not doing any paging IO on it at this time.

The call to FmmTargetIsVolume is safe even if the create fails. This is
because the file object is allocated by the IO Manager and is still valid.
The flag it is testing (FO_VOLUME_OPEN) is set before your minifilter is
called on pre-create and is not touched by the file system so it will still
be valid in post-create even on a failure.

There are other operations besides read/write which can have the PAGING_IO
flag set (query file information for one). It may be unnecessary for other
operations but there is certainly no harm in setting it on all operations.

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 Misha Karpin
Sent: Tuesday, February 22, 2005 8:21 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] MetadataManager bug?

Hi,

FmmCreate() is declared as PAGED_CODE. Isn´t a bug to fault a code page
during paging file creation?.

Also in FmmPostCreate()->FmmTargetIsVolume() routine,
Cbd->Iopb->TargetFileObject is referenced. This seems to be done in case of
(Cbd->IoStatus.Status < 0).

My last doubt is whether FLTFL_OPERATION_REGISTRATION_SKIP_PAGING_IO has any
meaning for IRP differents than IRP_MJ_READ/WRITE, as this flag is present
in all the callbacks registered by the metadatamanager sample.

Thanks,
mK


Express yourself instantly with MSN Messenger! Download today it’s FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

Mishak,

I agree with you.

When an instance is being deleted (draining flag set in post operation callback) there are cases where the file object may be null. If the file object is present it is safe to access it but you must test for NULL first.

I have fixed this problem with the sample.

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 Misha Karpin
Sent: Monday, March 07, 2005 1:00 AM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] MetadataManager bug?

Neal,

Thank you very much for your answers. I had mistaken assumptions about
page/hibernation file creation.

In MetadataManager!FmmTargetIsVolume() i wanted to remark the fact that in
post-create callback “Status” can be set to
STATUS_FLT_POST_OPERATION_CLEANUP and therefore TargetFileObject shouldn?t
be referenced. I think this was one case where it is not safe to check for
the FO_VOLUME_OPEN flag.

Thanks,
mK

-----Mensaje original-----
De: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] En nombre de Neal Christiansen
Enviado el: domingo, 06 de marzo de 2005 1:40
Para: Windows File Systems Devs Interest List
Asunto: RE: [ntfsd] MetadataManager bug?

Misha,

It is fine to have your create routine in PAGED code even when creating a
paging file. Remember, you are not doing any paging IO on it at this time.

The call to FmmTargetIsVolume is safe even if the create fails. This is
because the file object is allocated by the IO Manager and is still valid.
The flag it is testing (FO_VOLUME_OPEN) is set before your minifilter is
called on pre-create and is not touched by the file system so it will still
be valid in post-create even on a failure.

There are other operations besides read/write which can have the PAGING_IO
flag set (query file information for one). It may be unnecessary for other
operations but there is certainly no harm in setting it on all operations.

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 Misha Karpin
Sent: Tuesday, February 22, 2005 8:21 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] MetadataManager bug?

Hi,

FmmCreate() is declared as PAGED_CODE. Isn?t a bug to fault a code page
during paging file creation?.

Also in FmmPostCreate()->FmmTargetIsVolume() routine,
Cbd->Iopb->TargetFileObject is referenced. This seems to be done in case of
(Cbd->IoStatus.Status < 0).

My last doubt is whether FLTFL_OPERATION_REGISTRATION_SKIP_PAGING_IO has any
meaning for IRP differents than IRP_MJ_READ/WRITE, as this flag is present
in all the callbacks registered by the metadatamanager sample.

Thanks,
mK


Express yourself instantly with MSN Messenger! Download today it’s FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


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