diff options
author | Chunwei Chen <[email protected]> | 2015-11-16 16:39:52 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-11-19 15:36:59 -0800 |
commit | d287880afd843bd8c0cbcabe514b65083d1a0090 (patch) | |
tree | 09baed813f48e8509c4b1f5d672bbec90bbeb000 /module/zfs/fm.c | |
parent | 5c790678f1a5231b75be174eb8a02e15dfe9b4d5 (diff) |
Fix snapshot automount behavior when concurrent or fail
When concurrent threads accessing the snapdir, one will succeed the user
helper mount while others will get EBUSY. However, the original code treats
those EBUSY threads as success and goes on to do zfsctl_snapshot_add, which
causes repeated avl_add and thus panic.
Also, if the snapshot is already mounted somewhere else, a thread accessing
the snapdir will also get EBUSY from user helper mount. And it will cause
strange things as doing follow_down_one will fail and then follow_up will jump
up to the mountpoint of the filesystem and confuse the hell out of VFS.
The patch fix both behavior by returning 0 immediately for the EBUSY threads.
Note, this will have a side effect for the second case where the VFS will
retry several times before returning ELOOP.
Signed-off-by: Chunwei Chen <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #4018
Diffstat (limited to 'module/zfs/fm.c')
0 files changed, 0 insertions, 0 deletions