bcachefs: New varints
authorKent Overstreet <kent.overstreet@gmail.com>
Fri, 6 Nov 2020 04:39:33 +0000 (23:39 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:46 +0000 (17:08 -0400)
commita3e7226268b26f0976f64ce8b0644daae28cafff
treed7f5b2a8732d3167655dc28a29bfca45dea97904
parentb3d1e6cab2dfcdfef5fc35659a8f33a75ae5904e
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>
fs/bcachefs/Makefile
fs/bcachefs/bcachefs_format.h
fs/bcachefs/fsck.c
fs/bcachefs/inode.c
fs/bcachefs/inode.h
fs/bcachefs/io.c
fs/bcachefs/recovery.c
fs/bcachefs/super.c
fs/bcachefs/varint.c [new file with mode: 0644]
fs/bcachefs/varint.h [new file with mode: 0644]