Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp395829ybl; Mon, 2 Dec 2019 12:22:47 -0800 (PST) X-Google-Smtp-Source: APXvYqw3w6QzD1P/Yjodz8r2zKFg7NrwGcUwM4sgjUov7zfTGmI97lsTcbks6FC1NVr3NiBrAV2R X-Received: by 2002:a50:ee19:: with SMTP id g25mr928213eds.275.1575318166925; Mon, 02 Dec 2019 12:22:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575318166; cv=none; d=google.com; s=arc-20160816; b=FhGGTmEuELxJRNTr/NbAfXA1E+0UyI8//9AoGDbA68va/UnVKhplztbZitGwCyW/LY IGE9Q+wY42Jvs+/fsklntUGurbC7joJZ2S3L/B4pGj42DgQiV58o5zqwo2dqsEnewzDM s8avrWU6gxghONsDj++5gUller32dxZOeQVd+wiLZ3sk17XhPZ7nfwqp05eODG0P0sMg JtdqLzgJogKOQbnl71ltETDiDDxOGeo+ALnt0yNJgCEm+SbpICR2JNCLvx7Qcp8k4oty p2Dr+00qNuAOgm49bjPohMZHCWxqe0JP/SajlALC2mSaZ/T6pgtj5OIVejJ8yLhS38G9 WJ2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:autocrypt :cc:to:subject:from:dkim-signature; bh=imtAPl4o+FKPOJSi1wuV2NOHPm5W2xW9sOmyCAhb8kI=; b=cdcsw8JaK379aK0hk6QBw6LHPcd0cpqLI3QEA5nkFYOoWlfvhwhmV6jSfveFDmGyTj ePDoezn9aM2mUqc4Qzq/I0fRsJvxVskqEkpCIx5+9Z9aRpJUimn67TKIpDqsLCM5+c3/ RjticE5Ru4TzVbY5PvpGSAcbj+i8o6ptXrExgscLAaDVQbDa6cvCwnmqCwMVljoiHmLA ZdSxrZTtW1OaWDELnpN2uuIo8Ee5oHtP7m0wiFys2nrWEjQlj7FM5Mmx7YMXmU/Yjfyz DOyWRPTfww4phEMRZSFiRQT+Q2kadOX3YLUy8BgY9ip8FyIY5vZdtKFPdf9nT9/JHXV0 UyVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@freesources.org header.s=20160526 header.b=WibdspO+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=freesources.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f27si415813ejf.178.2019.12.02.12.22.23; Mon, 02 Dec 2019 12:22:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@freesources.org header.s=20160526 header.b=WibdspO+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=freesources.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727822AbfLBRdH (ORCPT + 99 others); Mon, 2 Dec 2019 12:33:07 -0500 Received: from mx3.freesources.org ([195.34.172.217]:36472 "EHLO mx3.freesources.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727671AbfLBRdF (ORCPT ); Mon, 2 Dec 2019 12:33:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=freesources.org; s=20160526; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Date:Message-ID:Cc:To:Subject:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=imtAPl4o+FKPOJSi1wuV2NOHPm5W2xW9sOmyCAhb8kI=; b=WibdspO+TC0pJ+/I8+vhuegLVz sX9zkeo3pLOeSWp6z2B46Iu5wU9ES0Xqr3FdPih6+OLgazi72l6f2o4nZtwPG9QwuWsSiYP+sfTa8 3wmrf6hL/9Un6pgd/U+gZlZo+liayQO9zMxV31uY1WhpKTggH5Z1qoTiUO9fmXPZtFNs=; Received: from anon-35-121.vpn.ipredator.se ([46.246.35.121]) by mx3.freesources.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1ibp8c-0008Bx-17; Mon, 02 Dec 2019 17:05:30 +0000 From: Jonas Meurer Subject: [PATCH 0/2] PM: Add a switch for disabling/enabling sync() before suspend To: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: "Rafael J. Wysocki" , Pavel Machek , Len Brown , Tim Dittler , Yannik Sembritzki Autocrypt: addr=jonas@freesources.org; prefer-encrypt=mutual; keydata= mQINBEqFXAEBEAC+7gfLht8lDqGH1EPYoctDHvWQ4nk60UFDLfjqHmBGReL/9C7CyxYaqgY4 V1/DXPCmsO5PvHMSi6VPn3B81alPKMT6syQhxDN6CXETh/mrxRbTPyQVSKYdD/BvA94vgwfy iInR0N7K6J/mRxqKug14vXlABvfmyWBnW89d15OWs9qy1Ge1mHaA8UgIoUInR2mMqNHQf0nF /TtClN2uPmtv/GeGHfSSCQEjYq9Ih2Z1Re2hnwW1peEc0x7piKUXCXHGyrQdz5IE69SqV1gg vafUrWHNPWz5ZtXsihYioNi3ISuoHUjkKdn+t55en5tvWvi+2JQnMCGa/Wr7iA2EOxallR+z rQRBDe/6wp1XEz6vN1LqCeaRyVOR6q00PtN/Ot0tzPswrHKE6binqG6FBRbu+zeo87cNbMmH IAdIT3ysZCAwA2g310fBByCSiNnfhHg2GyqfC4eDtL/K7uVNqQQEon0yv8lzyUloofKER8eA W4PtahGcLLbREnekAwQMpU8y1a++QXdk1ckLoyG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2SCIHpzHfm/mpRL2 Message-ID: <1ee5b9ef-f30e-3fde-2325-ba516a96ced5@freesources.org> Date: Mon, 2 Dec 2019 18:05:27 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Introduce a new run-time sysfs switch to disable/enable sync() before system suspend. This is useful to avoid races and deadlocks if block devices have been suspended before, e.g. by 'cryptsetup luksSuspend'. The second patch changes the behaviour of build-time switch 'CONFIG_SUSPEND_SKIP_SYNC' accordingly, using the build-time switch value as default for our new run-time switch '/sys/power/sync_on_suspend'. Jonas Meurer (2): PM: Add a switch for disabling/enabling sync() before suspend PM: CONFIG_SUSPEND_SKIP_SYNC sets default for '/sys/power/sync_on_suspend' Documentation/ABI/testing/sysfs-power | 15 +++++++++++++++ include/linux/suspend.h | 2 ++ kernel/power/Kconfig | 5 ++++- kernel/power/main.c | 33 +++++++++++++++++++++++++++++++++ kernel/power/suspend.c | 2 +- 5 files changed, 55 insertions(+), 2 deletions(-)