rename function and DFS

Hello all -

If I try to rename a file thru explorer (on my drive that is my FSD), and
DFS is running, I get an popup error - “cannot rename ‘filename’ - invalid
MS Dos function”. If I turn off DFS it works correctly. This is on w2k
server with SP2. If I run filemon whilst doing this, I see
IRP_MJ_SET_INFORMATION is issued with a minor function of
FileRenameInformation. This IRP is completed with
‘status_invalid_device_request’ by DFS, but my FSD never sees the request
(I set breakpoints all over the place and my FSD never saw it. The best
that I can tell is that I get the popup sometime after I get a close for
the original file name.

My driver doesn’t support fast io. Is this required for DFS?

Can anyone think of why this is happening?

I was going to apply SP3 to see if that fixes anything.

Any suggestions?

TIA and Regards,

Greg

Ok - I guess all you guys have had this problem before.

So I applied w2k/SP3 and this problem went away!

Hi,
I have faced this problem but never pursued it with Microsoft. What was
observed that IRP_MJ_SET_INFORMATION would go to MS-Dfs driver and
returned with an error. It was strange becoz the other calls would
properly come to our driver.
We just disabled the Dfs drivers. Are you sure Win2K SP3 solves it. Did
you check it by putting break points ?
Thanks,
Amit

The information provided is AS-IS.

Amit -
No, I can’t be certain that SP3 solved the problem because I was doing
some work in this area at the same time and I might have accidentally
fixed it. What I DID discover is that I was improperly re-queueing IRPs
in some circumstances, without locking the user’s buffer into memory. If
you complete a DFS IRP with status_pending and return, without locking,
the buffer may get paged out and is not a valid address. This solved an
“INVALID_USER_BUFFER” problem I was having in Query Directory, which was
not (or should not have been) related to rename. So, I really can’t say
for sure what fixed it; just that it isnt a problem any more!

Sorry I couldn’t help more. Now I’m on to other DFS related problems! If
I figure it out for sure though, I’ll post the solution here.

Greg

Something above the FS issues directory queries to verify existence of a
file. This is done before and after each renaming operation.

----- Original Message -----
From: “Greg Pearce”
To: “File Systems Developers”
Sent: Thursday, November 07, 2002 2:53 PM
Subject: [ntfsd] Re: rename function and DFS

> Amit -
> No, I can’t be certain that SP3 solved the problem because I was doing
> some work in this area at the same time and I might have accidentally
> fixed it. What I DID discover is that I was improperly re-queueing IRPs
> in some circumstances, without locking the user’s buffer into memory. If
> you complete a DFS IRP with status_pending and return, without locking,
> the buffer may get paged out and is not a valid address. This solved an
> “INVALID_USER_BUFFER” problem I was having in Query Directory, which was
> not (or should not have been) related to rename. So, I really can’t say
> for sure what fixed it; just that it isnt a problem any more!
>
> Sorry I couldn’t help more. Now I’m on to other DFS related problems! If
> I figure it out for sure though, I’ll post the solution here.
>
> Greg
>
> —
> You are currently subscribed to ntfsd as: xxxxx@linkwave.org
> To unsubscribe send a blank email to %%email.unsub%%

Thanks makes sense; thanks Tobias.

I was actually witnessing the problem through a path other name rename
(the actual “invalid user buffer”). I got “invalid MS DOS function” on
rename, and I never could find the real error though filemon or windbg.

Thanks again for the clarification…

Greg