Re: [PATCH] isofs: mounting to regular file may succeed

From: Al Viro
Date: Tue Jul 17 2007 - 03:46:03 EST


On Tue, Jul 17, 2007 at 12:04:07AM -0700, Andrew Morton wrote:

> I don't think any (all?) other filesystems perform checks like this.
> Is this something which can/should be performed at the VFS level?

I don't see why we _should_ check that; VFS checks that we don't
turn directory into non-directory and vice versa, same as for binding.
There is no reason why fs driver could not give you a single-node filesystem
with root being e.g. a block device node. You could mount it on any
non-directory and get a block device seen there, etc.

IOW, if filesystem driver considers fs image it's working from
as invalid, it's up to filesystem driver. _What_ is considered invalid
depends on fs type; what the driver cares to report as dubious is, again,
up to driver. If isofs wants to warn about an ISO image that definitely
violates ISO9660, it's isofs decision. VFS will work with it as long
as fs driver does...
-
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/