]> git.proxmox.com Git - mirror_zfs.git/commit
Handle concurrent snapshot automounts failing due to EBUSY.
authorTim Chase <tim@chase2k.com>
Thu, 7 Nov 2013 05:55:18 +0000 (23:55 -0600)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 8 Nov 2013 18:45:14 +0000 (10:45 -0800)
commitfd4f76160cb34539f875781fe7f2dea4b937ace5
tree8fa4db23f72a58b049f53973f839a28793e2828e
parentb1d13a60d12a7df0f2e1bed6405529790213a6cb
Handle concurrent snapshot automounts failing due to EBUSY.

In the current snapshot automount implementation, it is possible for
multiple mounts to attempted concurrently.  Only one of the mounts will
succeed and the other will fail.  The failed mounts will cause an EREMOTE
to be propagated back to the application.

This commit works around the problem by adding a new exit status,
MOUNT_BUSY to the mount.zfs program which is used when the underlying
mount(2) call returns EBUSY.  The zfs code detects this condition and
treats it as if the mount had succeeded.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #1819
cmd/mount_zfs/mount_zfs.c
lib/libspl/include/sys/mntent.h
lib/libzfs/libzfs_mount.c
module/zfs/zfs_ctldir.c