mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Use spa as key besides objsetid for snapentry
objsetid is not unique across pool, so using it solely as key would cause panic when automounting two snapshot on different pools with the same objsetid. We fix this by adding spa pointer as additional key. Signed-off-by: Chunwei Chen <david.chen@osnexus.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Richard Yao <ryao@gentoo.org> Issue #3948 Issue #3786 Issue #3887
This commit is contained in:
committed by
Brian Behlendorf
parent
b58986eebf
commit
24ef51f660
@@ -28,6 +28,7 @@
|
||||
#include <sys/zfs_vfsops.h>
|
||||
#include <sys/zfs_vnops.h>
|
||||
#include <sys/zfs_znode.h>
|
||||
#include <sys/dmu_objset.h>
|
||||
#include <sys/vfs.h>
|
||||
#include <sys/zpl.h>
|
||||
|
||||
@@ -500,7 +501,7 @@ zpl_revalidate(struct dentry *dentry, unsigned int flags)
|
||||
if (time_after(jiffies, zsb->z_snap_defer_time +
|
||||
MAX(zfs_expire_snapshot * HZ / 2, HZ))) {
|
||||
zsb->z_snap_defer_time = jiffies;
|
||||
zfsctl_snapshot_unmount_delay(
|
||||
zfsctl_snapshot_unmount_delay(zsb->z_os->os_spa,
|
||||
dmu_objset_id(zsb->z_os), zfs_expire_snapshot);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user