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.

Reply via email to