diff options
author | Low-power <[email protected]> | 2024-08-24 01:39:09 +0800 |
---|---|---|
committer | GitHub <[email protected]> | 2024-08-23 10:39:09 -0700 |
commit | 34118eac06fba834f0c934419aec1b386c98665a (patch) | |
tree | b3a6ccc8a273bb7c4ed1907a365866e0cb94f58d /CODE_OF_CONDUCT.md | |
parent | cb36f4f3529473d977189010f41b9a98c644d2d3 (diff) |
Make mount.zfs(8) calling zfs_mount_at for legacy mounts as well
Commit 329e2ffa4bca456e65c3db7f5c5c04931c551b61 has made mount.zfs(8) to
call libzfs function 'zfs_mount_at', in order to propagate dataset
properties into mount options. This fix however, is limited to a special
use case where mount.zfs(8) is used in initrd with option '-o zfsutil'.
If either initrd or the user need to use mount.zfs(8) to mount a file
system with 'mountpoint' set to 'legacy', '-o zfsutil' can't be used and
the original issue #7947 will still happen.
Since the existing code already excluded the possibility of calling
'zfs_mount_at' when it was invoked as a helper program from zfs(8), by
checking 'ZFS_MOUNT_HELPER' environment variable, it makes no sense to
avoid calling 'zfs_mount_at' without '-o zfsutil'.
An exception however, is when mount.zfs(8) was invoked with '-o remount'
to update the mount options for an existing mount point. In this case
call mount(2) directly without modifying the mount options passed from
command line.
Furthermore, don't run mount.zfs(8) helper for automounting snapshot.
The above change to make mount.zfs(8) to call 'zfs_mount_at'
apparently caused it to trigger an automount for the snapshot
directory. When the helper was invoked as a result of a snapshot
automount, an infinite recursion will occur.
Since the need of invoking user mode mount(8) for automounting was to
overcome that the 'vfs_kern_mount' being GPL-only, just run mount(8)
without the mount.zfs(8) helper by adding option '-i'.
Reviewed-by: Umer Saleem <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: WHR <[email protected]>
Closes #16393
Diffstat (limited to 'CODE_OF_CONDUCT.md')
0 files changed, 0 insertions, 0 deletions