HomeFreeBSD

Fix snapshot automount race cause EREMOTE

Description

Fix snapshot automount race cause EREMOTE

When a concorrent mount finishes just before calling to
zfsctl_snapshot_ismounted, if we return EISDIR, the VFS will return
with EREMOTE. We should instead just return 0, so VFS may retry and
would likely notice the dentry is alreadly mounted. This will be
inline with when usermode helper return EBUSY.

Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

Details

Provenance
Chunwei Chen <david.chen@osnexus.com>Authored on Dec 11 2015, 11:24 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Dec 14 2015, 8:06 PM
Parents
rG5ed27c572cbb: Change zfs_snapshot_lock from mutex to rw lock
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG199766017076: Fix snapshot automount race cause EREMOTE (authored by Chunwei Chen <david.chen@osnexus.com>).Dec 14 2015, 8:06 PM