lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zc72uQln4bXothru@bmarzins-01.fast.eng.rdu2.dc.redhat.com>
Date: Fri, 16 Feb 2024 00:46:33 -0500
From: Benjamin Marzinski <bmarzins@...hat.com>
To: Song Liu <song@...nel.org>
Cc: Yu Kuai <yukuai1@...weicloud.com>, mpatocka@...hat.com, heinzm@...hat.com,
        xni@...hat.com, blazej.kucman@...ux.intel.com, agk@...hat.com,
        snitzer@...nel.org, dm-devel@...ts.linux.dev, yukuai3@...wei.com,
        jbrassow@....redhat.com, neilb@...e.de, shli@...com, akpm@...l.org,
        linux-kernel@...r.kernel.org, linux-raid@...r.kernel.org,
        yi.zhang@...wei.com, yangerkun@...wei.com
Subject: Re: [PATCH v5 00/14] dm-raid/md/raid: fix v6.7 regressions

On Thu, Feb 15, 2024 at 02:24:34PM -0800, Song Liu wrote:
> On Thu, Feb 1, 2024 at 1:30 AM Yu Kuai <yukuai1@...weicloud.com> wrote:
> >
> [...]
> >
> > [1] https://lore.kernel.org/all/CALTww29QO5kzmN6Vd+jT=-8W5F52tJjHKSgrfUc1Z1ZAeRKHHA@mail.gmail.com/
> >
> > Yu Kuai (14):
> >   md: don't ignore suspended array in md_check_recovery()
> >   md: don't ignore read-only array in md_check_recovery()
> >   md: make sure md_do_sync() will set MD_RECOVERY_DONE
> >   md: don't register sync_thread for reshape directly
> >   md: don't suspend the array for interrupted reshape
> >   md: fix missing release of 'active_io' for flush
> 
> Applied 1/14-5/14 to md-6.8 branch (6/14 was applied earlier).
> 
> Thanks,
> Song

I'm still seeing new failures that I can't reproduce in the 6.6 kernel,
specifically:

lvconvert-raid-reshape-stripes-load-reload.sh
lvconvert-repair-raid.sh

with lvconvert-raid-reshape-stripes-load-reload.sh Patch 12/14
("md/raid456: fix a deadlock for dm-raid456 while io concurrent with
reshape") is changing a hang to a corruption. The issues is that we
can't simply fail IO that crosses the reshape position. I assume that
the correct thing to do is have dm-raid reissue it after the suspend,
when the reshape can make progress again. Perhaps something like this,
only less naive (although this patch does make the test pass for me).
Heinz, any thoughts on this? Otherwise, I'll look into this a little
more and post a RFC patch.

=========================================================
diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c
index ed8c28952b14..ff481d494b04 100644
--- a/drivers/md/dm-raid.c
+++ b/drivers/md/dm-raid.c
@@ -3345,6 +3345,14 @@ static int raid_map(struct dm_target *ti, struct bio *bio)
 	return DM_MAPIO_SUBMITTED;
 }
 
+static int raid_end_io(struct dm_target *ti, struct bio *bio,
+		       blk_status_t *error)
+{
+	if (*error != BLK_STS_IOERR || !dm_noflush_suspending(ti))
+		return DM_ENDIO_DONE;
+	return DM_ENDIO_REQUEUE;
+}
+
 /* Return sync state string for @state */
 enum sync_state { st_frozen, st_reshape, st_resync, st_check, st_repair, st_recover, st_idle };
 static const char *sync_str(enum sync_state state)
@@ -4100,6 +4108,7 @@ static struct target_type raid_target = {
 	.ctr = raid_ctr,
 	.dtr = raid_dtr,
 	.map = raid_map,
+	.end_io = raid_end_io,
 	.status = raid_status,
 	.message = raid_message,
 	.iterate_devices = raid_iterate_devices,
=========================================================
> 
> 
> >   md: export helpers to stop sync_thread
> >   md: export helper md_is_rdwr()
> >   dm-raid: really frozen sync_thread during suspend
> >   md/dm-raid: don't call md_reap_sync_thread() directly
> >   dm-raid: add a new helper prepare_suspend() in md_personality
> >   md/raid456: fix a deadlock for dm-raid456 while io concurrent with
> >     reshape
> >   dm-raid: fix lockdep waring in "pers->hot_add_disk"
> >   dm-raid: remove mddev_suspend/resume()
> >
> >  drivers/md/dm-raid.c |  78 +++++++++++++++++++--------
> >  drivers/md/md.c      | 126 +++++++++++++++++++++++++++++--------------
> >  drivers/md/md.h      |  16 ++++++
> >  drivers/md/raid10.c  |  16 +-----
> >  drivers/md/raid5.c   |  61 +++++++++++----------
> >  5 files changed, 192 insertions(+), 105 deletions(-)
> >
> > --
> > 2.39.2
> >
> >


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