Redirecting FILE_OPEN_BY_FILE_ID to another volume

I need to redirect a request to open a file by id to another volume. I
already have requests using the name being redirected using
STATUS_REPARSE. I cant figure out what needs to be modified to do this.
I have tried returning STATUS_REPARSE with IO_REMOUNT, but I get called
again. I also saw STATUS_REPARSE_OBJECT which looked promising, but it
still ends up calling me on the original volume. I have tried setting
IrpSp->FileObject->DeviceObject and Irp->DeviceObject to the top of the
stack of the volume I want to redirect to. Also what do I do with the
FileObject->RelatedFileObject in this case?

I don’t believe I can use STATUS_REPARSE as it expects a path to be
returned and while I can get the name of the target volume, I cant get
the name of the file (I’ve read the messages on this recently).

Any pointers in the right direction?

Thanks,

Rob

I need to redirect a request to open a file by id to another volume. I
already have requests using the name being redirected using
STATUS_REPARSE. I cant figure out what needs to be modified to do this.
I have tried returning STATUS_REPARSE with IO_REMOUNT, but I get called
again. I also saw STATUS_REPARSE_OBJECT which looked promising, but it
still ends up calling me on the original volume. I have tried setting
IrpSp->FileObject->DeviceObject and Irp->DeviceObject to the top of the
stack of the volume I want to redirect to. Also what do I do with the
FileObject->RelatedFileObject in this case?

I don’t believe I can use STATUS_REPARSE as it expects a path to be
returned and while I can get the name of the target volume, I cant get
the name of the file (I’ve read the messages on this recently).

Any pointers in the right direction?

Thanks,

Rob

if i am not wrong, fileids are file system dependent. so i don’t think the a fileid for one volume is the same for another. btw, did u also redirect the query fileinternalinformation request?

Ampsi

----- Original Message -----
From: Rob Green
To: File Systems Developers
Sent: Friday, March 28, 2003 08:35
Subject: [ntfsd] Redirecting FILE_OPEN_BY_FILE_ID to another volume

–>
I need to redirect a request to open a file by id to another volume. I already have requests using the name being redirected using STATUS_REPARSE. I cant figure out what needs to be modified to do this. I have tried returning STATUS_REPARSE with IO_REMOUNT, but I get called again. I also saw STATUS_REPARSE_OBJECT which looked promising, but it still ends up calling me on the original volume. I have tried setting IrpSp->FileObject->DeviceObject and Irp->DeviceObject to the top of the stack of the volume I want to redirect to. Also what do I do with the FileObject->RelatedFileObject in this case?

I don’t believe I can use STATUS_REPARSE as it expects a path to be returned and while I can get the name of the target volume, I cant get the name of the file (I’ve read the messages on this recently).

Any pointers in the right direction?

Thanks,

Rob


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

I maintain a id to id mapping, and as part of the handling in
FileInternalInformation I change it to the new file id.

Rob

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ampsi
Sent: Thursday, March 27, 2003 8:10 PM
To: File Systems Developers
Subject: [ntfsd] Re: Redirecting FILE_OPEN_BY_FILE_ID to another volume

if i am not wrong, fileids are file system dependent. so i don’t think
the a fileid for one volume is the same for another. btw, did u also
redirect the query fileinternalinformation request?

Ampsi

----- Original Message -----

From: Rob Green mailto:xxxxx

To: File Systems mailto:xxxxx Developers

Sent: Friday, March 28, 2003 08:35

Subject: [ntfsd] Redirecting FILE_OPEN_BY_FILE_ID to another volume

–>

I need to redirect a request to open a file by id to another volume. I
already have requests using the name being redirected using
STATUS_REPARSE. I cant figure out what needs to be modified to do this.
I have tried returning STATUS_REPARSE with IO_REMOUNT, but I get called
again. I also saw STATUS_REPARSE_OBJECT which looked promising, but it
still ends up calling me on the original volume. I have tried setting
IrpSp->FileObject->DeviceObject and Irp->DeviceObject to the top of the
stack of the volume I want to redirect to. Also what do I do with the
FileObject->RelatedFileObject in this case?

I don’t believe I can use STATUS_REPARSE as it expects a path to be
returned and while I can get the name of the target volume, I cant get
the name of the file (I’ve read the messages on this recently).

Any pointers in the right direction?

Thanks,

Rob


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


You are currently subscribed to ntfsd as: xxxxx@cdp.com
To unsubscribe send a blank email to xxxxx@lists.osr.com</mailto:xxxxx></mailto:xxxxx>

Bob,

Try this in your create dispatch routine:

Irp->IoStatus.Information = IO_REPARSE;
free the old buffer in IrpSp->FileObject->FileName;
set the new full qualified file name such as ??\d:\dir\fn.xx to
IrpSp->FileObject->FileName;
return STATUS_REPARSE;

Shangwu

“Rob Green” wrote in message news:xxxxx@ntfsd…
I need to redirect a request to open a file by id to another volume. I
already have requests using the name being redirected using STATUS_REPARSE.
I cant figure out what needs to be modified to do this. I have tried
returning STATUS_REPARSE with IO_REMOUNT, but I get called again. I also
saw STATUS_REPARSE_OBJECT which looked promising, but it still ends up
calling me on the original volume. I have tried setting
IrpSp->FileObject->DeviceObject and Irp->DeviceObject to the top of the
stack of the volume I want to redirect to. Also what do I do with the
FileObject->RelatedFileObject in this case?

I don’t believe I can use STATUS_REPARSE as it expects a path to be returned
and while I can get the name of the target volume, I cant get the name of
the file (I’ve read the messages on this recently).

Any pointers in the right direction?

Thanks,
Rob

Call the FSD below you to get the fullname based on the ID and then
reparse to the name.

Looks like you are working on a NT Volume Snapshot driver :slight_smile:

Jamey

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Rob Green
Sent: Thursday, March 27, 2003 4:35 PM
To: File Systems Developers
Subject: [ntfsd] Redirecting FILE_OPEN_BY_FILE_ID to another volume

I need to redirect a request to open a file by id to another volume. I
already have requests using the name being redirected using
STATUS_REPARSE. I cant figure out what needs to be modified to do this.
I have tried returning STATUS_REPARSE with IO_REMOUNT, but I get called
again. I also saw STATUS_REPARSE_OBJECT which looked promising, but it
still ends up calling me on the original volume. I have tried setting
IrpSp->FileObject->DeviceObject and Irp->DeviceObject to the top of the
stack of the volume I want to redirect to. Also what do I do with the
FileObject->RelatedFileObject in this case?

I don’t believe I can use STATUS_REPARSE as it expects a path to be
returned and while I can get the name of the target volume, I cant get
the name of the file (I’ve read the messages on this recently).

Any pointers in the right direction?

Thanks,

Rob


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

I think he knows this; what about open by ID where he has no name.

Jamey

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Shangwu Qi
Sent: Friday, March 28, 2003 6:34 AM
To: File Systems Developers
Subject: [ntfsd] Re: Redirecting FILE_OPEN_BY_FILE_ID to another volume

Bob,

Try this in your create dispatch routine:

Irp->IoStatus.Information = IO_REPARSE;
free the old buffer in IrpSp->FileObject->FileName;
set the new full qualified file name such as ??\d:\dir\fn.xx to
IrpSp->FileObject->FileName;
return STATUS_REPARSE;

Shangwu

“Rob Green” wrote in message news:xxxxx@ntfsd…
I need to redirect a request to open a file by id to another volume. I
already have requests using the name being redirected using
STATUS_REPARSE.
I cant figure out what needs to be modified to do this. I have tried
returning STATUS_REPARSE with IO_REMOUNT, but I get called again. I
also
saw STATUS_REPARSE_OBJECT which looked promising, but it still ends up
calling me on the original volume. I have tried setting
IrpSp->FileObject->DeviceObject and Irp->DeviceObject to the top of the
stack of the volume I want to redirect to. Also what do I do with the
FileObject->RelatedFileObject in this case?

I don’t believe I can use STATUS_REPARSE as it expects a path to be
returned
and while I can get the name of the target volume, I cant get the name
of
the file (I’ve read the messages on this recently).

Any pointers in the right direction?

Thanks,
Rob


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