Page MenuHomeFreeBSD
Paste P547

Remove local snapshots_changed property value
ActivePublic

Authored by freqlabs on Sep 12 2022, 9:12 AM.
Tags
None
Referenced Files
F48110782: Remove local snapshots_changed property value
Sep 12 2022, 9:12 AM
Subscribers
None
diff --git a/sys/contrib/openzfs/module/zfs/dsl_dir.c b/sys/contrib/openzfs/module/zfs/dsl_dir.c
index 7460269384b4..d9b187eacc26 100644
--- a/sys/contrib/openzfs/module/zfs/dsl_dir.c
+++ b/sys/contrib/openzfs/module/zfs/dsl_dir.c
@@ -2259,6 +2259,11 @@ dsl_dir_snap_cmtime_update(dsl_dir_t *dd, dmu_tx_t *tx)
mutex_enter(&dd->dd_lock);
dd->dd_snap_cmtime = t;
+ int error = zap_remove(dd->dd_pool->dp_meta_objset,
+ dsl_dir_phys(dd)->dd_props_zapobj,
+ zfs_prop_to_name(ZFS_PROP_SNAPSHOTS_CHANGED),
+ tx);
+ VERIFY(error == 0 || error == ENOENT);
if (spa_feature_is_enabled(dp->dp_spa,
SPA_FEATURE_EXTENSIBLE_DATASET)) {
objset_t *mos = dd->dd_pool->dp_meta_objset;

Event Timeline

freqlabs created this object in space S1 Global.
freqlabs created this object with edit policy "No One".

If snapshots_changed property has local source for a filesystem or volume, this kernel patch will remove it after a snapshot is created or destroyed on that dataset. To list the affected datasets:

# zfs get -o name,source -t filesystem,volume snapshots_changed | grep local

Remember to return to an unpatched kernel after removing the local property value.