aboutsummaryrefslogtreecommitdiff
path: root/lib/libbe
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2019-05-16 02:11:33 +0000
committerKyle Evans <kevans@FreeBSD.org>2019-05-16 02:11:33 +0000
commit88a950762abfc96287e6f2151a8d7f24461ad08f (patch)
tree24fb84a5c06cebe306103ebf13b1050db15013e5 /lib/libbe
parente7e3d5223f98160757c68fd34b0a85932b4d77c8 (diff)
downloadsrc-88a950762abfc96287e6f2151a8d7f24461ad08f.tar.gz
src-88a950762abfc96287e6f2151a8d7f24461ad08f.zip
libbe(3): Descend into children of datasets w/ mountpoint=none
These datasets will generally be canmount=noauto,mountpoint=none (e.g. zroot/var) but have children that may need to be mounted. Instead of skipping that segment for no good reason, descend. Submitted by: Wes Maag Reported by: Wes Maag MFC after: 3 days
Notes
Notes: svn path=/head/; revision=347640
Diffstat (limited to 'lib/libbe')
-rw-r--r--lib/libbe/be_access.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libbe/be_access.c b/lib/libbe/be_access.c
index 741fa925e9dd..d3e415bdbd42 100644
--- a/lib/libbe/be_access.c
+++ b/lib/libbe/be_access.c
@@ -99,13 +99,12 @@ be_mount_iter(zfs_handle_t *zfs_hdl, void *data)
if (strcmp("none", zfs_mnt) == 0) {
/*
* mountpoint=none; we'll mount it at info->mountpoint assuming
- * we're at the root. If we're not at the root... that's less
- * than stellar and not entirely sure what to do with that.
- * For now, we won't treat it as an error condition -- we just
- * won't mount it, and we'll continue on.
+ * we're at the root. If we're not at the root, we're likely
+ * at some intermediate dataset (e.g. zroot/var) that will have
+ * children that may need to be mounted.
*/
if (info->depth > 0)
- return (0);
+ goto skipmount;
snprintf(tmp, BE_MAXPATHLEN, "%s", info->mountpoint);
} else {
@@ -136,6 +135,7 @@ be_mount_iter(zfs_handle_t *zfs_hdl, void *data)
if (!info->deepmount)
return (0);
+skipmount:
++info->depth;
err = zfs_iter_filesystems(zfs_hdl, be_mount_iter, info);
--info->depth;