Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp960933rwr; Thu, 27 Apr 2023 10:16:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Yuc2TTHbRhblWe6Iw8oGhPMxQGBIsp2NJ4IGjqBqR/23L8m/64JIdsz6SeF3qdKpZk31n X-Received: by 2002:a05:6a20:7da6:b0:f1:1ab5:5076 with SMTP id v38-20020a056a207da600b000f11ab55076mr913841pzj.2.1682615794839; Thu, 27 Apr 2023 10:16:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682615794; cv=none; d=google.com; s=arc-20160816; b=BKNAXbRb9Ak7XvXn0Cr5SHBAtVu5pihmi7DG/yyXcXl+3c2uprptxLK+CbIcfwlax9 UaAeAD0LwUpWSW7SWjHN7zqk2pxyrHgyOUrX68TediA4LEubZjiXdpuQE7DblySS2+ei ji5oBf4Y3KLvYynbqGArPHqLzbPhVAoNW6AYhqdH7CX5KCcS03Q+sum9JOtCJDMoo1FN dKd/m4GatAR0vP5B+NUgVJXzmfgkvVyTLux3wb24WZkZnMHDncoRMRb4CrcO7wNhir1y Ydjl7RrOoPD1Ys//C0CO26bt+WaGcfn+58GKNeXcSZOInIkPQCXk0izIqIsI+x508tF+ ZHAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=uhJ73UItzGQcreWJrnHyLgmOUbYbtusGDnC6LxfnZcM=; b=CN5t6qSYIQQrU3AcOhLv2Y/BmErnthc5d28PZDdFjY9BfsNPDE/nBZMRpzsvXG8q8o mHHduZl3D0HHPB76QOpvWdv3usMQH54Zy8a+DYUeplEpzL2S0Z0+kXEhVAbN+uB5Mm14 eYkxg2ytbuaxmYPGjfnwlOd8c61eU59dUxNB1QhPEM/Z86otJCcNZIVvgD126KiAwguf Ozp7Mq2azWtpMON0hfBsP3fwk7slhRcEMs9iT0hePqH15oC/5lnR5nj0Gn3Mh+T27bA8 Hc5ntJ7C9NMOhyTMcFT0qtVMci0kvskFumdN5ny+Nfp3D6YL3dD7VJn60Kyg8lMN7+eK 0Qvw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k18-20020aa79d12000000b00622ae306420si18827390pfp.279.2023.04.27.10.16.23; Thu, 27 Apr 2023 10:16:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244319AbjD0RCv convert rfc822-to-8bit (ORCPT + 99 others); Thu, 27 Apr 2023 13:02:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244070AbjD0RCt (ORCPT ); Thu, 27 Apr 2023 13:02:49 -0400 Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B11A26BE; Thu, 27 Apr 2023 10:02:48 -0700 (PDT) Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-94f9cd65b1aso250929566b.0; Thu, 27 Apr 2023 10:02:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682614967; x=1685206967; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BGZN0OIlJZEcU3Y6FEqZUH0KBPvZDL+wwAagUBR8bvo=; b=iw0GTrbTlW1B51OhgEuXs31lv7yQNan8kwkEhOld8yDDf9xhEflygjTsE9myZN894Z LWsT1bIM2axdcbuJZnf9sbHXAXwxpudjgm5y7toRxIiNQqf9y83Ym9yB98ZQy2xhUHSE o9Ockk+ClQb5C5aECfoP8YpeF1k/xwbH9Zv5uP9NTdJf6kuV0ykVeH73h57RwUZAvLE1 fkS8UfetrZ9wtmqj5Zuh/hezeXSOCt038A+1om1Ld3wiVBD5DO60PhyUaByvIFVmQppt X7IXdEO+faThpkapmp2oesveAVxJaw6N5gbuOq6stg0j5i5HH9IZWZU6bETIqaNFATn9 EiJg== X-Gm-Message-State: AC+VfDyEnp5/n178loZG4/bZJny+ccjLCRPA/VTiBADDzOuxKPCkB3RI 6IOD47od2dNrr7hJ481/LyOPUN3w0lazr3HHVcM= X-Received: by 2002:a17:906:6483:b0:94f:4122:28f5 with SMTP id e3-20020a170906648300b0094f412228f5mr2336502ejm.2.1682614966651; Thu, 27 Apr 2023 10:02:46 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "Rafael J. Wysocki" Date: Thu, 27 Apr 2023 19:02:35 +0200 Message-ID: Subject: Re: [PATCH v3 0/2] Fix test_resume failure by openning swap device non-exclusively To: Chen Yu Cc: "Rafael J. Wysocki" , Len Brown , Ye Bin , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Pavankumar Kondeti , Yifan Li Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 14, 2023 at 6:14 AM Chen Yu wrote: > > test_resume does not work in current kernel when using swapfile for hibernation. > This is because the swap device should be openned non-exclusively in test_resume mode. > > Patch 1 is a preparation to turn snapshot_test into a global variable. > Patch 2 is the fix to open swap device non-exclusively only for test_resume mode. > > Change since v2: > Adjust the initialization of fmode and refine the commit message > per Rafael's suggestion. > > Change since v1: > Turn snapshot_test into global variable and do not introduce parameters for swsusp_check() > nor load_image_and_restore(). > > Chen Yu (2): > PM: hibernate: Turn snapshot_test into global variable > PM: hibernate: Do not get block device exclusively in test_resume mode > > kernel/power/hibernate.c | 15 ++++++++++++--- > kernel/power/power.h | 1 + > kernel/power/swap.c | 8 ++++++-- > 3 files changed, 19 insertions(+), 5 deletions(-) > > -- Both applied as 6.4-rc material, thanks!