STATUS_REPARSE for changing drive/paths on the fly

I read somewhere that STATUS_REPARSE at IRP_MJ_CREATE time can be used to direct a file to another drive and/or path. Can someone clarity if this is possible. Is it simply a matter of changing the object name in the fileObject before returning STATUS_REPARSE or is there more involved, and/or drawbacks ? Any information is appreciated.

Thanks,
Bill

yeah. it is possible and as simple as you have mentioned, provided the fileobject->RelatedFileObject != NULL. Once I designed a filter driver ignorant of this and ended up changing my whole design after my initial working prototype !! because there is really no GOOD work around for this problem. it was in NT 4.0 i dunno about W2K

regds
-------- alexander suresh

----- Original Message -----
From: Bill
To: File Systems Developers
Sent: Monday, May 01, 2000 11:17 AM
Subject: [ntfsd] STATUS_REPARSE for changing drive/paths on the fly

I read somewhere that STATUS_REPARSE at IRP_MJ_CREATE time can be used to direct a file to another drive and/or path. Can someone clarity if this is possible. Is it simply a matter of changing the object name in the fileObject before returning STATUS_REPARSE or is there more involved, and/or drawbacks ? Any information is appreciated.

Thanks,
Bill

set iosb->Status = IO_REPARSE

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Bill
Sent: Monday, May 01, 2000 8:17 AM
To: File Systems Developers
Subject: [ntfsd] STATUS_REPARSE for changing drive/paths on the fly

I read somewhere that STATUS_REPARSE at IRP_MJ_CREATE time can be used to
direct a file to another drive and/or path. Can someone clarity if this is
possible. Is it simply a matter of changing the object name in the
fileObject before returning STATUS_REPARSE or is there more involved, and/or
drawbacks ? Any information is appreciated.

Thanks,
Bill

The routine from which come IRP_MJ_CREATE to your drive is IopParseDevice.

Short code look like this:

NTSTATUS
IopParseDevice (
…,
IN OUT PUNICODE_STRING CompleteName,

)
{
NTSTATUS Status;
IO_STATUS_BLOCK Iosb;
…;

Remount:;
…;

Status = IoCallDriver(DeviceObject, Irp)
//IRP_MJ_CREATE
…;

if (Status == STATUS_REPARSE)
{
if (Iosb.Information == IO_REPARSE)
{
…;
RtlCopyUnicodeString(CompleteName,
&FileObject->FileName);
}

…;

if (Iosb.Information == IO_REPARSE)
{
return STATUS_REPARSE;
}

else
{
goto Remount;
}
}

…;
}

If your code returns STATUS_REPARSE:

  1. if Information is IO_REPARSE the I/O manager should copy the full path
    (from the Object Manager’s root) to the CompletePath and return
    STATUS_REPARSE
    to Object Manager. Object Manager then starts path parsing at the root.
    This should be useful eg. for MUP which replaces the full path by the
    registered
    redirector’s path.

  2. if Information is IO_REMOUNT the I/O Manager will undo its work and
    execution
    starts again from the begin of IopParseDevice.
    This case is useful when in the middle of processing create request
    there is a volume
    verify which does volume unmount. In this case the FSD requests the I/O
    Manager to
    reprocess this request to the newly mounted volume device object.

-----P?vodn? zpr?va-----
Od: Bill [SMTP:xxxxx@optonline.net]
Odesl?no: 1. kv?tna 2000 17:17
Komu: File Systems Developers
P?edm?t: [ntfsd] STATUS_REPARSE for changing drive/paths on the fly

I read somewhere that STATUS_REPARSE at IRP_MJ_CREATE time can be used to
direct a file to another drive and/or path. Can someone clarity if this is
possible. Is it simply a matter of changing the object name in the
fileObject before returning STATUS_REPARSE or is there more involved,
and/or drawbacks ? Any information is appreciated.

Thanks,
Bill

That’s all there is to it?

Thanks for the reply.
----- Original Message -----
From: Jamey Kirby
To: File Systems Developers
Sent: Monday, May 01, 2000 11:50 AM
Subject: [ntfsd] RE: STATUS_REPARSE for changing drive/paths on the fly

set iosb->Status = IO_REPARSE

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]On Behalf Of Bill
Sent: Monday, May 01, 2000 8:17 AM
To: File Systems Developers
Subject: [ntfsd] STATUS_REPARSE for changing drive/paths on the fly

I read somewhere that STATUS_REPARSE at IRP_MJ_CREATE time can be used to direct a file to another drive and/or path. Can someone clarity if this is possible. Is it simply a matter of changing the object name in the fileObject before returning STATUS_REPARSE or is there more involved, and/or drawbacks ? Any information is appreciated.

Thanks,
Bill

Sorry, iosb->Information = IO_REPARSE.

I gave you the wrong field.

Jamey
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Bill
Sent: Tuesday, May 02, 2000 11:18 AM
To: File Systems Developers
Subject: [ntfsd] RE: STATUS_REPARSE for changing drive/paths on the fly

That’s all there is to it?

Thanks for the reply.
----- Original Message -----
From: Jamey Kirby
To: File Systems Developers
Sent: Monday, May 01, 2000 11:50 AM
Subject: [ntfsd] RE: STATUS_REPARSE for changing drive/paths on the fly

set iosb->Status = IO_REPARSE

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Bill
Sent: Monday, May 01, 2000 8:17 AM
To: File Systems Developers
Subject: [ntfsd] STATUS_REPARSE for changing drive/paths on the fly

I read somewhere that STATUS_REPARSE at IRP_MJ_CREATE time can be used
to direct a file to another drive and/or path. Can someone clarity if this
is possible. Is it simply a matter of changing the object name in the
fileObject before returning STATUS_REPARSE or is there more involved, and/or
drawbacks ? Any information is appreciated.

Thanks,
Bill

Where is IO_REPARSE defined, it does not appear in the DDK ?
----- Original Message -----
From: Jamey Kirby
To: File Systems Developers
Sent: Tuesday, May 02, 2000 5:29 PM
Subject: [ntfsd] RE: STATUS_REPARSE for changing drive/paths on the fly

Sorry, iosb->Information = IO_REPARSE.

I gave you the wrong field.

Jamey
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]On Behalf Of Bill
Sent: Tuesday, May 02, 2000 11:18 AM
To: File Systems Developers
Subject: [ntfsd] RE: STATUS_REPARSE for changing drive/paths on the fly

That’s all there is to it?

Thanks for the reply.
----- Original Message -----
From: Jamey Kirby
To: File Systems Developers
Sent: Monday, May 01, 2000 11:50 AM
Subject: [ntfsd] RE: STATUS_REPARSE for changing drive/paths on the fly

set iosb->Status = IO_REPARSE

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]On Behalf Of Bill
Sent: Monday, May 01, 2000 8:17 AM
To: File Systems Developers
Subject: [ntfsd] STATUS_REPARSE for changing drive/paths on the fly

I read somewhere that STATUS_REPARSE at IRP_MJ_CREATE time can be used to direct a file to another drive and/or path. Can someone clarity if this is possible. Is it simply a matter of changing the object name in the fileObject before returning STATUS_REPARSE or is there more involved, and/or drawbacks ? Any information is appreciated.

Thanks,
Bill

On Tue, 2 May 2000, Bill wrote:

Where is IO_REPARSE defined, it does not appear in the DDK ?

It’s in the Windows 2000 DDK:

d:\ntDDK\inc\ddk\ntddk.h(12852):#define IO_REPARSE 0x0

Bo Branten