Forget about files for the moment, because directories are fundamentally
easier to deal with.

 

Let's suppose I've got the inode number of some directory in the present
filesystem.

[r...@filer ~]# ls -id /share/projects/foo/goo/rev1.0/working

     14363 /share/projects/foo/goo/rev1.0/working/

 

I want to identify the previous names & locations of that directory from
snapshots.

find /share/.zfs/snapshot -inum 14363

 

And I want to do it fast.  I don't want to use "find" or anything else that
needs to walk every tree of every snapshot.  The answer needs to be
essentially zero-time, just like the "ls -id" is essentially zero-time.

 

I understand you cannot lookup names by inode number in general, because
that would present a security violation.  Joe User should not be able to
find the name of an item that's in a directory where he does not have
permission.

 

But, even if it can only be run by root, is there some way to lookup the
name of an object based on inode number?

_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to