diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-21 05:35:41 +0100 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-21 19:27:10 +0100 |
commit | d32088f2f2f0f361caeb87dfc71b632231fd6c7b (patch) | |
tree | 51348b251d0f5a7e6032996eea43ee6576318a8f /fs/bcachefs/snapshot.c | |
parent | bcachefs: add missing __GFP_NOWARN (diff) | |
download | linux-d32088f2f2f0f361caeb87dfc71b632231fd6c7b.tar.xz linux-d32088f2f2f0f361caeb87dfc71b632231fd6c7b.zip |
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>
Diffstat (limited to '')
-rw-r--r-- | fs/bcachefs/snapshot.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/snapshot.c b/fs/bcachefs/snapshot.c index cdcff4e5ae5c..45f67e8b29eb 100644 --- a/fs/bcachefs/snapshot.c +++ b/fs/bcachefs/snapshot.c @@ -1053,6 +1053,8 @@ static int create_snapids(struct btree_trans *trans, u32 parent, u32 tree, n->v.subvol = cpu_to_le32(snapshot_subvols[i]); n->v.tree = cpu_to_le32(tree); n->v.depth = cpu_to_le32(depth); + n->v.btime.lo = cpu_to_le64(bch2_current_time(c)); + n->v.btime.hi = 0; for (j = 0; j < ARRAY_SIZE(n->v.skip); j++) n->v.skip[j] = cpu_to_le32(bch2_snapshot_skiplist_get(c, parent)); |