diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2022-10-21 13:21:03 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:51 -0400 |
commit | 8dd69d9f64e92529037550c97a07b1b78296e92c (patch) | |
tree | 20402fcad1c90a7b837cdebc8de2667d3fb2798b /fs/bcachefs/buckets.c | |
parent | 47b323a0b0612c5310c35935a40012125a3e18b8 (diff) | |
download | lwn-8dd69d9f64e92529037550c97a07b1b78296e92c.tar.gz lwn-8dd69d9f64e92529037550c97a07b1b78296e92c.zip |
bcachefs: KEY_TYPE_inode_v3, metadata_version_inode_v3
Move bi_size and bi_sectors into the non-varint portion of the inode, so
that the write path can update them without going through the relatively
expensive unpack/pack operations.
Other changes:
- Add a field for the offset of the varint section, so we can add new
non-varint fields without needing a new inode type, like alloc_v3
- Move bi_mode into the flags field, so that the varint section can be
u64 aligned
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/buckets.c')
-rw-r--r-- | fs/bcachefs/buckets.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/buckets.c b/fs/bcachefs/buckets.c index b657f8545a3b..9dcdfca19d52 100644 --- a/fs/bcachefs/buckets.c +++ b/fs/bcachefs/buckets.c @@ -1123,10 +1123,10 @@ int bch2_mark_inode(struct btree_trans *trans, u64 journal_seq = trans->journal_res.seq; if (flags & BTREE_TRIGGER_INSERT) { - struct bch_inode_v2 *v = (struct bch_inode_v2 *) new.v; + struct bch_inode_v3 *v = (struct bch_inode_v3 *) new.v; BUG_ON(!journal_seq); - BUG_ON(new.k->type != KEY_TYPE_inode_v2); + BUG_ON(new.k->type != KEY_TYPE_inode_v3); v->bi_journal_seq = cpu_to_le64(journal_seq); } |