mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-29 18:24:11 +03:00
Illumos 6171 - dsl_prop_unregister() slows down dataset eviction.
6171 dsl_prop_unregister() slows down dataset eviction. Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Prakash Surya <prakash.surya@delphix.com> Approved by: Dan McDonald <danmcd@omniti.com> References: https://www.illumos.org/issues/6171 https://github.com/illumos/illumos-gate/commit/03bad06 Porting notes: - Conflicts -3558fd7Prototype/structure update for Linux -2cf7f52Linux compat 2.6.39: mount_nodev() -13fe019Illumos #3464 -241b541Illumos 5959 - clean up per-dataset feature count code - dsl_prop_unregister() preserved until out of tree consumers like Lustre can transition to dsl_prop_unregister_all(). - Fixing 'space or tab at end of line' in include/sys/dsl_dataset.h Ported-by: kernelOfTruth kerneloftruth@gmail.com Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
committed by
Brian Behlendorf
parent
5a28a9737a
commit
0eb21616fa
+3
-77
@@ -341,38 +341,7 @@ zfs_register_callbacks(zfs_sb_t *zsb)
|
||||
return (0);
|
||||
|
||||
unregister:
|
||||
/*
|
||||
* We may attempt to unregister some callbacks that are not
|
||||
* registered, but this is OK; it will simply return ENOMSG,
|
||||
* which we will ignore.
|
||||
*/
|
||||
(void) dsl_prop_unregister(ds, zfs_prop_to_name(ZFS_PROP_ATIME),
|
||||
atime_changed_cb, zsb);
|
||||
(void) dsl_prop_unregister(ds, zfs_prop_to_name(ZFS_PROP_RELATIME),
|
||||
relatime_changed_cb, zsb);
|
||||
(void) dsl_prop_unregister(ds, zfs_prop_to_name(ZFS_PROP_XATTR),
|
||||
xattr_changed_cb, zsb);
|
||||
(void) dsl_prop_unregister(ds, zfs_prop_to_name(ZFS_PROP_RECORDSIZE),
|
||||
blksz_changed_cb, zsb);
|
||||
(void) dsl_prop_unregister(ds, zfs_prop_to_name(ZFS_PROP_READONLY),
|
||||
readonly_changed_cb, zsb);
|
||||
(void) dsl_prop_unregister(ds, zfs_prop_to_name(ZFS_PROP_DEVICES),
|
||||
devices_changed_cb, zsb);
|
||||
(void) dsl_prop_unregister(ds, zfs_prop_to_name(ZFS_PROP_SETUID),
|
||||
setuid_changed_cb, zsb);
|
||||
(void) dsl_prop_unregister(ds, zfs_prop_to_name(ZFS_PROP_EXEC),
|
||||
exec_changed_cb, zsb);
|
||||
(void) dsl_prop_unregister(ds, zfs_prop_to_name(ZFS_PROP_SNAPDIR),
|
||||
snapdir_changed_cb, zsb);
|
||||
(void) dsl_prop_unregister(ds, zfs_prop_to_name(ZFS_PROP_ACLTYPE),
|
||||
acltype_changed_cb, zsb);
|
||||
(void) dsl_prop_unregister(ds, zfs_prop_to_name(ZFS_PROP_ACLINHERIT),
|
||||
acl_inherit_changed_cb, zsb);
|
||||
(void) dsl_prop_unregister(ds, zfs_prop_to_name(ZFS_PROP_VSCAN),
|
||||
vscan_changed_cb, zsb);
|
||||
(void) dsl_prop_unregister(ds, zfs_prop_to_name(ZFS_PROP_NBMAND),
|
||||
nbmand_changed_cb, zsb);
|
||||
|
||||
dsl_prop_unregister_all(ds, zsb);
|
||||
return (error);
|
||||
}
|
||||
EXPORT_SYMBOL(zfs_register_callbacks);
|
||||
@@ -959,52 +928,9 @@ void
|
||||
zfs_unregister_callbacks(zfs_sb_t *zsb)
|
||||
{
|
||||
objset_t *os = zsb->z_os;
|
||||
struct dsl_dataset *ds;
|
||||
|
||||
/*
|
||||
* Unregister properties.
|
||||
*/
|
||||
if (!dmu_objset_is_snapshot(os)) {
|
||||
ds = dmu_objset_ds(os);
|
||||
VERIFY(dsl_prop_unregister(ds, "atime", atime_changed_cb,
|
||||
zsb) == 0);
|
||||
|
||||
VERIFY(dsl_prop_unregister(ds, "relatime", relatime_changed_cb,
|
||||
zsb) == 0);
|
||||
|
||||
VERIFY(dsl_prop_unregister(ds, "xattr", xattr_changed_cb,
|
||||
zsb) == 0);
|
||||
|
||||
VERIFY(dsl_prop_unregister(ds, "recordsize", blksz_changed_cb,
|
||||
zsb) == 0);
|
||||
|
||||
VERIFY(dsl_prop_unregister(ds, "readonly", readonly_changed_cb,
|
||||
zsb) == 0);
|
||||
|
||||
VERIFY(dsl_prop_unregister(ds, "devices", devices_changed_cb,
|
||||
zsb) == 0);
|
||||
|
||||
VERIFY(dsl_prop_unregister(ds, "setuid", setuid_changed_cb,
|
||||
zsb) == 0);
|
||||
|
||||
VERIFY(dsl_prop_unregister(ds, "exec", exec_changed_cb,
|
||||
zsb) == 0);
|
||||
|
||||
VERIFY(dsl_prop_unregister(ds, "snapdir", snapdir_changed_cb,
|
||||
zsb) == 0);
|
||||
|
||||
VERIFY(dsl_prop_unregister(ds, "acltype", acltype_changed_cb,
|
||||
zsb) == 0);
|
||||
|
||||
VERIFY(dsl_prop_unregister(ds, "aclinherit",
|
||||
acl_inherit_changed_cb, zsb) == 0);
|
||||
|
||||
VERIFY(dsl_prop_unregister(ds, "vscan",
|
||||
vscan_changed_cb, zsb) == 0);
|
||||
|
||||
VERIFY(dsl_prop_unregister(ds, "nbmand",
|
||||
nbmand_changed_cb, zsb) == 0);
|
||||
}
|
||||
if (!dmu_objset_is_snapshot(os))
|
||||
dsl_prop_unregister_all(dmu_objset_ds(os), zsb);
|
||||
}
|
||||
EXPORT_SYMBOL(zfs_unregister_callbacks);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user