rename operation consists of these three steps (dirA -> dirB):
irp_mj_create (dirA) with DELETE flag
irp_mj_create (dirB) with SL_OPEN_TARGET_DIRECTORY flag (not dirB is
not accessed - only its parent folder)
irp_mj_set_information (FileRenameInformation class)
So, when you get SL_OPEN_TARGET_DIRECTORY, act as it’s a normal
IRP_MJ_CREATE request and redirect this IRP into your “cache” storage.
Petr
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Tuesday, October 27, 2009 12:36 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Rename problem
Hi guys!
I met a problem.
I am working on a redirect FS minifilter driver, I redirect files and
diectories from system volume to another volume.
It works except rename operation. E.g.:
User mode application rename directory ‘c:\windows\DirA’ to
‘c:\windows\DirB’,
The directory ‘c:\windows\DirA’ is redirected to ‘d:\cache\windows\DirB’,
then iomgr send a create irp with ‘SL_OPEN_TARGET_DIRECTORY’ on to open
‘c:\windows’. I don’t know
which directory (‘c:\windows’ or ‘d:\cache\windows’) it really wants to
open, so I let it passthrough and fs open ‘c:\windows’.
Here Problem comes, the directory to be renamed and the target directory are
not in same volume, so there will be no rename irp. To user mode
application, the rename operation is failed, so it exits.
What could I do to fix this problem?
Any help will be appreciate!
Thanks in advance!
Alex.
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