Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp360244pxb; Fri, 3 Sep 2021 03:56:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzeJal/NFwh8esq+brzG+dW1rCeT3em10uVUt/SZVCI0fhowfzT0csImKR8z2chL1wH/+6K X-Received: by 2002:aa7:c559:: with SMTP id s25mr3370190edr.379.1630666613027; Fri, 03 Sep 2021 03:56:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630666613; cv=none; d=google.com; s=arc-20160816; b=fUeZwREGOH4TS+DP45v3GMahtpn6m4aZ7laaXB5SZDlaOXsj9A/nZ14vBN9cnQu/jy DgaDPPq+sO2JUsSgzMw4JnIO0nddU9dFNmBBPVYpO9y+q/1c/jh93k3idoYoRz7XLVAJ 8W0/HjRFDepL0o2Z4cf9eUjoqZMkARj9BCFGCTJAiJU+PE9NC2PZKTA4/+PjjN/FbNI0 nYOboCT3ciqDKK4Ys/ySfvPDretf3Np4/MyN5Fs3mZw5R6fdz/fSweKUF52juHJ/26ny Ruk/j3Z5RDUtGntpAco/Ph0LIwgV1pY3cF4wDdifuVb4/Cgb9TyN4DqAriSr9hxpcvVc UoLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=KPW9W82xVmaIHt7gotGT62oCsWDUZHb3ktsaPHFm5s0=; b=h/gWhpuepoIyTbiPA5IdJTJx0qIl2dyIVelw96xL3MC9991UWYfR7xPzMr7P/F0HO/ CTb86Iy3upeC+4Gobr9XV/JLqtFtL4nIFQWL/WvijvNm22XYZSN/SdchF9waa372d8YZ 8tRNIdY0mPmDAMiBqKdGck1IBDlB4GultLSK/jkB7TvCc0KbPKvWSVZ2uGxkJKK8Exuv J91NWAwLuBynj2Gu54IscInorfBUkqIMaO0y3LYYO1OvQ6AoWwM2QFz4dNV29SJsur4S 3ShVo7qey+g13ZrfDNr182F1cfuAA/mtsPt7L20lYwRXGI4T8xtIwyslF0e6xCC86SnE zIMw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cb3si4701669edb.528.2021.09.03.03.56.28; Fri, 03 Sep 2021 03:56:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348734AbhICJTA convert rfc822-to-8bit (ORCPT + 99 others); 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