mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-04-06 17:49:11 +03:00
Skip ctldir znode in zfs_rezget to fix snapdir issues
Skip ctldir in zfs_rezget, otherwise they will always get invalidated. This will cause funny behaviour for the mounted snapdirs. Especially for Linux >= 3.18, d_invalidate will detach the mountpoint and prevent anyone automount it again as long as someone is still using the detached mount. Signed-off-by: Chunwei Chen <david.chen@osnexus.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #4514 Closes #4661 Closes #4672
This commit is contained in:
parent
de0ef912ec
commit
cbecb4fb22
@ -1167,6 +1167,16 @@ zfs_rezget(znode_t *zp)
|
|||||||
uint64_t gen;
|
uint64_t gen;
|
||||||
znode_hold_t *zh;
|
znode_hold_t *zh;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* skip ctldir, otherwise they will always get invalidated. This will
|
||||||
|
* cause funny behaviour for the mounted snapdirs. Especially for
|
||||||
|
* Linux >= 3.18, d_invalidate will detach the mountpoint and prevent
|
||||||
|
* anyone automount it again as long as someone is still using the
|
||||||
|
* detached mount.
|
||||||
|
*/
|
||||||
|
if (zp->z_is_ctldir)
|
||||||
|
return (0);
|
||||||
|
|
||||||
zh = zfs_znode_hold_enter(zsb, obj_num);
|
zh = zfs_znode_hold_enter(zsb, obj_num);
|
||||||
|
|
||||||
mutex_enter(&zp->z_acl_lock);
|
mutex_enter(&zp->z_acl_lock);
|
||||||
|
Loading…
Reference in New Issue
Block a user