forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
btrfs: use automount to bind-mount all subvol roots.
All subvol roots are now marked as automounts. If the d_automount() function determines that the dentry is not the root of the vfsmount, it creates a simple loop-back mount of the dentry onto itself. If it determines that it IS the root of the vfsmount, it returns -EISDIR so that no further automounting is attempted. btrfs_getattr pays special attention to these automount dentries. If it is NOT the root of the vfsmount: - the ->dev is reported as that for the rest of the vfsmount - the ->ino is reported as the subvol objectid, suitable transformed to avoid collision. This way the same inode appear to be different depending on which mount it is in. automounted vfsmounts are kept on a list and timeout after 500 to 1000 seconds of last use. This is configurable via a module parameter. The tracking and timeout of automounts is copied from NFS. Signed-off-by: NeilBrown <neilb@suse.de>
- Loading branch information
1 parent
a763d20
commit 5874902
Showing
3 changed files
with
111 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters