]> granicus.if.org Git - zfs/commit
Race between zfs-share and zfs-mount services
authorGeorge Wilson <george.wilson@delphix.com>
Mon, 29 Jul 2019 01:13:56 +0000 (21:13 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 29 Jul 2019 01:13:56 +0000 (18:13 -0700)
commit453bb4791e7d0479643ce340818106ab878b562b
treebb59b5f3c06d01e411fb612437f1ebb44053e0f7
parent693c1fc478cc8118dd0168c4815c0ae3be41c9c3
Race between zfs-share and zfs-mount services

When a system boots the zfs-mount.service and the
zfs-share.service can start simultaneously. What may be
unclear is that sharing a filesystem will first mount
the filesystem if it's not already mounted. This means
that both service can race to mount the same fileystem.
This race can result in a SEGFAULT or EBUSY conditions.

This change explicitly defines the start ordering between the
two services such that the zfs-mount.service is solely
responsible for mounting filesystems eliminating the race
between "zfs mount -a" and "zfs share -a" commands.

Reviewed-by: Sebastien Roy <sebastien.roy@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Wilson <george.wilson@delphix.com>
Closes #9083
etc/systemd/system/zfs-share.service.in