Atapi Driver Doesnt Handle Few Irps??

Hello …

One part of our product is a file system filter driver that does encryption/decryption
of file data. I have a situation where one of the threads of services.exe has sent
down 3 write irps that make it all the way to the atapi driver and sits in the
device queue for the driver. For some reason these irps are never completed by
atapi device. Our filter driver is not interested in these irps as they are writes to
different parts of the registry keys (or registry file). However the issueing thread
locks the different parts of the registry before sending down the irps and the registry
never gets unlocked. To the user this appears like a system hang, can move the mouse
but cant click on anything etc… Other I/O to the device seems to go on fine
when I checked through a debugger attached to the system. Any pointers as to what
might be going on is a big help. I have been trying to track this problem for the
past 3 days.

Thanks for the help.

-Shyam

Atapi Driver Doesnt Handle Few Irps??If you remove your filter, are the IRPs in question still pended and never completed?


Gary G. Little
Seagate Technologies, LLC
“Nagaraj Shyam” wrote in message news:xxxxx@ntfsd…
Hello …

One part of our product is a file system filter driver that does encryption/decryption
of file data. I have a situation where one of the threads of services.exe has sent
down 3 write irps that make it all the way to the atapi driver and sits in the
device queue for the driver. For some reason these irps are never completed by
atapi device. Our filter driver is not interested in these irps as they are writes to
different parts of the registry keys (or registry file). However the issueing thread
locks the different parts of the registry before sending down the irps and the registry
never gets unlocked. To the user this appears like a system hang, can move the mouse
but cant click on anything etc… Other I/O to the device seems to go on fine
when I checked through a debugger attached to the system. Any pointers as to what
might be going on is a big help. I have been trying to track this problem for the
past 3 days.

Thanks for the help.

-Shyam

Did you replace the MDLs in the write IRPs? If so, did you remember to
update Irp->UserBuffer? If not, that can lead to a condition where the
driver/device hangs under certain circumstances.

Remember - Irp->UserBuffer must be equal to
MmGetMdlVirtualAddress(Irp->MdlAddress) when you pass the IRP down.

Regards,

Tony

Tony Mason

Consulting Partner

OSR Open Systems Resources, Inc.

http://www.osr.com


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Nagaraj Shyam
Sent: Wednesday, March 31, 2004 10:27 PM
To: ntfsd redirect
Subject: [ntfsd] Atapi Driver Doesnt Handle Few Irps??

Hello …

One part of our product is a file system filter driver that does
encryption/decryption
of file data. I have a situation where one of the threads of
services.exe has sent
down 3 write irps that make it all the way to the atapi driver and sits
in the
device queue for the driver. For some reason these irps are never
completed by
atapi device. Our filter driver is not interested in these irps as they
are writes to
different parts of the registry keys (or registry file). However the
issueing thread
locks the different parts of the registry before sending down the irps
and the registry
never gets unlocked. To the user this appears like a system hang, can
move the mouse
but cant click on anything etc… Other I/O to the device seems to go
on fine
when I checked through a debugger attached to the system. Any pointers
as to what
might be going on is a big help. I have been trying to track this
problem for the
past 3 days.

Thanks for the help.

-Shyam


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Never seen this problem happen without our driver installed.

-Shyam

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]On Behalf Of Gary G. Little
Sent: Thursday, April 01, 2004 7:25 AM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] Atapi Driver Doesnt Handle Few Irps??

If you remove your filter, are the IRPs in question still pended and never completed?


Gary G. Little
Seagate Technologies, LLC

“Nagaraj Shyam” < xxxxx@vormetric.com> wrote in message news:xxxxx@ntfsd…

Hello …

One part of our product is a file system filter driver that does encryption/decryption
of file data. I have a situation where one of the threads of services.exe has sent
down 3 write irps that make it all the way to the atapi driver and sits in the
device queue for the driver. For some reason these irps are never completed by
atapi device. Our filter driver is not interested in these irps as they are writes to
different parts of the registry keys (or registry file). However the issueing thread
locks the different parts of the registry before sending down the irps and the registry
never gets unlocked. To the user this appears like a system hang, can move the mouse
but cant click on anything etc… Other I/O to the device seems to go on fine
when I checked through a debugger attached to the system. Any pointers as to what
might be going on is a big help. I have been trying to track this problem for the
past 3 days.

