FltReadFile

Hi.

The FltReadFile option “FLTFL_IO_OPERATION_DO_NOT_UPDATE_BYTE_OFFSET” …
how is this implemented under the hood?

Just by saving and restoring “FileObject->CurrentByteOffset”? Or is there
more?

Thanks
Frank

you mean how fltmgr implements this?

Based on fastfat,

SynchronousIo = BooleanFlagOn(FileObject->Flags, FO_SYNCHRONOUS_IO);

and,

check if synchronousIo than

set fileobject currentbyte offset.

So My *guess* is that fltmgr does not set FO_SYNCHRONOUS_IO flag when the said flag is specified.

Thanks
Aditya

Kindly read all those post in continuation, I tried sending them in one post but encountered error every time.Now I found the error actually was coming when I was posting a piece of code from fastfat,

read.c line number 851.

Surprisingly, this is first time I noticed NTFSD is blocking code snippets, is it some new implementation?

Thanks
Aditya

>>the explorer view of my software stops displaying files which are deep under the tree view heirarchy with mammoth names. please help me out .

So how exactly it is related to file name length? as you said your explorer view stops displaying files under directories with long names, first check list should be

1 Which IO is failing. check using filespy.(should be directory control or may be create)
2 Match the value returned by your driver at par with what system returns when your driver is not installed.
3 Make sure all your filename vars are not on stack and are of variable length; not MAX_PATH.

Thanks
Aditya

Please ignore last post - Something going madin my system.

apologies for the problem.

Hmm. This thread is pretty weird …

Frank, I’m just wondering why is this important ? Any reason why you can’t treat it as an opaque implementation detail ?

Regards,
Alex.
This posting is provided “AS IS” with no warranties, and confers no rights.

Well, I would like to treat this opaque, if you may tell me how to do this:
I want to use FltReadFile to issue an async read I/O in combination with
FltCancelIo to cancel that async read I/O. Correct me if I am wrong, but
since FltReadFile doesn’t fork out the CallbackData it allocated I don’t
have the chance to cancel.

Though I am still forced to maintain my own “FltReadFile” implementation.

Thanks
Frank

“Alexandru Carp” wrote news:xxxxx@ntfsd…
> Hmm. This thread is pretty weird …
>
> Frank, I’m just wondering why is this important ? Any reason why you can’t
> treat it as an opaque implementation detail ?
>
> Regards,
> Alex.
> This posting is provided “AS IS” with no warranties, and confers no
> rights.
>

Disk stack does not support IO cancellation anyway, and I think FSDs too.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

wrote in message news:xxxxx@ntfsd…
> Well, I would like to treat this opaque, if you may tell me how to do this:
> I want to use FltReadFile to issue an async read I/O in combination with
> FltCancelIo to cancel that async read I/O. Correct me if I am wrong, but
> since FltReadFile doesn’t fork out the CallbackData it allocated I don’t
> have the chance to cancel.
>
> Though I am still forced to maintain my own “FltReadFile” implementation.
>
> Thanks
> Frank
>
> “Alexandru Carp” wrote news:xxxxx@ntfsd…
>> Hmm. This thread is pretty weird …
>>
>> Frank, I’m just wondering why is this important ? Any reason why you can’t
>> treat it as an opaque implementation detail ?
>>
>> Regards,
>> Alex.
>> This posting is provided “AS IS” with no warranties, and confers no
>> rights.
>>
>

Than what would be the purpose of FltCancelIo or IoCancelFileOpen?

Thanks
Aditya

Maxim,

Maybe I am missing something but don’t we have the whole Cancel safe queues
and the CBDQ (minifilter version of the cancel safe queues)?
And my understanding was that FS calls can be cancelled.
Probably I misread your reply?

Regards,
Ayush Gupta

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-379435-
xxxxx@lists.osr.com] On Behalf Of Maxim S. Shatskih
Sent: Wednesday, September 02, 2009 3:19 PM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] RE:FltReadFile

Disk stack does not support IO cancellation anyway, and I think
FSDs too.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

wrote in message news:xxxxx@ntfsd…
> > Well, I would like to treat this opaque, if you may tell me how to do
> this:
> > I want to use FltReadFile to issue an async read I/O in combination
> with
> > FltCancelIo to cancel that async read I/O. Correct me if I am wrong,
> but
> > since FltReadFile doesn’t fork out the CallbackData it allocated I
> don’t
> > have the chance to cancel.
> >
> > Though I am still forced to maintain my own “FltReadFile”
> implementation.
> >
> > Thanks
> > Frank
> >
> > “Alexandru Carp” wrote
> news:xxxxx@ntfsd…
> >> Hmm. This thread is pretty weird …
> >>
> >> Frank, I’m just wondering why is this important ? Any reason why you
> can’t
> >> treat it as an opaque implementation detail ?
> >>
> >> Regards,
> >> Alex.
> >> This posting is provided “AS IS” with no warranties, and confers no
> >> rights.
> >>
> >
>
> —
> NTFSD is sponsored by OSR
>
> For our schedule of debugging and file system seminars
> (including our new fs mini-filter seminar) visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer

Hi Frank,

Well, since FLTFL_IO_OPERATION_DO_NOT_UPDATE_BYTE_OFFSET only has meaning for synchronous IO (CurrentByteOffset is not updated on async IO) I don’t think you need to care about it in your function that issues aync reads.

Regards,
Alex.
This posting is provided “AS IS” with no warranties, and confers no rights.