Wizard-level questions
Gene Spafford
spaf at cs.purdue.EDU
Thu Jan 31 17:46:24 AEST 1991
In article <3330 at unisoft.UUCP> greywolf at unisoft.UUCP (The Grey Wolf) writes:
>But one I've been wondering about is, why not an istat(dev, ino, statbuf)
>call?
Well, ignoring the question of *why* you would want such a call, it
is not too difficult to write such a beast that root can use.
See, you open the raw device (not the block) associated with the
disk, read in the appropriate inode, and.....you get the idea.
The kernel filesystem is there to provide you some services, to wit:
* device-independent I/O operations
* name to location lookup and binding
* buffered I/O for better performance
* security checks
* some consistency control
Mucking with direct i-node numbers, even read-only, violates a couple
of those ideas, so you have to go through the motions yourself.
It isn't all that difficult, but the result is of questionable
usefulness.
Of course, this only works for local disks. If you are using a remote
file systems for the device, have fun :-)
--
Gene Spafford
NSF/Purdue/U of Florida Software Engineering Research Center,
Dept. of Computer Sciences, Purdue University, W. Lafayette IN 47907-2004
Internet: spaf at cs.purdue.edu phone: (317) 494-7825
More information about the Comp.unix.internals
mailing list