Hello Everyone:
In my filter, I want to get the disk offset. Are there any solutions?
Thanks…
Sorry, but above the FSD is the wrong level at which to be asking disk
layout questions - I can create scenarios in which you ask and then the
FSD changes it (reallocates). From below, you lose the file specific
association.
If you want to know where things are located in the volume, you need to
be the file system. Anything else is at best an approximation of
correctness (since it will be wrong sometimes.)
If you describe the problem that you are trying to solve, we might be
able to suggest some alternative solutions as well.
Tony
Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com
Hi Tony:
Thanks for your suggestion. In my filter, I have a MetaData List which stores the files name. When a write/read IRP comes, if the file name of which is in the list, I will build a SCSI command to rdr the data buffer to remote target disks(which are RAID0 or RAID1). So I must set the start block number in SCSI cmd struct.
Way too many problems with this approach even if you could get the disk
offset:
- Open by ID (file and object)
- Inline (in the MFT) files
- Conversion between compressed/uncompressed files
- Sparse files
- Hard links
But ignoring those issues, you can always just ask NTFS where the blocks
are located at that moment - that information is part of the
defragmentation API. Ensuring that nothing else comes along to change
that while you are operating with the information is an exercise left to
the (brave) reader.
Tony
Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Sunday, November 19, 2006 10:33 AM
To: ntfsd redirect
Subject: RE:[ntfsd] How to get the disk offset in my Filter?
Hi Tony:
Thanks for your suggestion. In my filter, I have a MetaData List
which stores the files name. When a write/read IRP comes, if the file
name of which is in the list, I will build a SCSI command to rdr the
data buffer to remote target disks(which are RAID0 or RAID1). So I must
set the start block number in SCSI cmd struct.
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
Hi Tony:
Could a low-level fileSystem filter help me get more information about low layer device information? If I do this, will the fileObject create by filesystem be freed? Thanks !
I don’t see how a lower level filter is going to help you, since the I/O
that is done at higher level may be done using a different file object
than the lower level.
Tony
Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Tuesday, November 21, 2006 1:43 AM
To: ntfsd redirect
Subject: RE:[ntfsd] How to get the disk offset in my Filter?
Hi Tony:
Could a low-level fileSystem filter help me get more information
about low layer device information? If I do this, will the fileObject
create by filesystem be freed? Thanks !
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