diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-12-27 23:19:09 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-05 23:24:19 -0500 |
commit | ad00bce07da8138c08f6585f153412b65c99b064 (patch) | |
tree | 5d102710a99d6d1dedbd49bceefd587704cf11d4 /fs/bcachefs/inode.c | |
parent | 717296c34c8d9d13d7aad4d710b0c3bdb285783b (diff) |
bcachefs: mark now takes bkey_s
Prep work for disk space accounting rewrite: we're going to want to use
a single callback for both of our current triggers, so we need to change
them to have the same type signature first.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/inode.c')
-rw-r--r-- | fs/bcachefs/inode.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/bcachefs/inode.c b/fs/bcachefs/inode.c index 32e0736ba718..e6978005bafd 100644 --- a/fs/bcachefs/inode.c +++ b/fs/bcachefs/inode.c @@ -592,7 +592,7 @@ int bch2_trans_mark_inode(struct btree_trans *trans, int bch2_mark_inode(struct btree_trans *trans, enum btree_id btree_id, unsigned level, - struct bkey_s_c old, struct bkey_s_c new, + struct bkey_s_c old, struct bkey_s new, unsigned flags) { struct bch_fs *c = trans->c; @@ -600,12 +600,9 @@ int bch2_mark_inode(struct btree_trans *trans, u64 journal_seq = trans->journal_res.seq; if (flags & BTREE_TRIGGER_INSERT) { - struct bch_inode_v3 *v = (struct bch_inode_v3 *) new.v; - BUG_ON(!journal_seq); - BUG_ON(new.k->type != KEY_TYPE_inode_v3); - v->bi_journal_seq = cpu_to_le64(journal_seq); + bkey_s_to_inode_v3(new).v->bi_journal_seq = cpu_to_le64(journal_seq); } if (flags & BTREE_TRIGGER_GC) { |