Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp1756028rwa; Sun, 21 Aug 2022 16:37:11 -0700 (PDT) X-Google-Smtp-Source: AA6agR7OycqlRx6qtPPzNwDDvE0+JpZVYxZ7CMWMGM2d0tvSW6C5zatbCadPEIHxpXfU9yuDkOeB X-Received: by 2002:a05:6402:d05:b0:435:b2a6:94eb with SMTP id eb5-20020a0564020d0500b00435b2a694ebmr13992668edb.87.1661125031001; Sun, 21 Aug 2022 16:37:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661125030; cv=none; d=google.com; s=arc-20160816; b=ClNPxpnq9G1TmEz7xg9TxZc4VVHwds4WKQze6MgKp7A3Irjd+40c9XmBJr+PvlXist 4mfwIp7N8DKvkAp6zNaYwu1wXbIlIrGZWNt564y4EBOPpddUOd7rxRdfb5WLK91TzT8j moN+S0SXi3Mu6eQ6z5a6gbM1pOLmrs/woN1rw0TjmkLCSduAUXaMTOJqRBRnhTr3WvhU FFjtCyO07/quCf5ynaFkTAd++oOnEvRaZI51/LHRclEayzgp7L/bN61ksXj3DRyP0AkI 0YPTvvQt9QpE0CrtZtgyAtyedaNWcKfBD0zOjeYoemlEXKoiEV/Mhhp3gPrnCKPK+eFr sGtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=kzyt/wRxEfrQuP5jq1fruRNc8SB2mj/v9wR++sBxqaY=; b=vnJwhTSLsmuuilblCwajK4wMnDoKDhXGIDiFUaOgn1qJVqs0MJ6RaNheUWwHOURk3I O8dyEIOywlffozUTubWDctK80Bjyf7fSuRRWRZnJHcKCsS78sAGJuXN0vtsS8sPzyxD7 uyIvyHCNgDsEkDDG3TOQsvVSB5OoYSjzGqE0lBsSBaUvs7I1ey2XXW3fhsv2wMtoUGit Fro6Ykg523duqb9EQkETC+/Qjvgky1U0oben/viTjf8EsZ00ijk3hpxx5eQjncxPcSiV oWCeqUAem1SUqW2qJgRPCb/O1Ioxa7uetk4YTCI9r1CLFk1nvKVdC7qse6HcJ5MVXCIL BMMw== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id js18-20020a17090797d200b007310a6d6a7esi9315417ejc.975.2022.08.21.16.36.45; Sun, 21 Aug 2022 16:37:10 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231956AbiHUXdA (ORCPT + 99 others); Sun, 21 Aug 2022 19:33:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229948AbiHUXc6 (ORCPT ); Sun, 21 Aug 2022 19:32:58 -0400 Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 02F21183AB; Sun, 21 Aug 2022 16:32:57 -0700 (PDT) Received: from dread.disaster.area (pa49-195-4-169.pa.nsw.optusnet.com.au [49.195.4.169]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 024CE62D65C; Mon, 22 Aug 2022 09:32:54 +1000 (AEST) Received: from dave by dread.disaster.area with local (Exim 4.92.3) (envelope-from ) id 1oPuR1-00FxHU-PQ; Mon, 22 Aug 2022 09:32:51 +1000 Date: Mon, 22 Aug 2022 09:32:51 +1000 From: Dave Chinner To: "Darrick J. Wong" Cc: Shiyang Ruan , Dan Williams , "linux-kernel@vger.kernel.org" , "linux-xfs@vger.kernel.org" , "nvdimm@lists.linux.dev" , "linux-mm@kvack.org" , "linux-fsdevel@vger.kernel.org" , "hch@infradead.org" , "jane.chu@oracle.com" Subject: Re: [PATCH] xfs: on memory failure, only shut down fs after scanning all mappings Message-ID: <20220821233251.GI3600936@dread.disaster.area> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.4 cv=VuxAv86n c=1 sm=1 tr=0 ts=6302c0a8 a=FOdsZBbW/tHyAhIVFJ0pRA==:117 a=FOdsZBbW/tHyAhIVFJ0pRA==:17 a=kj9zAlcOel0A:10 a=biHskzXt2R4A:10 a=VwQbUJbxAAAA:8 a=20KFwNOVAAAA:8 a=7-415B0cAAAA:8 a=1mAKx1ogGfV0O7zOtsIA:9 a=CjuIK1q_8ugA:10 a=AjGcO6oz07-iQ99wixmX:22 a=biEYGPWJfzWAr4FL6Ov7:22 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Thu, Aug 18, 2022 at 10:00:17AM -0700, Darrick J. Wong wrote: > From: Darrick J. Wong > > xfs_dax_failure_fn is used to scan the filesystem during a memory > failure event to look for memory mappings to revoke. Unfortunately, if > it encounters an rmap record for filesystem metadata, it will shut down > the filesystem and the scan immediately. This means that we don't > complete the mapping revocation scan and instead leave live mappings to > failed memory. Fix the function to defer the shutdown until after we've > finished culling mappings. > > While we're at it, add the usual "xfs_" prefix to struct failure_info, > and actually initialize mf_flags. > > Signed-off-by: Darrick J. Wong Looks fine. Reviewed-by: Dave Chinner -- Dave Chinner david@fromorbit.com