* Re: [Regression] md/raid1: write-intent logging/bitmap issue since fd3b6975e9c1 - v5.16-rc1
[not found] <m3tuekbos5.fsf@nogrod.ivcecceob.t-online.de>
@ 2022-01-03 19:53 ` Linus Torvalds
2022-01-03 21:59 ` Song Liu
2022-01-04 4:26 ` Jens Axboe
0 siblings, 2 replies; 3+ messages in thread
From: Linus Torvalds @ 2022-01-03 19:53 UTC (permalink / raw)
To: Norbert Warmuth, Jens Axboe
Cc: Guoqing Jiang, Song Liu, linux-raid, Linux Kernel Mailing List
[-- Attachment #1: Type: text/plain, Size: 763 bytes --]
[ Jens wasn't cc'd for some reason but was the signer-off-on the patch
you bisected to. Added him to the cc. I'll bounce the original
separately, as I also don't see this on lore.kernel.org - it might not
have gotten there yet ]
On Mon, Jan 3, 2022 at 11:30 AM Norbert Warmuth <nwarmuth@t-online.de> wrote:
>
> Please verify and either revert or fixup fd3b6975e9c1 if my analysis is
> correct.
Can you check if moving the WriteMostly bit to the "do behind I/O?"
section fixes things for you?
IOW, something like the attached patch..
Warning: This is very much a "Money see, monkey do" patch. I'm not
really familiar with the raid1 code ]
But yeah, if you see corruption and there isn't an absolutely trivial
fix for this, we should revert.
Linus
[-- Attachment #2: patch.diff --]
[-- Type: text/x-patch, Size: 816 bytes --]
drivers/md/raid1.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 7dc8026cf6ee..85505424f7a4 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1496,12 +1496,13 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
if (!r1_bio->bios[i])
continue;
- if (first_clone && test_bit(WriteMostly, &rdev->flags)) {
+ if (first_clone) {
/* do behind I/O ?
* Not if there are too many, or cannot
* allocate memory, or a reader on WriteMostly
* is waiting for behind writes to flush */
if (bitmap &&
+ test_bit(WriteMostly, &rdev->flags) &&
(atomic_read(&bitmap->behind_writes)
< mddev->bitmap_info.max_write_behind) &&
!waitqueue_active(&bitmap->behind_wait)) {
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Regression] md/raid1: write-intent logging/bitmap issue since fd3b6975e9c1 - v5.16-rc1
2022-01-03 19:53 ` [Regression] md/raid1: write-intent logging/bitmap issue since fd3b6975e9c1 - v5.16-rc1 Linus Torvalds
@ 2022-01-03 21:59 ` Song Liu
2022-01-04 4:26 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Song Liu @ 2022-01-03 21:59 UTC (permalink / raw)
To: Linus Torvalds
Cc: Norbert Warmuth, Jens Axboe, Guoqing Jiang, linux-raid,
Linux Kernel Mailing List
> On Jan 3, 2022, at 11:53 AM, Linus Torvalds <torvalds@linux-foundation.org> wrote:
>
> [ Jens wasn't cc'd for some reason but was the signer-off-on the patch
> you bisected to. Added him to the cc. I'll bounce the original
> separately, as I also don't see this on lore.kernel.org - it might not
> have gotten there yet ]
>
> On Mon, Jan 3, 2022 at 11:30 AM Norbert Warmuth <nwarmuth@t-online.de> wrote:
>>
>> Please verify and either revert or fixup fd3b6975e9c1 if my analysis is
>> correct.
>
> Can you check if moving the WriteMostly bit to the "do behind I/O?"
> section fixes things for you?
>
> IOW, something like the attached patch..
>
> Warning: This is very much a "Money see, monkey do" patch. I'm not
> really familiar with the raid1 code ]
>
> But yeah, if you see corruption and there isn't an absolutely trivial
> fix for this, we should revert.
>
> Linus
> <patch.diff>
I can confirm this patch fixes the issue. I will send pull request with
the fix shortly.
Thanks,
Song
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Regression] md/raid1: write-intent logging/bitmap issue since fd3b6975e9c1 - v5.16-rc1
2022-01-03 19:53 ` [Regression] md/raid1: write-intent logging/bitmap issue since fd3b6975e9c1 - v5.16-rc1 Linus Torvalds
2022-01-03 21:59 ` Song Liu
@ 2022-01-04 4:26 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2022-01-04 4:26 UTC (permalink / raw)
To: Linus Torvalds, Norbert Warmuth
Cc: Guoqing Jiang, Song Liu, linux-raid, Linux Kernel Mailing List
On 1/3/22 11:53 AM, Linus Torvalds wrote:
> [ Jens wasn't cc'd for some reason but was the signer-off-on the patch
> you bisected to. Added him to the cc. I'll bounce the original
> separately, as I also don't see this on lore.kernel.org - it might not
> have gotten there yet ]
Thanks for adding me in, Song took care of it now. Will get sent out
shortly.
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-01-04 4:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <m3tuekbos5.fsf@nogrod.ivcecceob.t-online.de>
2022-01-03 19:53 ` [Regression] md/raid1: write-intent logging/bitmap issue since fd3b6975e9c1 - v5.16-rc1 Linus Torvalds
2022-01-03 21:59 ` Song Liu
2022-01-04 4:26 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome