freebsd-dev/module
Chunwei Chen d287880afd 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 <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #4018
2015-11-19 15:36:59 -08:00
..
avl Support parallel build trees (VPATH builds) 2015-07-17 13:42:51 -07:00
nvpair Support parallel build trees (VPATH builds) 2015-07-17 13:42:51 -07:00
unicode Support parallel build trees (VPATH builds) 2015-07-17 13:42:51 -07:00
zcommon Fix uioskip crash when skip to end 2015-09-29 10:06:58 -07:00
zfs Fix snapshot automount behavior when concurrent or fail 2015-11-19 15:36:59 -08:00
zpios Add large block support to zpios(1) benchmark 2015-09-22 09:13:20 -07:00
.gitignore gitignore: anchor entries at their respective directory 2013-04-02 10:50:17 -07:00
Makefile.in Support parallel build trees (VPATH builds) 2015-07-17 13:42:51 -07:00