[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <793c8af4-d651-48ff-830d-6a8cfd18d697@linux.alibaba.com>
Date: Mon, 17 Mar 2025 01:19:49 +0800
From: Gao Xiang <hsiangkao@...ux.alibaba.com>
To: Chao Yu <chao@...nel.org>
Cc: linux-kernel@...r.kernel.org, Hongzhen Luo <hongzhen@...ux.alibaba.com>,
linux-erofs mailing list <linux-erofs@...ts.ozlabs.org>
Subject: Re: [PATCH v5] erofs: use Z_EROFS_LCLUSTER_TYPE_MAX to simplify
switches
On 2025/3/17 01:17, Gao Xiang wrote:
> Hi Chao,
>
> On 2025/3/16 10:36, Chao Yu wrote:
>> On 2025/2/10 11:29, Hongzhen Luo wrote:
>>> There's no need to enumerate each type. No logic changes.
>>>
>>> Signed-off-by: Hongzhen Luo <hongzhen@...ux.alibaba.com>
>>
>> Looks good to me, feel free to add:
>>
>> Reviewed-by: Chao Yu <chao@...nel.org>
>>
>> And one minor comment below.
>>
>>> diff --git a/fs/erofs/zmap.c b/fs/erofs/zmap.c
>>> index 689437e99a5a..d278ebd60281 100644
>>> --- a/fs/erofs/zmap.c
>>> +++ b/fs/erofs/zmap.c
>>> @@ -265,26 +265,22 @@ static int z_erofs_extent_lookback(struct z_erofs_maprecorder *m,
>>> if (err)
>>> return err;
>>> - switch (m->type) {
>>> - case Z_EROFS_LCLUSTER_TYPE_NONHEAD:
>>> + if (m->type >= Z_EROFS_LCLUSTER_TYPE_MAX) {
>>> + erofs_err(sb, "unknown type %u @ lcn %lu of nid %llu",
>>> + m->type, lcn, vi->nid);
>>> + DBG_BUGON(1);
>>> + return -EOPNOTSUPP;
`m->type >= Z_EROFS_LCLUSTER_TYPE_MAX` is checked here BTW,
I think the patch is good.
Thanks,
Gao Xiang
Powered by blists - more mailing lists