get the sector and track number of a file operation?

hi all:

for some days i think about the question below,but does not have the
answer.
in the famous “filemon”,we can get the pathname of a file operation,but
how can i get the sector number and track number of a file operation,and if
i want to forbid some tracks or sectors write or read, how could i do?


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> in the famous “filemon”,we can get the pathname of a file operation,but

how can i get the sector number and track number of a file operation,and
if

Use FSCTL_GET_RETRIEVAL_POINTERS to determine what disk sectors are covered
by the particular file.
Forget about “track number” at all. Both NT disk stack and modern drive
hardware use LBA addressing.

i want to forbid some tracks or sectors write or read, how could i do?

Write a disk filter driver.
BTW - be sure you will have “Lost Delayed Write Data” popup if you will fail
writes at this level.

Max


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

In this particular case, you should probably ask “here is what I am trying
to do, what is the best way to accomplish it” rather than “here is the
solution I’ve chosen, how do I implement it.”

If you wish to prohibit activity based upon the physical disk location,
better to write a filter driver for the partition manager or disk class
driver. If you wish to prohibit activity based upon the logical storage
layout (e.g., the file system) then you would build a file system filter
driver.

While it is possible to extract disk location information from the FSD
(witness the two FSCTL calls, one for the paging file -
FSCTL_QUERY_RETRIEVAL_POINTERS, the other for other files
FSCTL_GET_RETRIEVAL_POINTERS,) that doesn’t make it simple to map FROM the
disk block to the file with data stored within that disk block.

Also, there are operations that the FSD performs that will cause relocation
of the data blocks to alternative locations on the disk (e.g., compression
of files on NTFS.)

Regards,

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: yfmail@163.net [mailto:yfmail@163.net]
Sent: Tuesday, April 24, 2001 2:30 AM
To: File Systems Developers
Subject: [ntfsd] get the sector and track number of a file operation?

hi all:

for some days i think about the question below,but does not have the
answer.
in the famous “filemon”,we can get the pathname of a file operation,but
how can i get the sector number and track number of a file operation,and if
i want to forbid some tracks or sectors write or read, how could i do?


You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com