From: Hu Weiwen
When the subsequent erofs_battach() is called on an buffer block of
which (bb->buffers.off % EROFS_BLKSIZ == 0), `tail_blkaddr' won't be
updated correctly. This bug can be reproduced by:
mkdir bug-repo
head -c 4032 /dev/urandom > bug-repo/1
head -c 4095 /dev/urandom > bug-repo/2
From: Gao Xiang
In case that new buffer allocation optimization logic is
potentially broken.
Signed-off-by: Gao Xiang
---
changes since v1:
- add a more check "used_before != cur->buffers.off % EROFS_BLKSIZ"
lib/cache.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git
From: Gao Xiang
Full mapped buffer blocks aren't the targets for reusing.
Fixes: 185b0bcdef4b ("erofs-utils: optimize buffer allocation logic")
Signed-off-by: Gao Xiang
---
changes since v1:
- update commit message since "erofs-utils: fix battach on full buffer blocks"
has been considered i
Hi Weiwen,
On Fri, Jan 22, 2021 at 12:26:06AM +0800, Hu Weiwen wrote:
> When __erofs_battach() is called on an buffer block of which
> (bb->buffers.off % EROFS_BLKSIZ == 0), `tail_blkaddr' will not be
> updated correctly. This bug can be reproduced by:
>
> mkdir bug-repo
> head -c 4032 /dev/urand