diff options
author | Gao Xiang <hsiangkao@linux.alibaba.com> | 2023-03-14 15:42:51 +0800 |
---|---|---|
committer | Gao Xiang <hsiangkao@linux.alibaba.com> | 2023-03-15 16:29:12 +0800 |
commit | 7bc02f16e1021ec8142286a9e609b82beb2a6d31 (patch) | |
tree | e8758afcb7c7c239a8c6f4794c9b2c4805f5dbed /dump/main.c | |
parent | a3d4c421092c98d00f760ef6e41922b8b937b559 (diff) | |
download | erofs-utils-7bc02f16e1021ec8142286a9e609b82beb2a6d31.tar.gz |
erofs-utils: drop hard-coded block size
Now block sizes can be less than PAGE_SIZE.
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20230314074251.80425-1-hsiangkao@linux.alibaba.com
Diffstat (limited to 'dump/main.c')
-rw-r--r-- | dump/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dump/main.c b/dump/main.c index bc4e028..fd1923f 100644 --- a/dump/main.c +++ b/dump/main.c @@ -203,7 +203,7 @@ static int erofsdump_get_occupied_size(struct erofs_inode *inode, case EROFS_INODE_FLAT_COMPRESSION_LEGACY: case EROFS_INODE_FLAT_COMPRESSION: stats.compressed_files++; - *size = inode->u.i_blocks * EROFS_BLKSIZ; + *size = inode->u.i_blocks * erofs_blksiz(); break; default: erofs_err("unknown datalayout"); @@ -448,7 +448,7 @@ static void erofsdump_show_fileinfo(bool show_extent) .m_deviceid = map.m_deviceid, .m_pa = map.m_pa, }; - err = erofs_map_dev(&sbi, &mdev); + err = erofs_map_dev(&mdev); if (err) { erofs_err("failed to map device"); return; |