Re: silent semantic changes with reiser4
From: Linus Torvalds
Date: Thu Aug 26 2004 - 13:39:21 EST
On Thu, 26 Aug 2004, Jamie Lokier wrote:
>
> > .. but even if it did that, it should use O_DIRECTORY when it did so. If
> > it doesn't, it's broken.
>
> Didn't someone just say that O_DIRECTORY will succeed on a device,
> precisely because opendir() is supposed to succeed on the device?
It will succeed on the _name_ of the device, but it won't open the device
node. It would open the _directory_ node associated with that name.
Think of it this way: a pathname always points to one "container". That
container is either a directory or a single node - and O_DIRECTORY ends up
being the thing that chooses between them.
> > I don't think you can do that. The kernel has no idea how to mount the
> > filesystem.
>
> It is not the kernel which decides. The filesystem containing
> /dev/hda/part1 opens "the directory branch".
But that filesystem cannot know what the _other_ filesystem configurations
are. And that's what you'd have to have to mount.
> The obvious implementation has the userspace helper just mounting it,
> end of story. If the mount command fails, it fails. Much like autofs.
Yes, that would work, but it's of questionable use. If you want autofs,
then just _use_ autofs.
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/