Unsolicited FSCTRL IRP processing

Hello -

I’ve got my own FSD that works fine when accessed from the same machine
that it is running on. But when I map a drive to it from a different
machine (my driver allows this), everything seems to work ok, except I’m
getting an unsolicited IRP that looks like this:

Major IRP is IRP_MJ_FILE_SYSTEM_CONTROL
Minor IRP is IRP_MN_USER_FS_REQUEST
device I/O control code is 0x00090008

I have a user-mode server part that talks to this driver, and it issues
IOCTLs, but it doesn’t issue FSCTLs.

I think this IRP comes to me from the I/O mgr after I have completely
processed a CREATE FILE request (among other things).

I cannot figure out what to do with this IRP, so I return
“STATUS_INVALID_DEVICE_REQUEST”. This causes a “the parameter is
incorrect” message box to pop up on the client machine, even though the
file gets created, cleaned up, and closed.

Does anyone know who is sending this IRP to me and how should I handle it?
What does a 0x00090008 mean?

Thanks, in advance, of course!

Greg


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Greg,

In ntifs.h they define the relevant FSCTL:

#define FSCTL_REQUEST_BATCH_OPLOCK CTL_CODE(FILE_DEVICE_FILE_SYSTEM,
2, METHOD_BUFFERED, FILE_ANY_ACCESS)

This yields 0x00090008. Thus, you have a request for a batch oplock which
your file system doesn’t implement. Try telling it “no” instead. You do
that by returning STATUS_OPLOCK_NOT_GRANTED (STATUS_NOT_IMPLEMENTED might
work as well.)

I hope this helps.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

Next OSR file systems class is in Seattle, August 6-10, 2001. Hope to see
you there!

-----Original Message-----
From: xxxxx@filetek.com [mailto:xxxxx@filetek.com]
Sent: Thursday, July 19, 2001 11:56 AM
To: File Systems Developers
Subject: [ntfsd] Unsolicited FSCTRL IRP processing

Hello -

I’ve got my own FSD that works fine when accessed from the same machine
that it is running on. But when I map a drive to it from a different
machine (my driver allows this), everything seems to work ok, except I’m
getting an unsolicited IRP that looks like this:

Major IRP is IRP_MJ_FILE_SYSTEM_CONTROL
Minor IRP is IRP_MN_USER_FS_REQUEST
device I/O control code is 0x00090008

I have a user-mode server part that talks to this driver, and it issues
IOCTLs, but it doesn’t issue FSCTLs.

I think this IRP comes to me from the I/O mgr after I have completely
processed a CREATE FILE request (among other things).

I cannot figure out what to do with this IRP, so I return
“STATUS_INVALID_DEVICE_REQUEST”. This causes a “the parameter is
incorrect” message box to pop up on the client machine, even though the
file gets created, cleaned up, and closed.

Does anyone know who is sending this IRP to me and how should I handle it?
What does a 0x00090008 mean?

Thanks, in advance, of course!

Greg


You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Tony

Thanks for enlightening me! (Again). This is one of the pieces I was
missing. Now I understand! Thanks!

BTW: Where can I find out which IRPS/FSCTRL/IOCTLs expect what type of
responses? I’m still looking in the IFS Kit and DDK (and your book, and
Nagar’s book) but I can’t find this.

Thanks again - Greg


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Greg,

Sorry, but I’ve never seen a list that says “return this value for this
FSCTL/IOCTL if you don’t support it.” Heck, I haven’t seen a list that says
“you must implement the following FSCTL/IOCTL operations.” Essentially, the
only thing you can do is look at the examples, try to figure it out and, if
all else fails, query the list.

*I* had to go look at how we’d handled this particular FSCTL in the past
(there has to be *some* incentive for folks out there to purchase our
toolkits, no? :wink:

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

Next OSR file systems class, August 6-10, 2001, Seattle, WA!

-----Original Message-----
From: xxxxx@filetek.com [mailto:xxxxx@filetek.com]
Sent: Friday, July 20, 2001 4:57 AM
To: File Systems Developers
Subject: [ntfsd] RE: Unsolicited FSCTRL IRP processing

Tony

Thanks for enlightening me! (Again). This is one of the pieces I was
missing. Now I understand! Thanks!

BTW: Where can I find out which IRPS/FSCTRL/IOCTLs expect what type of
responses? I’m still looking in the IFS Kit and DDK (and your book, and
Nagar’s book) but I can’t find this.

Thanks again - Greg


You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Tony,

Thanks a lot - my system operates much better now that I’m properly
ignoring all FSCTLs that I don’t think I need (by returning
STATUS_NOT_IMPLEMENTED)! I really appreciate your time in looking this up
too - it’s a great reason to by your tool kit!

See ya on the funway! Yippie tie one on!

Greg


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com