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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA85EC4361B for ; Tue, 15 Dec 2020 23:10:40 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 03E2022BEA for ; Tue, 15 Dec 2020 23:10:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 03E2022BEA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=fromorbit.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5DC296B0036; Tue, 15 Dec 2020 18:10:39 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 564626B005D; Tue, 15 Dec 2020 18:10:39 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 452B16B0068; Tue, 15 Dec 2020 18:10:39 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0159.hostedemail.com [216.40.44.159]) by kanga.kvack.org (Postfix) with ESMTP id 24D456B0036 for ; Tue, 15 Dec 2020 18:10:39 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id DBEC6362C for ; Tue, 15 Dec 2020 23:10:38 +0000 (UTC) X-FDA: 77597062956.22.juice15_4f06e5327427 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin22.hostedemail.com (Postfix) with ESMTP id B821C18038E6B for ; Tue, 15 Dec 2020 23:10:38 +0000 (UTC) X-HE-Tag: juice15_4f06e5327427 X-Filterd-Recvd-Size: 4832 Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by imf48.hostedemail.com (Postfix) with ESMTP for ; Tue, 15 Dec 2020 23:10:37 +0000 (UTC) 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 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 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 > >=20 > > On 2020/12/15 =E4=B8=8A=E5=8D=884:58, Jane Chu wrote: > > > Hi, Shiyang, > > >=20 > > > 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. > > > >=20 > > > > Change from v1: > > > > =C2=A0=C2=A0 - Intorduce ->block_lost() for block device > > > > =C2=A0=C2=A0 - Support mapped device > > > > =C2=A0=C2=A0 - Add 'not available' warning for realtime device in= XFS > > > > =C2=A0=C2=A0 - Rebased to v5.10-rc1 > > > >=20 > > > > This patchset moves owner tracking from dax_assocaite_entry() to = pmem > > > > device, by introducing an interface ->memory_failure() of struct > > > > pagemap.=C2=A0 The interface is called by memory_failure() in mm,= and > > > > implemented by pmem device.=C2=A0 Then pmem device calls its ->bl= ock_lost() > > > > to find the filesystem which the damaged page located in, and cal= l > > > > ->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 > > >=20 > > > Does that mean clearing poison? if so, would you mind to elaborate > > > specifically which change does that? > >=20 > > Recovering data for filesystem (or pmem device) has not been done in > > this patchset...=C2=A0 I just triggered the handler for the files sha= ring the > > corrupted page here. >=20 > Thanks! That confirms my understanding. >=20 > 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. --=20 Dave Chinner david@fromorbit.com