Skip to content

Commit

Permalink
Add DD_FIELD string for snapshots_changed property
Browse files Browse the repository at this point in the history
This commit adds DD_FIELD string used in extensified dsl_dir zap object
for snapshots_changed property.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Umer Saleem <[email protected]>
Closes #13819
  • Loading branch information
usaleem-ix authored Sep 2, 2022
1 parent ee9f3bc commit 5976747
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions include/sys/dsl_dir.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions module/zfs/dsl_dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit 5976747

Please sign in to comment.