Thanks for the help.

-Shyam


Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@vormetric.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

We send down these 3 irps without touching them. IoSkipCurrentIrpStackLocation() and then
IoCallDriver(). However I must mention the disk itself is heavily pounded by iometer test, which we
are running on other 2 partitions of the same disk, and our filter manipulates the iometer irps.
The 3 irps to registry are writes of 512 bytes and iometer is generating 1MB requests. Maybe
some disk i/o scheduling algorithm?

Thanks,
-Shyam

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]On Behalf Of Tony Mason
Sent: Thursday, April 01, 2004 9:54 AM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] Atapi Driver Doesnt Handle Few Irps??

Did you replace the MDLs in the write IRPs? If so, did you remember to update Irp->UserBuffer? If not, that can lead to a condition where the driver/device hangs under certain circumstances.

Remember - Irp->UserBuffer must be equal to MmGetMdlVirtualAddress(Irp->MdlAddress) when you pass the IRP down.

Regards,

Tony

Tony Mason

Consulting Partner

OSR Open Systems Resources, Inc.

http://www.osr.com


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Nagaraj Shyam
Sent: Wednesday, March 31, 2004 10:27 PM
To: ntfsd redirect
Subject: [ntfsd] Atapi Driver Doesnt Handle Few Irps??

Hello …

One part of our product is a file system filter driver that does encryption/decryption
of file data. I have a situation where one of the threads of services.exe has sent
down 3 write irps that make it all the way to the atapi driver and sits in the
device queue for the driver. For some reason these irps are never completed by
atapi device. Our filter driver is not interested in these irps as they are writes to
different parts of the registry keys (or registry file). However the issueing thread
locks the different parts of the registry before sending down the irps and the registry
never gets unlocked. To the user this appears like a system hang, can move the mouse
but cant click on anything etc… Other I/O to the device seems to go on fine
when I checked through a debugger attached to the system. Any pointers as to what
might be going on is a big help. I have been trying to track this problem for the
past 3 days.

Thanks for the help.

-Shyam


Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@osr.com
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: xxxxx@vormetric.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Doesn’t seem likely. If you look at the IRPs what is their state? Are
they completed? Are they queued?

You must be doing something to impact this!

Regards,

Tony

Tony Mason

Consulting Partner

OSR Open Systems Resources, Inc.

http://www.osr.com


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Nagaraj Shyam
Sent: Thursday, April 01, 2004 1:11 PM
To: ntfsd redirect
Subject: RE: [ntfsd] Atapi Driver Doesnt Handle Few Irps??

We send down these 3 irps without touching them.
IoSkipCurrentIrpStackLocation() and then

IoCallDriver(). However I must mention the disk itself is heavily
pounded by iometer test, which we

are running on other 2 partitions of the same disk, and our filter
manipulates the iometer irps.

The 3 irps to registry are writes of 512 bytes and iometer is generating
1MB requests. Maybe

some disk i/o scheduling algorithm?

Thanks,

-Shyam

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Tony Mason
Sent: Thursday, April 01, 2004 9:54 AM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] Atapi Driver Doesnt Handle Few Irps??

Did you replace the MDLs in the write IRPs? If so, did you
remember to update Irp->UserBuffer? If not, that can lead to a
condition where the driver/device hangs under certain circumstances.

Remember - Irp->UserBuffer must be equal to
MmGetMdlVirtualAddress(Irp->MdlAddress) when you pass the IRP down.

Regards,

Tony

Tony Mason

Consulting Partner

OSR Open Systems Resources, Inc.

http://www.osr.com


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Nagaraj Shyam
Sent: Wednesday, March 31, 2004 10:27 PM
To: ntfsd redirect
Subject: [ntfsd] Atapi Driver Doesnt Handle Few Irps??

Hello …

One part of our product is a file system filter driver that does
encryption/decryption
of file data. I have a situation where one of the threads of
services.exe has sent
down 3 write irps that make it all the way to the atapi driver
and sits in the
device queue for the driver. For some reason these irps are
never completed by
atapi device. Our filter driver is not interested in these irps
as they are writes to
different parts of the registry keys (or registry file).
However the issueing thread
locks the different parts of the registry before sending down
the irps and the registry
never gets unlocked. To the user this appears like a system
hang, can move the mouse
but cant click on anything etc… Other I/O to the device
seems to go on fine
when I checked through a debugger attached to the system. Any
pointers as to what
might be going on is a big help. I have been trying to track
this problem for the
past 3 days.

Thanks for the help.

-Shyam


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@osr.com
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: xxxxx@vormetric.com
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: xxxxx@osr.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

I looked some more and some of the calls that we make in our driver on
registry key objects take the registry lock too. The irps are infact in the device
queue of the atapi driver and not completed. I looked at the current irp
stack location for the irps in the debugger (hope I didnt miss anything).

Thanks and Regards,
-Shyam
PS> I plan on minimizing the calls that lock up the registry and see if this improves
things.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]On Behalf Of Tony Mason
Sent: Thursday, April 01, 2004 1:08 PM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] Atapi Driver Doesnt Handle Few Irps??

Doesn’t seem likely. If you look at the IRPs what is their state? Are they completed? Are they queued?

You must be doing something to impact this!

Regards,

Tony

Tony Mason

Consulting Partner

OSR Open Systems Resources, Inc.

http://www.osr.com


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Nagaraj Shyam
Sent: Thursday, April 01, 2004 1:11 PM
To: ntfsd redirect
Subject: RE: [ntfsd] Atapi Driver Doesnt Handle Few Irps??

We send down these 3 irps without touching them. IoSkipCurrentIrpStackLocation() and then

IoCallDriver(). However I must mention the disk itself is heavily pounded by iometer test, which we

are running on other 2 partitions of the same disk, and our filter manipulates the iometer irps.

The 3 irps to registry are writes of 512 bytes and iometer is generating 1MB requests. Maybe

some disk i/o scheduling algorithm?

Thanks,

-Shyam

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]On Behalf Of Tony Mason
Sent: Thursday, April 01, 2004 9:54 AM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] Atapi Driver Doesnt Handle Few Irps??

Did you replace the MDLs in the write IRPs? If so, did you remember to update Irp->UserBuffer? If not, that can lead to a condition where the driver/device hangs under certain circumstances.

Remember - Irp->UserBuffer must be equal to MmGetMdlVirtualAddress(Irp->MdlAddress) when you pass the IRP down.

Regards,

Tony

Tony Mason

Consulting Partner

OSR Open Systems Resources, Inc.

http://www.osr.com


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Nagaraj Shyam
Sent: Wednesday, March 31, 2004 10:27 PM
To: ntfsd redirect
Subject: [ntfsd] Atapi Driver Doesnt Handle Few Irps??

Hello …

One part of our product is a file system filter driver that does encryption/decryption
of file data. I have a situation where one of the threads of services.exe has sent
down 3 write irps that make it all the way to the atapi driver and sits in the
device queue for the driver. For some reason these irps are never completed by
atapi device. Our filter driver is not interested in these irps as they are writes to
different parts of the registry keys (or registry file). However the issueing thread
locks the different parts of the registry before sending down the irps and the registry
never gets unlocked. To the user this appears like a system hang, can move the mouse
but cant click on anything etc… Other I/O to the device seems to go on fine
when I checked through a debugger attached to the system. Any pointers as to what
might be going on is a big help. I have been trying to track this problem for the
past 3 days.

Thanks for the help.

-Shyam


Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@osr.com
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: xxxxx@vormetric.com
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: xxxxx@osr.com
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: xxxxx@vormetric.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Atapi Driver Doesnt Handle Few Irps?? I remember this problem (hang on the IRP being stuck at Atapi's AdapterDevice->CurrentIrp and never completed) with our own "disk in file" driver. I don't remember the cause exactly, something related to shutdown sequence IIRC.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com

----- Original Message -----
From: Nagaraj Shyam
To: Windows File Systems Devs Interest List
Sent: Friday, April 02, 2004 6:04 AM
Subject: RE: [ntfsd] Atapi Driver Doesnt Handle Few Irps??

I looked some more and some of the calls that we make in our driver on
registry key objects take the registry lock too. The irps are infact in the device
queue of the atapi driver and not completed. I looked at the current irp
stack location for the irps in the debugger (hope I didnt miss anything).

Thanks and Regards,
-Shyam
PS> I plan on minimizing the calls that lock up the registry and see if this improves
things.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]On Behalf Of Tony Mason
Sent: Thursday, April 01, 2004 1:08 PM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] Atapi Driver Doesnt Handle Few Irps??

Doesn't seem likely. If you look at the IRPs what is their state? Are they completed? Are they queued?

You must be doing something to impact this!

Regards,

Tony

Tony Mason

Consulting Partner

OSR Open Systems Resources, Inc.


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Nagaraj Shyam
Sent: Thursday, April 01, 2004 1:11 PM
To: ntfsd redirect
Subject: RE: [ntfsd] Atapi Driver Doesnt Handle Few Irps??

We send down these 3 irps without touching them. IoSkipCurrentIrpStackLocation() and then

IoCallDriver(). However I must mention the disk itself is heavily pounded by iometer test, which we

are running on other 2 partitions of the same disk, and our filter manipulates the iometer irps.

The 3 irps to registry are writes of 512 bytes and iometer is generating 1MB requests. Maybe

some disk i/o scheduling algorithm?

Thanks,

-Shyam

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]On Behalf Of Tony Mason
Sent: Thursday, April 01, 2004 9:54 AM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] Atapi Driver Doesnt Handle Few Irps??

Did you replace the MDLs in the write IRPs? If so, did you remember to update Irp->UserBuffer? If not, that can lead to a condition where the driver/device hangs under certain circumstances.

Remember - Irp->UserBuffer must be equal to MmGetMdlVirtualAddress(Irp->MdlAddress) when you pass the IRP down.

Regards,

Tony

Tony Mason

Consulting Partner

OSR Open Systems Resources, Inc.


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Nagaraj Shyam
Sent: Wednesday, March 31, 2004 10:27 PM
To: ntfsd redirect
Subject: [ntfsd] Atapi Driver Doesnt Handle Few Irps??

Hello ...

One part of our product is a file system filter driver that does encryption/decryption
of file data. I have a situation where one of the threads of services.exe has sent
down 3 write irps that make it all the way to the atapi driver and sits in the
device queue for the driver. For some reason these irps are never completed by
atapi device. Our filter driver is not interested in these irps as they are writes to
different parts of the registry keys (or registry file). However the issueing thread
locks the different parts of the registry before sending down the irps and the registry
never gets unlocked. To the user this appears like a system hang, can move the mouse
but cant click on anything etc... Other I/O to the device seems to go on fine
when I checked through a debugger attached to the system. Any pointers as to what
might be going on is a big help. I have been trying to track this problem for the
past 3 days.

Thanks for the help.

-Shyam


Questions? First check the IFS FAQ at The NT Insider:Windows NT Virtual Memory (Part I)

You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the IFS FAQ at The NT Insider:Windows NT Virtual Memory (Part I)

You are currently subscribed to ntfsd as: xxxxx@vormetric.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the IFS FAQ at The NT Insider:Windows NT Virtual Memory (Part I)

You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the IFS FAQ at The NT Insider:Windows NT Virtual Memory (Part I)

You are currently subscribed to ntfsd as: xxxxx@vormetric.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Questions? First check the IFS FAQ at The NT Insider:Windows NT Virtual Memory (Part I)

You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Max,

Shutdown has not happend on this system.

Thanks,
-Shyam

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]On Behalf Of Maxim S. Shatskih
Sent: Thursday, April 01, 2004 6:24 PM
To: Windows File Systems Devs Interest List
Subject: Re: [ntfsd] Atapi Driver Doesnt Handle Few Irps??

I remember this problem (hang on the IRP being stuck at Atapi’s AdapterDevice->CurrentIrp and never completed) with our own “disk in file” driver. I don’t remember the cause exactly, something related to shutdown sequence IIRC.

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

----- Original Message -----
From: Nagaraj mailto:xxxxx Shyam
To: Windows File Systems Devs Interest mailto:xxxxx List
Sent: Friday, April 02, 2004 6:04 AM
Subject: RE: [ntfsd] Atapi Driver Doesnt Handle Few Irps??

I looked some more and some of the calls that we make in our driver on
registry key objects take the registry lock too. The irps are infact in the device
queue of the atapi driver and not completed. I looked at the current irp
stack location for the irps in the debugger (hope I didnt miss anything).

Thanks and Regards,
-Shyam
PS> I plan on minimizing the calls that lock up the registry and see if this improves
things.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]On Behalf Of Tony Mason
Sent: Thursday, April 01, 2004 1:08 PM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] Atapi Driver Doesnt Handle Few Irps??

Doesn’t seem likely. If you look at the IRPs what is their state? Are they completed? Are they queued?

You must be doing something to impact this!

Regards,

Tony

Tony Mason

Consulting Partner

OSR Open Systems Resources, Inc.

http://www.osr.com



From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Nagaraj Shyam
Sent: Thursday, April 01, 2004 1:11 PM
To: ntfsd redirect
Subject: RE: [ntfsd] Atapi Driver Doesnt Handle Few Irps??

We send down these 3 irps without touching them. IoSkipCurrentIrpStackLocation() and then

IoCallDriver(). However I must mention the disk itself is heavily pounded by iometer test, which we

are running on other 2 partitions of the same disk, and our filter manipulates the iometer irps.

The 3 irps to registry are writes of 512 bytes and iometer is generating 1MB requests. Maybe

some disk i/o scheduling algorithm?

Thanks,

-Shyam

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]On Behalf Of Tony Mason
Sent: Thursday, April 01, 2004 9:54 AM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] Atapi Driver Doesnt Handle Few Irps??

Did you replace the MDLs in the write IRPs? If so, did you remember to update Irp->UserBuffer? If not, that can lead to a condition where the driver/device hangs under certain circumstances.

Remember - Irp->UserBuffer must be equal to MmGetMdlVirtualAddress(Irp->MdlAddress) when you pass the IRP down.

Regards,

Tony

Tony Mason

Consulting Partner

OSR Open Systems Resources, Inc.

http://www.osr.com



From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Nagaraj Shyam
Sent: Wednesday, March 31, 2004 10:27 PM
To: ntfsd redirect
Subject: [ntfsd] Atapi Driver Doesnt Handle Few Irps??

Hello …

One part of our product is a file system filter driver that does encryption/decryption
of file data. I have a situation where one of the threads of services.exe has sent
down 3 write irps that make it all the way to the atapi driver and sits in the
device queue for the driver. For some reason these irps are never completed by
atapi device. Our filter driver is not interested in these irps as they are writes to
different parts of the registry keys (or registry file). However the issueing thread
locks the different parts of the registry before sending down the irps and the registry
never gets unlocked. To the user this appears like a system hang, can move the mouse
but cant click on anything etc… Other I/O to the device seems to go on fine
when I checked through a debugger attached to the system. Any pointers as to what
might be going on is a big help. I have been trying to track this problem for the
past 3 days.

Thanks for the help.

-Shyam


Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@osr.com
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: xxxxx@vormetric.com
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: xxxxx@osr.com
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: xxxxx@vormetric.com
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: xxxxx@storagecraft.com
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: xxxxx@vormetric.com
To unsubscribe send a blank email to xxxxx@lists.osr.com</mailto:xxxxx></mailto:xxxxx>

Then by definition the problem is in your filter.

Are you aware that the length field of non-cached IO coming from MM may not be properly rounded up to the next sector boundary? This occurs at the end of files. What this means to a filter that swaps buffers (which an encryption filter must do) is that you need to round these requests yourself before allocating the buffer.

You should do this for both read and write operations. If you don’t do this for reads you will be corrupting memory because the IO will write data beyond the end of your allocated buffer. On writes you will not properly write zeroes beyond the end of file.

You can use the sector size defined in the device object.

Neal Christiansen
Microsoft File System Filter Group Lead
This posting is provided “AS IS” with no warranties, and confers no rights.


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Nagaraj Shyam
Sent: Thursday, April 01, 2004 9:52 AM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] Atapi Driver Doesnt Handle Few Irps??

Never seen this problem happen without our driver installed.
?
-Shyam
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]On Behalf Of Gary G. Little
Sent: Thursday, April 01, 2004 7:25 AM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] Atapi Driver Doesnt Handle Few Irps??
If you remove your filter,?are the IRPs in question still pended and never completed?


Gary G. Little
Seagate Technologies, LLC?
“Nagaraj Shyam” wrote in message news:xxxxx@ntfsd…
Hello …
One part of our product is a file system filter driver that does encryption/decryption
of file data.? I have a situation where one of the threads of services.exe has sent
down 3 write irps that make it all the way to the atapi driver and sits in the
device queue for the driver.? For some reason these irps are never completed by
atapi device.? Our filter driver is not interested in these irps as they are writes to
different parts of the registry keys (or registry file).? However the issueing thread
locks the different parts of the registry before sending down the irps and the registry
never gets unlocked.? To the user this appears like a system hang, can move the mouse
but cant click on anything etc…?? Other I/O to the device seems to go on fine
when I checked through a debugger attached to the system.? Any pointers as to what
might be going on is a big help.? I have been trying to track this problem for the
past 3 days.
Thanks for the help.
-Shyam

Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@vormetric.com
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: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Neal Christiansen
Sent: Friday, April 02, 2004 5:50 PM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] Atapi Driver Doesnt Handle Few Irps??

Then by definition the problem is in your filter.

Are you aware that the length field of non-cached IO coming from MM may not be properly rounded up to the next sector boundary? This occurs at the end of files. What this means to a filter that swaps buffers (which an encryption filter must do) is that you need to round these requests yourself before allocating the buffer.

You should do this for both read and write operations. If you don’t do this for reads you will be corrupting memory because the IO will write data beyond the end of your allocated buffer. On writes you will not properly write zeroes beyond the end of file.

You can use the sector size defined in the device object.

Neal Christiansen
Microsoft File System Filter Group Lead
This posting is provided “AS IS” with no warranties, and confers no rights.


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Nagaraj Shyam
Sent: Thursday, April 01, 2004 9:52 AM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] Atapi Driver Doesnt Handle Few Irps??

Never seen this problem happen without our driver installed.
?
-Shyam
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]On Behalf Of Gary G. Little
Sent: Thursday, April 01, 2004 7:25 AM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] Atapi Driver Doesnt Handle Few Irps??
If you remove your filter,?are the IRPs in question still pended and never completed?


Gary G. Little
Seagate Technologies, LLC?
“Nagaraj Shyam” wrote in message news:xxxxx@ntfsd…
Hello …
One part of our product is a file system filter driver that does encryption/decryption
of file data.? I have a situation where one of the threads of services.exe has sent
down 3 write irps that make it all the way to the atapi driver and sits in the
device queue for the driver.? For some reason these irps are never completed by
atapi device.? Our filter driver is not interested in these irps as they are writes to
different parts of the registry keys (or registry file).? However the issueing thread
locks the different parts of the registry before sending down the irps and the registry
never gets unlocked.? To the user this appears like a system hang, can move the mouse
but cant click on anything etc…?? Other I/O to the device seems to go on fine
when I checked through a debugger attached to the system.? Any pointers as to what
might be going on is a big help.? I have been trying to track this problem for the
past 3 days.
Thanks for the help.
-Shyam

Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@vormetric.com
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: xxxxx@windows.microsoft.com
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: xxxxx@vormetric.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Thanks!! we will try the fix.

-Shyam

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Neal Christiansen
Sent: Friday, April 02, 2004 5:50 PM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] Atapi Driver Doesnt Handle Few Irps??

Then by definition the problem is in your filter.

Are you aware that the length field of non-cached IO coming from MM may not be properly rounded up to the next sector boundary? This occurs at the end of files. What this means to a filter that swaps buffers (which an encryption filter must do) is that you need to round these requests yourself before allocating the buffer.

You should do this for both read and write operations. If you don’t do this for reads you will be corrupting memory because the IO will write data beyond the end of your allocated buffer. On writes you will not properly write zeroes beyond the end of file.

You can use the sector size defined in the device object.

