Re: [PATCH] md: allow metadata updates while suspending an array - fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 23 2018, Gi-Oh Kim wrote:

> On Wed, Oct 3, 2018 at 7:04 AM NeilBrown <neilb@xxxxxxxx> wrote:
>>
>>
>> Commit 35bfc52187f6 ("md: allow metadata update while suspending.")
>> added support for allowing md_check_recovery() to still perform
>> metadata updates while the array is entering the 'suspended' state.
>> This is needed to allow the processes of entering the state to
>> complete.
>>
>
> Hi,
>
> Could anybody please inform me how to test this patch?

You need to get mddev_suspend() to be called while mddev_lock() is held,
and for a metadata write to be triggered somewhere in there.
When the bug hits, you get a deadlock.

You can harmlessly trigger mddev_suspend() while holding the lock by
  echo 0 > /sys/block/mdXX/md/suspend_hi

so maybe just doing that in a tight loop on an active array might be
enough.


>
> I would like to know how I can check "Commit 35bfc52187f6 ("md: allow
> metadata update while suspending.")" does not work
> and check this patch does work on my system.
> That is because there is a similar problem on my system.
> I would like to check that the problem on my system could be fixed by
> this patch.
>
>> Unfortunately, the patch doesn't really work.  The test for
>
> Could you inform me what "The test" is?
>
void md_check_recovery(struct mddev *mddev)
{
	if (mddev->suspended)
		return;

That line of code where the "if" statement tests the value of
mddev->suspended - that is the "test" that I referred to.

NeilBrown

>> "mddev->suspended" at the start of md_check_recovery() means that the
>> function doesn't try to do anything at all while entering suspend.
>
>
> -- 
> GIOH KIM
> Linux Kernel Entwickler
>
> ProfitBricks GmbH
> Greifswalder Str. 207
> D - 10405 Berlin
>
> Tel:       +49 176 2697 8962
> Fax:      +49 30 577 008 299
> Email:    gi-oh.kim@xxxxxxxxxxxxxxxx
> URL:      https://www.profitbricks.de
>
> Sitz der Gesellschaft: Berlin
> Registergericht: Amtsgericht Charlottenburg, HRB 125506 B
> Geschäftsführer: Achim Weiss, Matthias Steinberg, Christoph Steffens

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux