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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6056C00140 for ; Sun, 21 Aug 2022 23:33:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231966AbiHUXdA (ORCPT ); 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 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