From: Christoph Hellwig <hch@lst.de>
To: Yu Kuai <yukuai1@huaweicloud.com>
Cc: Christoph Hellwig <hch@lst.de>, Song Liu <song@kernel.org>,
linux-raid@vger.kernel.org, "yukuai (C)" <yukuai3@huawei.com>
Subject: Re: [PATCH 1/2] md/raid0: don't free conf on raid0_run failure
Date: Fri, 7 Jun 2024 08:19:47 +0200 [thread overview]
Message-ID: <20240607061947.GA5200@lst.de> (raw)
In-Reply-To: <703d7cf4-e869-d96c-1778-818b29192a3e@huaweicloud.com>
On Fri, Jun 07, 2024 at 02:17:14PM +0800, Yu Kuai wrote:
> Sorry that I just noticed that the sysfs api level_store() calls the
> pers->run() as well, and it didn't handle failure by pers->free().
> It's weried that the api will return success in this case, and after
> this patch, it will require __md_stop() to free the conf.
>
> Can you also fix the level_store()? By checking pers->run() and if it
> failed, call pers->free() and return error.
I can look into it. But if we don't have consistent callers anyway
I'd be tempted to not call ->free on ->run failure, as that is a
rather unusual convention.
next prev parent reply other threads:[~2024-06-07 6:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-04 17:25 fix ->run failure handling Christoph Hellwig
2024-06-04 17:25 ` [PATCH 1/2] md/raid0: don't free conf on raid0_run failure Christoph Hellwig
2024-06-07 6:08 ` Yu Kuai
2024-06-07 6:17 ` Yu Kuai
2024-06-07 6:19 ` Christoph Hellwig [this message]
2024-06-04 17:25 ` [PATCH 2/2] md/raid1: " Christoph Hellwig
2024-06-10 20:58 ` fix ->run failure handling Song Liu
2024-06-11 6:13 ` Christoph Hellwig
2024-06-12 16:36 ` Song Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240607061947.GA5200@lst.de \
--to=hch@lst.de \
--cc=linux-raid@vger.kernel.org \
--cc=song@kernel.org \
--cc=yukuai1@huaweicloud.com \
--cc=yukuai3@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).