From 59767479acb6edb12335460c9e5f7cfd9a3823cc Mon Sep 17 00:00:00 2001 From: Umer Saleem Date: Sat, 3 Sep 2022 01:33:50 +0500 Subject: [PATCH] Add DD_FIELD string for snapshots_changed property This commit adds DD_FIELD string used in extensified dsl_dir zap object for snapshots_changed property. Reviewed-by: Brian Behlendorf Reviewed-by: Ryan Moeller Signed-off-by: Umer Saleem Closes #13819 --- include/sys/dsl_dir.h | 1 + module/zfs/dsl_dir.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/sys/dsl_dir.h b/include/sys/dsl_dir.h index 664230f14..384f98e8f 100644 --- a/include/sys/dsl_dir.h +++ b/include/sys/dsl_dir.h @@ -52,6 +52,7 @@ struct zthr; #define DD_FIELD_SNAPSHOT_COUNT "com.joyent:snapshot_count" #define DD_FIELD_CRYPTO_KEY_OBJ "com.datto:crypto_key_obj" #define DD_FIELD_LIVELIST "com.delphix:livelist" +#define DD_FIELD_SNAPSHOTS_CHANGED "com.ixsystems:snapshots_changed" typedef enum dd_used { DD_USED_HEAD, diff --git a/module/zfs/dsl_dir.c b/module/zfs/dsl_dir.c index 746026938..a4db3ee2f 100644 --- a/module/zfs/dsl_dir.c +++ b/module/zfs/dsl_dir.c @@ -271,7 +271,7 @@ dsl_dir_hold_obj(dsl_pool_t *dp, uint64_t ddobj, if (dsl_dir_is_zapified(dd)) { inode_timespec_t t = {0}; zap_lookup(dp->dp_meta_objset, ddobj, - zfs_prop_to_name(ZFS_PROP_SNAPSHOTS_CHANGED), + DD_FIELD_SNAPSHOTS_CHANGED, sizeof (uint64_t), sizeof (inode_timespec_t) / sizeof (uint64_t), &t); @@ -2265,7 +2265,7 @@ dsl_dir_snap_cmtime_update(dsl_dir_t *dd, dmu_tx_t *tx) uint64_t ddobj = dd->dd_object; dsl_dir_zapify(dd, tx); VERIFY0(zap_update(mos, ddobj, - zfs_prop_to_name(ZFS_PROP_SNAPSHOTS_CHANGED), + DD_FIELD_SNAPSHOTS_CHANGED, sizeof (uint64_t), sizeof (inode_timespec_t) / sizeof (uint64_t), &t, tx));