linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Introduce new raid0 state 'broken'
@ 2019-07-29 20:31 Guilherme G. Piccoli
  2019-07-29 20:31 ` [PATCH 1/2] md/raid0: Introduce new array state 'broken' for raid0 Guilherme G. Piccoli
  2019-07-29 20:31 ` [PATCH 2/2] mdadm: " Guilherme G. Piccoli
  0 siblings, 2 replies; 13+ messages in thread
From: Guilherme G. Piccoli @ 2019-07-29 20:31 UTC (permalink / raw)
  To: linux-raid
  Cc: linux-block, dm-devel, gpiccoli, jay.vosburgh, neilb, songliubraving

Currently the md/raid0 device behaves quite differently of other block
devices when it comes to failure. While other md levels contain vast
logic to deal with failures, and other non-md devices like scsi disks
or nvme rely on a dying queue when they fail, md/raid0 for instance
does not signal failures if an array member is removed while the array
is mounted; in that case, udev signals the device removal but mdadm
cannot succeed in the STOP_ARRAY ioctl, since it's mounted.

This behavior was tentatively changed in the past to match the scsi/nvme
devices (see [0]), but this attempt was quite complex, it had some corner
cases and (the few) community reviews weren't generally positive.
So, we are trying again with a simpler approach this time.

This series introduces a new array state 'broken' (for raid0 only), which
mimics the state 'clean'. The main goal for this new state is a way to
signal the user that something is wrong with the array. We also included a
warn_once-style message in kernel log to alert the user when the array has
one failed member.

The series encompass changes in the kernel and in mdadm tool. To get the
'broken' state completely functional one requires both changes, but mdadm
and kernel can live without their counterpart changes (in case some users
gets an updated mdadm for example, but keeps using an old kernel).

This series does not affect at all the way md/raid0 will react to I/O
failures. It was discussed in [0] that it should be better if raid0 could
fail faster in case it gets a member removed; we just proposed a change in
that realm too (see [1]), but it seems better to have them reviewed/treated
separately.

This series was tested with raid0 arrays holding both an ext4 and xfs
filesystems. Thanks in advance for the reviews/feedbacks.
Cheers,


Guilherme


[0] lore.kernel.org/linux-block/20190418220448.7219-1-gpiccoli@canonical.com
[1] lore.kernel.org/linux-block/20190729193359.11040-1-gpiccoli@canonical.com


Guilherme G. Piccoli (1):
  md/raid0: Introduce new array state 'broken' for raid0

[kernel part]
 drivers/md/md.c    | 23 +++++++++++++++++++----
 drivers/md/md.h    |  2 ++
 drivers/md/raid0.c | 26 ++++++++++++++++++++++++++
 3 files changed, 47 insertions(+), 4 deletions(-)

[mdadm]
 Detail.c  | 16 ++++++++++++++--
 Monitor.c |  9 +++++++--
 maps.c    |  1 +
 mdadm.h   |  1 +
 mdmon.h   |  2 +-
 monitor.c |  4 ++--
 6 files changed, 26 insertions(+), 7 deletions(-)

-- 
2.22.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-08-16 13:48 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-29 20:31 [PATCH 0/2] Introduce new raid0 state 'broken' Guilherme G. Piccoli
2019-07-29 20:31 ` [PATCH 1/2] md/raid0: Introduce new array state 'broken' for raid0 Guilherme G. Piccoli
2019-07-30  0:11   ` NeilBrown
2019-07-30 11:43     ` Guilherme G. Piccoli
2019-07-30  6:20   ` Bob Liu
2019-07-30 12:18     ` Guilherme G. Piccoli
2019-07-31  0:28     ` NeilBrown
2019-07-31 13:04       ` Guilherme G. Piccoli
2019-07-31 19:47         ` Song Liu
2019-07-31 19:43   ` Song Liu
2019-08-01 12:07     ` Guilherme G. Piccoli
2019-08-16 13:48       ` Guilherme G. Piccoli
2019-07-29 20:31 ` [PATCH 2/2] mdadm: " Guilherme G. Piccoli

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).