Re: [PATCH v5 2/8] md: Neither resync nor reshape while the system is frozen

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

 



On Wed, 2017-10-04 at 03:16 +0200, Luis R. Rodriguez wrote:
> On Mon, Oct 02, 2017 at 03:52:12PM -0700, Bart Van Assche wrote:
> > diff --git a/drivers/md/md.c b/drivers/md/md.c
> > index 3f7426120a3b..a2cf2a93b0cb 100644
> > --- a/drivers/md/md.c
> > +++ b/drivers/md/md.c
> > @@ -8961,6 +8963,37 @@ static void md_stop_all_writes(void)
> >  		mdelay(1000*1);
> >  }
> >  
> > +/*
> > + * Ensure that neither resyncing nor reshaping occurs while the system is
> > + * frozen.
> > + */
> > +static int md_notify_pm(struct notifier_block *bl, unsigned long state,
> > +			void *unused)
> > +{
> > +	struct mddev *mddev;
> > +	struct list_head *tmp;
> > +
> > +	pr_debug("%s: state = %ld; system_freezing_cnt = %d\n", __func__, state,
> > +		 atomic_read(&system_freezing_cnt));
> > +
> > +	switch (state) {
> > +	case PM_HIBERNATION_PREPARE:
> 
> Hm, why not also include and use this for PM_SUSPEND_PREPARE and/or
> a PM_RESTORE_PREPARE.
> 
>         case PM_HIBERNATION_PREPARE:
>         case PM_SUSPEND_PREPARE:
>         case PM_RESTORE_PREPARE:

Thanks for the feedback Luis. I will make sure that resync activity is also
stopped for the PM_SUSPEND_PREPARE and PM_RESTORE_PREPARE cases.

Bart.��.n��������+%������w��{.n�����{����w��ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f




[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