]> granicus.if.org Git - zfs/commit
Let zfs mount all tolerate in-progress mounts
authorDon Brady <don.brady@delphix.com>
Sat, 22 Jun 2019 23:41:21 +0000 (16:41 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Sat, 22 Jun 2019 23:41:21 +0000 (16:41 -0700)
commita9cd8bfde73a78a0ba02e25b712fe28d11019191
treeadec993bdaa74a2cc43ce5624395efef737b7b0d
parentfb6e6f1ffb2aa18711c8c3c825c1090bd97561f0
Let zfs mount all tolerate in-progress mounts

The zfs-mount service can unexpectedly fail to start when zfs
encounters a mount that is in progress. This service uses
zfs mount -a, which has a window between the time it checks if
the dataset was mounted and when the actual mount (via mount.zfs
binary) occurs.

The reason for the racing mounts is that both zfs-mount.target
and zfs-share.target are allowed to execute concurrently after
the import.  This is more of an issue with the relatively recent
addition of parallel mounting, and we should consider serializing
the mount and share targets.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Allan Jude <allanjude@freebsd.org>
Signed-off-by: Don Brady <don.brady@delphix.com>
Closes #8881
cmd/zfs/zfs_main.c