From 453bb4791e7d0479643ce340818106ab878b562b Mon Sep 17 00:00:00 2001 From: George Wilson Date: Sun, 28 Jul 2019 21:13:56 -0400 Subject: 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 Reviewed-by: Brian Behlendorf Signed-off-by: George Wilson Closes #9083 --- etc/systemd/system/zfs-share.service.in | 1 + 1 file changed, 1 insertion(+) (limited to 'etc/systemd/system') diff --git a/etc/systemd/system/zfs-share.service.in b/etc/systemd/system/zfs-share.service.in index 75ff6e946..5f4ba411b 100644 --- a/etc/systemd/system/zfs-share.service.in +++ b/etc/systemd/system/zfs-share.service.in @@ -5,6 +5,7 @@ After=nfs-server.service nfs-kernel-server.service After=smb.service Before=rpc-statd-notify.service Wants=zfs-mount.service +After=zfs-mount.service PartOf=nfs-server.service nfs-kernel-server.service PartOf=smb.service -- cgit v1.2.3