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 <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Umer Saleem <usaleem@ixsystems.com>
Closes #13819
This commit is contained in:
Umer Saleem 2022-09-03 01:33:50 +05:00 committed by GitHub
parent ee9f3bca55
commit 59767479ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -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,

View File

@ -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));