From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 940C2C433F5 for ; Fri, 3 Sep 2021 09:18:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 80AE761058 for ; Fri, 3 Sep 2021 09:18:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348746AbhICJTA convert rfc822-to-8bit (ORCPT ); Fri, 3 Sep 2021 05:19:00 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:33049 "EHLO relay7-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348714AbhICJS7 (ORCPT ); Fri, 3 Sep 2021 05:18:59 -0400 Received: (Authenticated sender: miquel.raynal@bootlin.com) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id BC5AC20005; Fri, 3 Sep 2021 09:17:56 +0000 (UTC) Date: Fri, 3 Sep 2021 11:17:55 +0200 From: Miquel Raynal To: Sean Nyekjaer Cc: "Rafael J. Wysocki" , Sascha Hauer , Richard Weinberger , Linux PM , Linux Kernel Mailing List , Len Brown , linux-mtd@lists.infradead.org Subject: Re: [PATCH] PM / suspend: move userspace freeze before disk sync Message-ID: <20210903111755.0972850d@xps13> In-Reply-To: <20210903081751.3qq36nrksucqthss@skn-laptop> References: <20210901083442.210230-1-sean@geanix.com> <20210903081751.3qq36nrksucqthss@skn-laptop> Organization: Bootlin X-Mailer: Claws Mail 3.17.7 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sean, sean@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 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