Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

bcachefs: bch_snapshot::btime

Add a field to bch_snapshot for creation time; this will be important
when we start exposing the snapshot tree to userspace.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>

+3
+1
fs/bcachefs/bcachefs_format.h
··· 1149 1149 __le32 tree; 1150 1150 __le32 depth; 1151 1151 __le32 skip[3]; 1152 + bch_le128 btime; 1152 1153 }; 1153 1154 1154 1155 LE32_BITMASK(BCH_SNAPSHOT_DELETED, struct bch_snapshot, flags, 0, 1)
+2
fs/bcachefs/snapshot.c
··· 1053 1053 n->v.subvol = cpu_to_le32(snapshot_subvols[i]); 1054 1054 n->v.tree = cpu_to_le32(tree); 1055 1055 n->v.depth = cpu_to_le32(depth); 1056 + n->v.btime.lo = cpu_to_le64(bch2_current_time(c)); 1057 + n->v.btime.hi = 0; 1056 1058 1057 1059 for (j = 0; j < ARRAY_SIZE(n->v.skip); j++) 1058 1060 n->v.skip[j] = cpu_to_le32(bch2_snapshot_skiplist_get(c, parent));