Cc: Linus Torvalds <torvalds@...>, Christoph Hellwig <hch@...>, Hans Reiser <reiser@...>, <linux-fsdevel@...>, <linux-kernel@...>, Alexander Lyamin aka FLX <flx@...>, ReiserFS List <reiserfs-list@...>
Is this a problem if we treat entering a file-as-directory as crossing
a mount point (i.e. like auto-mounting)?
Simply doing a path walk would lock the file and then cross the mount
point to a directory.
A way to ensure that preserves the lock order is to require that the
metadata is in a different filesystem to its file (i.e. not crossing a
bind mount to the same filesystem).
That has the side effect of preventing hard links between metadata
files and non-metadata, which in my opinion is fine.
Path walking will lock the file, and then lock the directory on a
different filesystem. Lock order is still safe, provided a strict
order is maintained between the two filesystems.
The strict order is ensured by preventing bind mounts which create a
path cycle containing a file->metadata edge. One way to ensure that
is to prevent mounts on the metadata filesystems, but the rule doesn't
have to be that strict. This condition only needs to be checked in
the mount() syscall.
-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html