mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 08:44:21 +08:00
a3e7226268
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>
9 lines
217 B
C
9 lines
217 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _BCACHEFS_VARINT_H
|
|
#define _BCACHEFS_VARINT_H
|
|
|
|
int bch2_varint_encode(u8 *, u64);
|
|
int bch2_varint_decode(const u8 *, const u8 *, u64 *);
|
|
|
|
#endif /* _BCACHEFS_VARINT_H */
|