Skip to contentSkip to conversation

lookup() on non-directories.

DISCUSSION Frank van Maarseveen 1 participant 1 message Sep 1, 2004

lore
Share & tools
lore
#0 lore raw

The reiserfs4 and openat() discussion made me thinking. This is different:

* /dev/hda1 -> /dev/hda/1
=> /dev/hda/1 causes a lookup in the partition table of /dev/hda

* /dev/hda/1/. is a "root inode lookup" in the superblock inside /dev/hda/1: no explicit mount/umount but just the usual refcounting. File system type? the kernel already knows about this stuff: needed for mounting the root-fs. /dev/hda/1 need not be a special file.

* /usr/X11R6/bin/xterm/... ?
Kernel has some knowledge about ELF (fs/binfmt_*) so this could mean something.

So what's the concept?

lookup() on files are just _interpretations_ of the file based on knowledge the kernel already has. Interpretations might require access( , X_OK) == 0 for sanity (in addition to R_OK and/or W_OK).

This way, user mounts/automounter would no longer be a requirement for the user in order to get access to the usual things like USB storage, CDROM, DVD, or images of those.

yes I know, this does not address the samba or reiserfs4 issues: openat() name space now becomes orthogonal.

Signature · 1 line
Frank