writes directed to source file during copy operation?

In my mini-redirector, it appears that I’m seeing the CMD.exe copy
command direct writes to the source file, which it opened with
FILE_READ_DATA access only.

Is this expected, or have I messed something up?

I currently fail these requests with a STATUS_ACCESS_DENIED,
and things seem to work.

If this is expected, can someone give me a rational for such
behavior?

Thanks,

Joseph

Okay, I’m still confused, but less so now.

I found a bug; I wasn’t propagating the error code correctly,
so I wasn’t failing the requests, I was completing them with
STATUS_SUCCESS (even though they had failed), and everything
seemed to be working.

Now that I’m really failing them, I’m seeing the write behind
popup and INPAGE failures.

So, in summary:

A.) It appears that the memory manager is sending me WRITE requests
when the file has not been open for write access.

This causes me major grief, since I requested the server to open
the file in a mode the conforms to the desired access original
requested. The server won’t complete the operation successful.

B.) I also see the same thing in reverse: READ requests on a file
not opened with FILE_READ_DATA access.

Does anyone have a rational for why the devil the MM is doing this?
It seems outrageously crazy to me…

Can I ignore the operations?

Anyone have any better suggestions?

Thanks,

Joseph

Joseph Galbraith wrote:

In my mini-redirector, it appears that I’m seeing the CMD.exe copy
command direct writes to the source file, which it opened with
FILE_READ_DATA access only.

Is this expected, or have I messed something up?

I currently fail these requests with a STATUS_ACCESS_DENIED,
and things seem to work.

If this is expected, can someone give me a rational for such
behavior?

Thanks,

Joseph


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

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

This is standard behavior for the OS. The user level access has no
relationship to the OS level access on the object. Mm (for example)
will use the first file object for backing the section. If a subsequent
I/O operation writes data back to that section, Mm uses that first file
object, even if the file object was only opened for read access.

Regards,

Tony

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

Looking forward to seeing you at the Next OSR File Systems Class October
18, 2004 in Silicon Valley!

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Joseph Galbraith
Sent: Monday, August 30, 2004 6:57 PM
To: ntfsd redirect
Subject: Re: [ntfsd] writes directed to source file during copy
operation?

Okay, I’m still confused, but less so now.

I found a bug; I wasn’t propagating the error code correctly,
so I wasn’t failing the requests, I was completing them with
STATUS_SUCCESS (even though they had failed), and everything
seemed to be working.

Now that I’m really failing them, I’m seeing the write behind
popup and INPAGE failures.

So, in summary:

A.) It appears that the memory manager is sending me WRITE requests
when the file has not been open for write access.

This causes me major grief, since I requested the server to open
the file in a mode the conforms to the desired access original
requested. The server won’t complete the operation successful.

B.) I also see the same thing in reverse: READ requests on a file
not opened with FILE_READ_DATA access.

Does anyone have a rational for why the devil the MM is doing this?
It seems outrageously crazy to me…

Can I ignore the operations?

Anyone have any better suggestions?

Thanks,

Joseph

Joseph Galbraith wrote:

In my mini-redirector, it appears that I’m seeing the CMD.exe copy
command direct writes to the source file, which it opened with
FILE_READ_DATA access only.

Is this expected, or have I messed something up?

I currently fail these requests with a STATUS_ACCESS_DENIED,
and things seem to work.

If this is expected, can someone give me a rational for such
behavior?

Thanks,

Joseph


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

You are currently subscribed to ntfsd as: xxxxx@vandyke.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

Okay, I’ve been focusing on the read on a write only
handle problem, and it is killing me.

Does anyone know why the smbmrx sample doesn’t experience
this behavior?

There are some comments about disabling caching on write
only handles, but I’ve ifdef’ed that code out, and I still
don’t see a read on a write only handle during a copy
operation. (That is I’ve ifdef’d out setting
SMB_SRVOPEN_FLAG_WRITE_ONLY_HANDLE and
SRVOPEN_FLAG_DONTUSE_WRITE_CACHEING during create,
and the guts of MRxSmbMungeBufferingIfWriteOnlyHandles)

I’ve also tried calling RxChangeBufferingState() and implementing
my ComputeNewBufferingState() to turn off

FCB_STATE_WRITECACHING_ENABLED
FCB_STATE_FILESIZECACHEING_ENABLED
FCB_STATE_FILETIMECACHEING_ENABLED
FCB_STATE_LOCK_BUFFERING_ENABLED
FCB_STATE_READCACHING_ENABLED
FCB_STATE_COLLAPSING_ENABLED

or to flat out return 0 for the new buffering state.

Neither one seems to make any difference, so perhaps I’m barking
up the wrong tree here.

If anyone understands how smbmrx is working here and could
point me in the right direction, I’d sure appreciate it.

Thanks,

Joseph

Tony Mason wrote:

This is standard behavior for the OS. The user level access has no
relationship to the OS level access on the object. Mm (for example)
will use the first file object for backing the section. If a subsequent
I/O operation writes data back to that section, Mm uses that first file
object, even if the file object was only opened for read access.

Regards,

Tony

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

Looking forward to seeing you at the Next OSR File Systems Class October
18, 2004 in Silicon Valley!

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Joseph Galbraith
Sent: Monday, August 30, 2004 6:57 PM
To: ntfsd redirect
Subject: Re: [ntfsd] writes directed to source file during copy
operation?

Okay, I’m still confused, but less so now.

I found a bug; I wasn’t propagating the error code correctly,
so I wasn’t failing the requests, I was completing them with
STATUS_SUCCESS (even though they had failed), and everything
seemed to be working.

Now that I’m really failing them, I’m seeing the write behind
popup and INPAGE failures.

So, in summary:

A.) It appears that the memory manager is sending me WRITE requests
when the file has not been open for write access.

This causes me major grief, since I requested the server to open
the file in a mode the conforms to the desired access original
requested. The server won’t complete the operation successful.

B.) I also see the same thing in reverse: READ requests on a file
not opened with FILE_READ_DATA access.

Does anyone have a rational for why the devil the MM is doing this?
It seems outrageously crazy to me…

Can I ignore the operations?

Anyone have any better suggestions?

Thanks,

Joseph

Joseph Galbraith wrote:

>In my mini-redirector, it appears that I’m seeing the CMD.exe copy
>command direct writes to the source file, which it opened with
>FILE_READ_DATA access only.
>
>Is this expected, or have I messed something up?
>
>I currently fail these requests with a STATUS_ACCESS_DENIED,
>and things seem to work.
>
>If this is expected, can someone give me a rational for such
>behavior?
>
>Thanks,
>
>Joseph
>
>—
>Questions? First check the IFS FAQ at
>https://www.osronline.com/article.cfm?id=17
>
>You are currently subscribed to ntfsd as: xxxxx@vandyke.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: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com