[PATCH] PM / suspend: move userspace freeze before disk sync

Miquel Raynal miquel.raynal at bootlin.com
Fri Sep 3 02:17:55 PDT 2021


Hi Sean,

sean at geanix.com wrote on Fri, 3 Sep 2021 10:17:51 +0200:

> On Thu, Sep 02, 2021 at 06:28:14PM +0200, Rafael J. Wysocki wrote:
> > On Wed, Sep 1, 2021 at 10:35 AM Sean Nyekjaer <sean at geanix.com> wrote:  
> > >
> > > This fixes an issue where data remains unwritten before suspend.  
> > 
> > Well, it doesn't make the issue go away, it just hides it for you and
> > it may very well expose it for someone else.  
> 
> OK
> 
> > 
> > In particular, note that you can compile the kernel with
> > CONFIG_SUSPEND_SKIP_SYNC set which makes it not sync at all during
> > system-wide suspend and this is a valid case expected to work.  It
> > looks like this case doesn't work for you.
> >   
> > > UBI tried to write data, before the mtd device had been unsuspended.  
> > 
> > Well, that's the real problem and it can happen regardless of whether
> > or not this patch is there.  
> 
> How to fix it then?
> We can't live with devices that bricks on unsuspend :/

We then need to focus on UBI/UBIFS implementation (Richard is currently
off), maybe there is more logic than just a basic retry to implement.

Thanks,
Miquèl



More information about the linux-mtd mailing list