projects
/
platform
/
upstream
/
erofs-utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ed22721
)
erofs-utils: lib: fix insufficient fragment cache bitmap
author
Gao Xiang
<hsiangkao@linux.alibaba.com>
Sat, 8 Mar 2025 17:35:23 +0000
(
01:35
+0800)
committer
Gao Xiang
<hsiangkao@linux.alibaba.com>
Sat, 8 Mar 2025 17:39:32 +0000
(
01:39
+0800)
.. should round up to the nearest byte instead of down.
Fixes: f511cfbbc0da ("erofs-utils: introduce fragment cache")
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link:
https://lore.kernel.org/r/20250308173523.3696606-1-hsiangkao@linux.alibaba.com
lib/fragments.c
patch
|
blob
|
history
diff --git
a/lib/fragments.c
b/lib/fragments.c
index 05bbf0dc4c066fe602ca047d28e2d94d438894e4..d300439ed88c757a42d3ae7c7e506132f625641e 100644
(file)
--- a/
lib/fragments.c
+++ b/
lib/fragments.c
@@
-402,7
+402,7
@@
int erofs_packedfile_init(struct erofs_sb_info *sbi, bool fragments_mkfs)
err = -errno;
goto err_out;
}
- epi->uptodate_size =
BLK_ROUND_UP(sbi, ei.i_size) / 8
;
+ epi->uptodate_size =
DIV_ROUND_UP(BLK_ROUND_UP(sbi, ei.i_size), 8)
;
epi->uptodate = calloc(1, epi->uptodate_size);
if (!epi->uptodate) {
err = -ENOMEM;