[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0675b760-c381-4f5e-b587-083b8ace99c4@nachtgeist.net>
Date: Tue, 24 Dec 2024 15:21:03 +0100
From: Daniel Reichelt <debian@...htgeist.net>
To: Zhao Mengmeng <zhaomengmeng@...inos.cn>, Jan Kara <jack@...e.cz>,
sashal@...nel.org, Salvatore Bonaccorso <carnil@...ian.org>
Cc: linux-kernel@...r.kernel.org, 1089698@...s.debian.org,
regressions@...ts.linux.dev
Subject: Re: [regression] linux: Loop-mounted UDF ISOs no longer readable
Hi Zhao,
> commit 1ea1cd11c72d1405a6b98440a9d5ea82dfa07166
> Author: Jan Kara <jack@...e.cz>
> Date: Wed Jan 25 11:43:03 2023 +0100
>
> udf: Fix directory iteration for longer tail extents
>
> When directory's last extent has more that one block and its length is
> not multiple of a block side, the code wrongly decided to move to the
> next extent instead of processing the last partial block. This led to
> directory corruption. Fix the rounding issue.
>
> Signed-off-by: Jan Kara <jack@...e.cz>
>
> diff --git a/fs/udf/directory.c b/fs/udf/directory.c
> index b1424e2aa868..31f1bf8ab848 100644
> --- a/fs/udf/directory.c
> +++ b/fs/udf/directory.c
> @@ -170,7 +170,7 @@ static struct buffer_head *udf_fiiter_bread_blk(struct udf_fileident_iter *iter)
> static int udf_fiiter_advance_blk(struct udf_fileident_iter *iter)
> {
> iter->loffset++;
> - if (iter->loffset < iter->elen >> iter->dir->i_blkbits)
> + if (iter->loffset < DIV_ROUND_UP(iter->elen, 1<<iter->dir->i_blkbits))
> return 0;
>
> iter->loffset = 0;
>
>
> In my qemu environment, with v6.1.115 plus this patch, `ls $mntpt/sources` will
> work as normal.
>
> Jan, I'm not very familiar with this patchset, maybe some more patches needs to
> be backported to solve this problem? I'd love to hear from you.
>
> Deniel, if it possible, could you cherry-pick this patch to your kernel source
> as a temporary workaround, and test if it really fix your problem? Thanks.
I just tested v6.1.120 +1ea1cd11c72d1405a6b98440a9d5ea82dfa07166 and I
can confirm that at least `ls $mntpt/sources` gives viable output.
However, actually running windows setup off a samba share from such a
$mntpt gives data errors at the very end of windows setup. I guess
something else is missing...
Thanks!
Daniel
Powered by blists - more mailing lists