How to check if there are any locked bytes within a range without
performing read or write?
I have this situation: my encryption filter driver is based on a block
cipher, so if the user tries to read the byte at position 3 the whole
block from 0 to 7 is read first. What if the byte at position 1 is
locked by another process? The read will fail and this will be wrong. I
noticed that sending read or writes Irps downlevel with IRP_PAGING_IO
bit set the locking is not checked anymore, but I have to use only
pages. This is not too hard to do, but I have another problem: how can I
check at the begining of read or write if that operation is supposed to
succeed or not? Is there any MJ_FILE_CONTROL to do that?
Daniel
Decrypt in noncached read path - it is page-aligned and is below range
locking.
Max
----- Original Message -----
From: “Daniel Turcanu”
To: “File Systems Developers”
Sent: Monday, April 07, 2003 1:27 PM
Subject: [ntfsd] how to check for locked bytes in a file?
> How to check if there are any locked bytes within a range without
> performing read or write?
> I have this situation: my encryption filter driver is based on a
block
> cipher, so if the user tries to read the byte at position 3 the
whole
> block from 0 to 7 is read first. What if the byte at position 1 is
> locked by another process? The read will fail and this will be
wrong. I
> noticed that sending read or writes Irps downlevel with
IRP_PAGING_IO
> bit set the locking is not checked anymore, but I have to use only
> pages. This is not too hard to do, but I have another problem: how
can I
> check at the begining of read or write if that operation is supposed
to
> succeed or not? Is there any MJ_FILE_CONTROL to do that?
>
> Daniel
>
>
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com