diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2020-11-05 23:39:33 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:46 -0400 |
commit | a3e7226268b26f0976f64ce8b0644daae28cafff (patch) | |
tree | d7f5b2a8732d3167655dc28a29bfca45dea97904 /fs/bcachefs/io.c | |
parent | b3d1e6cab2dfcdfef5fc35659a8f33a75ae5904e (diff) | |
download | lwn-a3e7226268b26f0976f64ce8b0644daae28cafff.tar.gz lwn-a3e7226268b26f0976f64ce8b0644daae28cafff.zip |
bcachefs: New varints
Previous varint implementation used by the inode code was not nearly as
fast as it could have been; partly because it was attempting to encode
integers up to 96 bits (for timestamps) but this meant that encoding and
decoding the length required a table lookup.
Instead, we'll just encode timestamps greater than 64 bits as two
separate varints; this will make decoding/encoding of inodes
significantly faster overall.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/io.c')
-rw-r--r-- | fs/bcachefs/io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/io.c b/fs/bcachefs/io.c index 6df99ac013a1..62a9a0b32d5b 100644 --- a/fs/bcachefs/io.c +++ b/fs/bcachefs/io.c @@ -310,7 +310,7 @@ int bch2_extent_update(struct btree_trans *trans, inode_u.bi_sectors += delta; if (delta || new_i_size) { - bch2_inode_pack(&inode_p, &inode_u); + bch2_inode_pack(trans->c, &inode_p, &inode_u); bch2_trans_update(trans, inode_iter, &inode_p.inode.k_i, 0); } |