+4
−3
Loading
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IB5UKT -------------------------------- When mounting an erofs image locally with a chunk layout as below, inconsistent data may be read: mkfs.erofs -E noinline_data test-plain.img /tmp/stress/ mkfs.erofs --chunksize=1048576 test-chunk-array.img /tmp/stress/ mount -o loop -t erofs test-plain.img mnt-plain mount -o loop -t erofs test-chunk-array.img mnt-array diff mnt-array/lib/compress.c mnt-plain/lib/compress.c // The output is non-empty, so the two files are inconsistent. This is because erofs_read_raw_page() doesn't take current_block offset into account when calculating blknr, so it will take the first block of the map as the currently read block, resulting in data inconsistency, correct the blknr calculation logic to fix the problem. Signed-off-by:Baokun Li <libaokun1@huawei.com>