Re: fs inode lookup

Jan Kara (jack@atrey.karlin.mff.cuni.cz)
Tue, 17 Nov 1998 13:19:11 +0100


Hello.
>
> For consistency checks in RSBAC I am looking for a way to lookup (or at
> least check existence of) fs inodes on devices.
>
> Currently only kdev number and inode number are available. kdev leads
> easily to superblock and fs root dentry, inode number leads me nowhere.
How :?)

> So my questions are:
>
> 1. Is there any generic way using vfs? I didn't find any...
I don't know any. You can only read inode using iget() and then determine
somehow whether it is deleted (in ext2 using dtime would be enough IMHO).
> 2. If not, is there an official way for ext2 (and hopefully others)?
Another reliable way for ext2 would be to use its library for manipulating
with filesystem (it is in package e2fsprogs...).

Nice hacking. Honza.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/