Neal Christiansen
Microsoft File System Filter Group Lead
This posting is provided “AS IS” with no warranties, and confers no rights.


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Nagaraj Shyam
Sent: Thursday, April 01, 2004 9:52 AM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] Atapi Driver Doesnt Handle Few Irps??

Never seen this problem happen without our driver installed.
?
-Shyam
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]On Behalf Of Gary G. Little
Sent: Thursday, April 01, 2004 7:25 AM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] Atapi Driver Doesnt Handle Few Irps??
If you remove your filter,?are the IRPs in question still pended and never completed?


Gary G. Little
Seagate Technologies, LLC?
“Nagaraj Shyam” wrote in message news:xxxxx@ntfsd…
Hello …
One part of our product is a file system filter driver that does encryption/decryption
of file data.? I have a situation where one of the threads of services.exe has sent
down 3 write irps that make it all the way to the atapi driver and sits in the
device queue for the driver.? For some reason these irps are never completed by
atapi device.? Our filter driver is not interested in these irps as they are writes to
different parts of the registry keys (or registry file).? However the issueing thread
locks the different parts of the registry before sending down the irps and the registry
never gets unlocked.? To the user this appears like a system hang, can move the mouse
but cant click on anything etc…?? Other I/O to the device seems to go on fine
when I checked through a debugger attached to the system.? Any pointers as to what
might be going on is a big help.? I have been trying to track this problem for the
past 3 days.
Thanks for the help.
-Shyam

Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@vormetric.com
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: xxxxx@windows.microsoft.com
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: xxxxx@vormetric.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Hi Neal,

After thinking about it a little, this is not a problem on our
current test setup. iometer issues non cached i/o requests which
are already sector aligned.

However there is definitely the bug you mention and our code has
been fixed.

Thanks,
-Shyam

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Nagaraj Shyam
Sent: Friday, April 02, 2004 6:11 PM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] Atapi Driver Doesnt Handle Few Irps??

Thanks!! we will try the fix.

-Shyam

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Neal Christiansen
Sent: Friday, April 02, 2004 5:50 PM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] Atapi Driver Doesnt Handle Few Irps??

Then by definition the problem is in your filter.

Are you aware that the length field of non-cached IO coming from MM may not be properly rounded up to the next sector boundary? This occurs at the end of files. What this means to a filter that swaps buffers (which an encryption filter must do) is that you need to round these requests yourself before allocating the buffer.

You should do this for both read and write operations. If you don’t do this for reads you will be corrupting memory because the IO will write data beyond the end of your allocated buffer. On writes you will not properly write zeroes beyond the end of file.

You can use the sector size defined in the device object.

Neal Christiansen
Microsoft File System Filter Group Lead
This posting is provided “AS IS” with no warranties, and confers no rights.


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Nagaraj Shyam
Sent: Thursday, April 01, 2004 9:52 AM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] Atapi Driver Doesnt Handle Few Irps??

Never seen this problem happen without our driver installed.
?
-Shyam
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]On Behalf Of Gary G. Little
Sent: Thursday, April 01, 2004 7:25 AM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] Atapi Driver Doesnt Handle Few Irps??
If you remove your filter,?are the IRPs in question still pended and never completed?


Gary G. Little
Seagate Technologies, LLC?
“Nagaraj Shyam” wrote in message news:xxxxx@ntfsd…
Hello …
One part of our product is a file system filter driver that does encryption/decryption
of file data.? I have a situation where one of the threads of services.exe has sent
down 3 write irps that make it all the way to the atapi driver and sits in the
device queue for the driver.? For some reason these irps are never completed by
atapi device.? Our filter driver is not interested in these irps as they are writes to
different parts of the registry keys (or registry file).? However the issueing thread
locks the different parts of the registry before sending down the irps and the registry
never gets unlocked.? To the user this appears like a system hang, can move the mouse
but cant click on anything etc…?? Other I/O to the device seems to go on fine
when I checked through a debugger attached to the system.? Any pointers as to what
might be going on is a big help.? I have been trying to track this problem for the
past 3 days.
Thanks for the help.
-Shyam

Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@vormetric.com
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: xxxxx@windows.microsoft.com
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: xxxxx@vormetric.com
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: xxxxx@vormetric.com
To unsubscribe send a blank email to xxxxx@lists.osr.com