[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f921797d-3876-f5d6-8a5b-019cdd9d8a03@huaweicloud.com>
Date: Mon, 12 May 2025 14:25:04 +0800
From: Yu Kuai <yukuai1@...weicloud.com>
To: Christoph Hellwig <hch@....de>, Yu Kuai <yukuai1@...weicloud.com>
Cc: xni@...hat.com, colyli@...nel.org, agk@...hat.com, snitzer@...nel.org,
mpatocka@...hat.com, song@...nel.org, linux-kernel@...r.kernel.org,
dm-devel@...ts.linux.dev, linux-raid@...r.kernel.org, yi.zhang@...wei.com,
yangerkun@...wei.com, johnny.chenyi@...wei.com,
"yukuai (C)" <yukuai3@...wei.com>
Subject: Re: [PATCH RFC md-6.16 v3 05/19] md: delay registration of bitmap_ops
until creating bitmap
Hi,
在 2025/05/12 12:53, Christoph Hellwig 写道:
>> + head = xa_load(&md_submodule, mddev->bitmap_id);
>> xa_unlock(&md_submodule);
>> - if (!mddev->bitmap_ops)
>> - pr_warn_once("md: can't find bitmap id %d\n", mddev->bitmap_id);
>> +
>> + if (WARN_ON_ONCE(!head || head->type != MD_BITMAP)) {
>> + pr_err("md: can't find bitmap id %d\n", mddev->bitmap_id);
>> + return;
>> + }
>
> This needs a real error return, doesn't it?
The caller check and return -ENOENT if mddev->bitmap_ops is NULL, I
can change the code here by checking return value instead.
Thanks,
Kuai
>
>
>
> .
>
Powered by blists - more mailing lists