linux-stable/fs/erofs
Gao Xiang 001b8ccd06 erofs: fix compact 4B support for 16k block size
In compact 4B, two adjacent lclusters are packed together as a unit to
form on-disk indexes for effective random access, as below:

(amortized = 4, vcnt = 2)
       _____________________________________________
      |___@_____ encoded bits __________|_ blkaddr _|
      0        .                                    amortized * vcnt = 8
      .             .
      .                  .              amortized * vcnt - 4 = 4
      .                        .
      .____________________________.
      |_type (2 bits)_|_clusterofs_|

Therefore, encoded bits for each pack are 32 bits (4 bytes). IOWs,
since each lcluster can get 16 bits for its type and clusterofs, the
maximum supported lclustersize for compact 4B format is 16k (14 bits).

Fix this to enable compact 4B format for 16k lclusters (blocks), which
is tested on an arm64 server with 16k page size.

Fixes: 152a333a58 ("staging: erofs: add compacted compression indexes support")
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20230601112341.56960-1-hsiangkao@linux.alibaba.com
2023-06-18 12:10:53 +08:00
..
compress.h erofs: fold in z_erofs_decompress() 2023-05-29 15:54:49 +08:00
data.c erofs: keep meta inode into erofs_buf 2023-04-17 01:15:50 +08:00
decompressor.c erofs: fold in z_erofs_decompress() 2023-05-29 15:54:49 +08:00
decompressor_lzma.c erofs: avoid hardcoded blocksize for subpage block support 2023-04-17 01:15:44 +08:00
dir.c erofs: keep meta inode into erofs_buf 2023-04-17 01:15:50 +08:00
erofs_fs.h erofs: cleanup i_format-related stuffs 2023-04-17 01:15:55 +08:00
fscache.c erofs: avoid hardcoded blocksize for subpage block support 2023-04-17 01:15:44 +08:00
inode.c erofs: sunset erofs_dbg() 2023-04-17 01:15:54 +08:00
internal.h erofs: use struct lockref to replace handcrafted approach 2023-06-18 12:10:47 +08:00
Kconfig erofs: use HIPRI by default if per-cpu kthreads are enabled 2023-05-23 16:57:08 +08:00
Makefile erofs: avoid pcpubuf.c inclusion if CONFIG_EROFS_FS_ZIP is off 2023-05-23 16:56:40 +08:00
namei.c erofs: sunset erofs_dbg() 2023-04-17 01:15:54 +08:00
pcpubuf.c erofs: mark z_erofs_lzma_init/erofs_pcpubuf_init w/ __init 2023-03-09 22:49:30 +08:00
super.c erofs: adapt managed inode operations into folios 2023-05-29 23:06:03 +08:00
sysfs.c erofs: make kobj_type structures constant 2023-02-15 08:11:26 +08:00
utils.c erofs: use struct lockref to replace handcrafted approach 2023-06-18 12:10:47 +08:00
xattr.c erofs: convert erofs_read_metabuf() to erofs_bread() for xattr 2023-06-18 12:10:53 +08:00
xattr.h Changes since last update: 2023-04-24 14:25:39 -07:00
zdata.c erofs: use poison pointer to replace the hard-coded address 2023-06-18 12:10:53 +08:00
zmap.c erofs: fix compact 4B support for 16k block size 2023-06-18 12:10:53 +08:00