Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp40253pxu; Tue, 15 Dec 2020 15:14:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJyZAQ7bUIXY2a8SSFhbb+TObhv+SHVpBC8avzJ2EJwvl8e62vbloUV7wXMZvmy74JH0kVN9 X-Received: by 2002:a17:906:7aca:: with SMTP id k10mr11778665ejo.388.1608074084250; Tue, 15 Dec 2020 15:14:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608074084; cv=none; d=google.com; s=arc-20160816; b=TnQzJsCO2QfdjlOJ5ix85AkloAkdcMt7SmfhODQF3F13UGf/U9U9lT9TkRNMr6NMz1 4fPfPkCHR5Nca9/uS+N3supHTyF5lhTJy2o9khIY/+Id0k5GzI6cIyDTMCGroCXMpnRm fS1Ap30gX97Y9il639IgdQTHTZmnoVX4/cltG+JXiGnMxgBSq/bUuUU5IZj10tzGHFLM zKSmy9FpxWLCx+WftNbJewiHm53Md9WEq5QRl9kkx6yyUgT4lRsfN1wSLDFO0g+rGd+H 22uJ81jLUMCYpKEvXeNfY36Kj6cCfUfRH1zO2RJctczrN+OJTgkX/SX/4H3zt+MxAnS5 XD6w== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=zibo3tcsadGMbg71PpsQj4NDJoGErbRHFV8q2RGHvAI=; b=J5KKxu8qd+wJGI/T6CnccbdRRXyk8QAA9zoshDl9M+9TZz4/657iP88H1BowCI0P6n OdBMF6aQHvdu+ofMTzQMZvm8nfM3m6rxrlBQiu/oe42wsMBk/Dw+aGdoQJ2CFh1lAYuC 9VdcST5ZcHk/0GjyXtPF2VJ7sjMRNRMLB0UHZjewGGQPV4HKTwivFs3w8qRV5IhP7xp9 ACF3nKj2SvIo0eB++/OGwrhabc5JLSxWJzaD+LhsZYe2wKpQkwYvnhnXJWBwg8lLZblC U8hmG+eeCjBr/3fFz7otmZBJAkMTjzbH9EOGRwpC3yu0igx2tX/rNATpnuDRc053BqES YWBQ== 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 x60si1602565ede.80.2020.12.15.15.14.20; Tue, 15 Dec 2020 15:14:44 -0800 (PST) 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 S1730016AbgLOXMn (ORCPT + 99 others); Tue, 15 Dec 2020 18:12:43 -0500 Received: from mail105.syd.optusnet.com.au ([211.29.132.249]:43648 "EHLO mail105.syd.optusnet.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726414AbgLOXLS (ORCPT ); Tue, 15 Dec 2020 18:11:18 -0500 Received: from dread.disaster.area (pa49-179-6-140.pa.nsw.optusnet.com.au [49.179.6.140]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 1941F3C3F8B; Wed, 16 Dec 2020 10:10:29 +1100 (AEDT) Received: from dave by dread.disaster.area with local (Exim 4.92.3) (envelope-from ) id 1kpJSY-004N5L-QJ; Wed, 16 Dec 2020 10:10:22 +1100 Date: Wed, 16 Dec 2020 10:10:22 +1100 From: Dave Chinner To: Jane Chu Cc: Ruan Shiyang , linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-nvdimm@lists.01.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-raid@vger.kernel.org, darrick.wong@oracle.com, dan.j.williams@intel.com, hch@lst.de, song@kernel.org, rgoldwyn@suse.de, qi.fuli@fujitsu.com, y-goto@fujitsu.com Subject: Re: [RFC PATCH v2 0/6] fsdax: introduce fs query to support reflink Message-ID: <20201215231022.GL632069@dread.disaster.area> References: <20201123004116.2453-1-ruansy.fnst@cn.fujitsu.com> <89ab4ec4-e4f0-7c17-6982-4f55bb40f574@oracle.com> <3b35604c-57e2-8cb5-da69-53508c998540@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3b35604c-57e2-8cb5-da69-53508c998540@oracle.com> X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.3 cv=YKPhNiOx c=1 sm=1 tr=0 cx=a_idp_d a=uDU3YIYVKEaHT0eX+MXYOQ==:117 a=uDU3YIYVKEaHT0eX+MXYOQ==:17 a=IkcTkHD0fZMA:10 a=zTNgK-yGK50A:10 a=7-415B0cAAAA:8 a=1WtExyGbPUdzLH7rxhUA:9 a=QEXdDO2ut3YA:10 a=biEYGPWJfzWAr4FL6Ov7:22 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 15, 2020 at 11:05:07AM -0800, Jane Chu wrote: > On 12/15/2020 3:58 AM, Ruan Shiyang wrote: > > Hi Jane > > > > On 2020/12/15 上午4:58, Jane Chu wrote: > > > Hi, Shiyang, > > > > > > On 11/22/2020 4:41 PM, Shiyang Ruan wrote: > > > > This patchset is a try to resolve the problem of tracking shared page > > > > for fsdax. > > > > > > > > Change from v1: > > > >    - Intorduce ->block_lost() for block device > > > >    - Support mapped device > > > >    - Add 'not available' warning for realtime device in XFS > > > >    - Rebased to v5.10-rc1 > > > > > > > > This patchset moves owner tracking from dax_assocaite_entry() to pmem > > > > device, by introducing an interface ->memory_failure() of struct > > > > pagemap.  The interface is called by memory_failure() in mm, and > > > > implemented by pmem device.  Then pmem device calls its ->block_lost() > > > > to find the filesystem which the damaged page located in, and call > > > > ->storage_lost() to track files or metadata assocaited with this page. > > > > Finally we are able to try to fix the damaged data in filesystem and do > > > > > > Does that mean clearing poison? if so, would you mind to elaborate > > > specifically which change does that? > > > > Recovering data for filesystem (or pmem device) has not been done in > > this patchset...  I just triggered the handler for the files sharing the > > corrupted page here. > > Thanks! That confirms my understanding. > > With the framework provided by the patchset, how do you envision it to > ease/simplify poison recovery from the user's perspective? At the moment, I'd say no change what-so-ever. THe behaviour is necessary so that we can kill whatever user application maps multiply-shared physical blocks if there's a memory error. THe recovery method from that is unchanged. The only advantage may be that the filesystem (if rmap enabled) can tell you the exact file and offset into the file where data was corrupted. However, it can be worse, too: it may also now completely shut down the filesystem if the filesystem discovers the error is in metadata rather than user data. That's much more complex to recover from, and right now will require downtime to take the filesystem offline and run fsck to correct the error. That may trash whatever the metadata that can't be recovered points to, so you still have a uesr data recovery process to perform after this... > And how does it help in dealing with page faults upon poisoned > dax page? It doesn't. If the page is poisoned, the same behaviour will occur as does now. This is simply error reporting infrastructure, not error handling. Future work might change how we correct the faults found in the storage, but I think the user visible behaviour is going to be "kill apps mapping corrupted data" for a long time yet.... Cheers, Dave. -- Dave Chinner david@fromorbit.com