From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
To: Guoqing Jiang <guoqing.jiang@linux.dev>
Cc: song@kernel.org, linux-raid@vger.kernel.org
Subject: Re: [PATCH 1/3] raid0, linear, md: add error_handlers for raid0 and linear
Date: Mon, 20 Dec 2021 10:39:12 +0100 [thread overview]
Message-ID: <20211220103912.00000fd2@linux.intel.com> (raw)
In-Reply-To: <3d8128c8-7cca-a805-5433-027378cdd060@linux.dev>
Hi Guoqing,
On Fri, 17 Dec 2021 10:00:25 +0800
Guoqing Jiang <guoqing.jiang@linux.dev> wrote:
> > @@ -281,6 +282,17 @@ static void linear_status (struct seq_file
> > *seq, struct mddev *mddev) seq_printf(seq, " %dk rounding",
> > mddev->chunk_sectors / 2); }
> >
> > +static void linear_error(struct mddev *mddev, struct md_rdev *rdev)
> > +{
> > + char b[BDEVNAME_SIZE];
> > +
> > + if (!test_and_set_bit(MD_BROKEN, &rdev->mddev->flags))
> > + pr_crit("md/linear%s: Disk failure on %s
> > detected.\n"
> > + "md/linear:%s: Cannot continue, failing
> > array.\n",
> > + mdname(mddev), bdevname(rdev->bdev, b),
> > + mdname(mddev));
> > +}
> > +
>
> Do you consider to use %pg to print block device?
Will do.
> > @@ -588,6 +589,17 @@ static void raid0_status(struct seq_file *seq,
> > struct mddev *mddev) return;
> > }
> >
> > +static void raid0_error(struct mddev *mddev, struct md_rdev *rdev)
> > +{
> > + char b[BDEVNAME_SIZE];
> > +
> > + if (!test_and_set_bit(MD_BROKEN, &rdev->mddev->flags))
> > + pr_crit("md/raid0%s: Disk failure on %s
> > detected.\n"
> > + "md/raid0:%s: Cannot continue, failing
> > array.\n",
> > + mdname(mddev), bdevname(rdev->bdev, b),
> > + mdname(mddev));
> > +}
> > +
> > static void *raid0_takeover_raid45(struct mddev *mddev)
> > {
> > struct md_rdev *rdev;
> > @@ -763,6 +775,7 @@ static struct md_personality raid0_personality=
> > .size = raid0_size,
> > .takeover = raid0_takeover,
> > .quiesce = raid0_quiesce,
> > + .error_handler = raid0_error,
> > };
> >
>
> What is the advantage of adding error_handler for raid0 and linear?
> IOW, without implement the error_handler, is there some existing
> issue?
>
There is no issue. It was suggested by Song:
https://lore.kernel.org/linux-raid/CAPhsuW4X94eJ8aG6i7F0zCmgjuWHSRWuBH2gOJjTe5uWg_rMvQ@mail.gmail.com/
Thanks,
Mariusz
next prev parent reply other threads:[~2021-12-20 9:39 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-16 14:52 [PATCH v2 0/3] Use MD_BROKEN for redundant arrays Mariusz Tkaczyk
2021-12-16 14:52 ` [PATCH 1/3] raid0, linear, md: add error_handlers for raid0 and linear Mariusz Tkaczyk
2021-12-17 2:00 ` Guoqing Jiang
2021-12-17 2:07 ` Guoqing Jiang
2021-12-19 3:26 ` Xiao Ni
2021-12-22 1:22 ` Guoqing Jiang
2021-12-20 9:39 ` Mariusz Tkaczyk [this message]
2021-12-19 3:20 ` Xiao Ni
2021-12-20 8:45 ` Mariusz Tkaczyk
2021-12-21 1:40 ` Xiao Ni
2021-12-21 13:56 ` Mariusz Tkaczyk
2021-12-22 1:54 ` Guoqing Jiang
2021-12-22 3:08 ` Xiao Ni
2021-12-16 14:52 ` [PATCH 2/3] md: Set MD_BROKEN for RAID1 and RAID10 Mariusz Tkaczyk
2021-12-17 2:16 ` Guoqing Jiang
2021-12-22 7:24 ` Xiao Ni
2021-12-27 12:34 ` Mariusz Tkaczyk
2021-12-16 14:52 ` [PATCH 3/3] raid5: introduce MD_BROKEN Mariusz Tkaczyk
2021-12-17 2:26 ` Guoqing Jiang
2021-12-17 8:37 ` Mariusz Tkaczyk
2021-12-22 1:46 ` Guoqing Jiang
2021-12-17 0:52 ` [PATCH v2 0/3] Use MD_BROKEN for redundant arrays Song Liu
2021-12-17 8:02 ` Mariusz Tkaczyk
2022-01-25 15:52 ` Mariusz Tkaczyk
2022-01-26 1:13 ` Song Liu
-- strict thread matches above, loose matches on Subject: below --
2022-01-27 15:39 [PATCH v3 0/3] Improve failed arrays handling Mariusz Tkaczyk
2022-01-27 15:39 ` [PATCH 1/3] raid0, linear, md: add error_handlers for raid0 and linear Mariusz Tkaczyk
2022-02-12 1:12 ` Guoqing Jiang
2022-02-14 9:37 ` Mariusz Tkaczyk
2022-02-15 3:43 ` Guoqing Jiang
2022-02-15 14:06 ` Mariusz Tkaczyk
2022-02-16 9:47 ` Xiao Ni
2022-02-22 6:34 ` Song Liu
2022-02-22 13:02 ` Mariusz Tkaczyk
2022-03-22 15:23 [PATCH 0/3] Failed array handling improvements Mariusz Tkaczyk
2022-03-22 15:23 ` [PATCH 1/3] raid0, linear, md: add error_handlers for raid0 and linear Mariusz Tkaczyk
2022-04-08 0:16 ` Song Liu
2022-04-08 14:35 ` Mariusz Tkaczyk
2022-04-08 16:18 ` Song Liu
2022-04-12 15:31 ` Mariusz Tkaczyk
2022-04-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=20211220103912.00000fd2@linux.intel.com \
--to=mariusz.tkaczyk@linux.intel.com \
--cc=guoqing.jiang@linux.dev \
--cc=linux-raid@vger.kernel.org \
--cc=song@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.