Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1144643pxb; Thu, 16 Sep 2021 00:14:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQCVlkWFIZPSPJRawcwD4Gu/F72eduIHxp4P8Cmkkr/5mcqpT28xacnB0j79ppmMomN6BW X-Received: by 2002:a05:6638:1613:: with SMTP id x19mr3153595jas.77.1631776444408; Thu, 16 Sep 2021 00:14:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631776444; cv=none; d=google.com; s=arc-20160816; b=lb9q4MLlVNY5pdh667osj4X7axhjWzL3w709oNiImqH+TPi3ciApTbPfoem1R+pDk7 iveDe3JUCGh4PvbRKin6dgxnO0QVFX3ozVKar5ZU2jJux7KItZbeBy7qdiRd60eq2Qr7 ZCHT4b0mjESaAMtvI6n9UNbtSufqEEwTfsa/h0BjxGOhJr/zgWKuDVTgIsaNK0fCoFva s0tezEXIBz9FPc+l1fCDSSKcPS/2Jx3orGnGM428gHQNYwQIrldwBDmVhLY+2XK18sw8 Dgswo5efz9MEzg0psSdg4EtxRXTVjJ5L5dNfX4KmX2f39augHJ/JjUjlwDIZuF0aloUA iQXA== 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:dkim-signature; bh=VfwB0VmftNDQd6y4aXaAqhBjlfbTQ/OFHN+xTApc8gs=; b=0JEmyx3ryfTDNUz6nYQIPW2EKZSSFmrq38oAuEUcH5RxFrbAAB1AefDti6fak8bQmD GZdaW8rtVEv9eNh7A5Tae+7cYEBNMsvjavqzGYj2NPNYJ0H1oLecgHZXo7UXROY9jbPr iBp8die2FYtWnXaj1YyCtIddplvjTwEh23BneSzScDAS8w3lcoubva+Iv/audd6A+aBp JUi53LMU/sM+5yr6o9uzTD/E3YwmpvgFiLJWhz5JRWYpDtHnrZ/4x1xLMO76yq75m06B Ej3i3k6cJ9usvaOzzsnmVXQ6c/fAe/7Ko/oQtEBjdjrKxQXhR67RQBuci23RjRWAbJZU blGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=DsoV0b3H; 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 j12si2474824ils.66.2021.09.16.00.13.52; Thu, 16 Sep 2021 00:14:04 -0700 (PDT) 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; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=DsoV0b3H; 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 S234595AbhIPHOW (ORCPT + 99 others); Thu, 16 Sep 2021 03:14:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232254AbhIPHOV (ORCPT ); Thu, 16 Sep 2021 03:14:21 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 361CCC061574; Thu, 16 Sep 2021 00:13:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=VfwB0VmftNDQd6y4aXaAqhBjlfbTQ/OFHN+xTApc8gs=; b=DsoV0b3HNBIlGr+GxiEumtpSDq JiOkrBKaFQfhHLKqwzQs8mk8MkY4v+YlDMaFtzvPpoo7QnrTEBKh/9c7TKaavub88pASLyp9pZtHy YQeYen6mmgH6JS5h380iv1K9328nIe6NzWGX2SbF396xIVxG8m5IImv3dYEqSxsrhQEu+wWIJwngf Q0IA3T9WyEG8p3yQEGl5spbSnshUKhaOdZNF6PzORcSthAxGHMB9kxLj1MNftSCWj4PG/t0Y0ujF1 X5TD88sqTAi5dwPU2Bn04oRqGW0RlJWjQuy59uiOI7TmqxoX8gNh1og9ZdDwOBaVxPXj26nTglaof s5zneXzA==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mQlYf-00GPH6-0D; Thu, 16 Sep 2021 07:11:51 +0000 Date: Thu, 16 Sep 2021 08:11:44 +0100 From: Christoph Hellwig To: Dan Williams Cc: "Darrick J. Wong" , Jane Chu , Vishal L Verma , Dave Jiang , "Weiny, Ira" , Al Viro , Matthew Wilcox , Jan Kara , Linux NVDIMM , Linux Kernel Mailing List , linux-fsdevel Subject: Re: [PATCH 0/3] dax: clear poison on the fly along pwrite Message-ID: References: <20210914233132.3680546-1-jane.chu@oracle.com> <516ecedc-38b9-1ae3-a784-289a30e5f6df@oracle.com> <20210915161510.GA34830@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 15, 2021 at 01:27:47PM -0700, Dan Williams wrote: > > Yeah, Christoph suggested that we make the clearing operation explicit > > in a related thread a few weeks ago: > > https://lore.kernel.org/linux-fsdevel/YRtnlPERHfMZ23Tr@infradead.org/ > > That seemed to be tied to a proposal to plumb it all the way out to an > explicit fallocate() mode, not make it a silent side effect of > pwrite(). Yes. > > > > Each of the dm drivers has to add their own ->clear_poison operation > > that remaps the incoming (sector, len) parameters as appropriate for > > that device and then calls the lower device's ->clear_poison with the > > translated parameters. > > > > This (AFAICT) has already been done for dax_zero_page_range, so I sense > > that Dan is trying to save you a bunch of code plumbing work by nudging > > you towards doing s/dax_clear_poison/dax_zero_page_range/ to this series > > and then you only need patches 2-3. > > Yes, but it sounds like Christoph was saying don't overload > dax_zero_page_range(). I'd be ok splitting the difference and having a > new fallocate clear poison mode map to dax_zero_page_range() > internally. That was my gut feeling. If everyone feels 100% comfortable with zeroingas the mechanism to clear poisoning I'll cave in. The most important bit is that we do that through a dedicated DAX path instead of abusing the block layer even more. > > > > > > BTW, our customer doesn't care about creating dax volume thru DM, so. > > > > They might not care, but anything going upstream should work in the > > general case. > > Agree. I'm really worried about both patartitions on DAX and DM passing through DAX because they deeply bind DAX to the block layer, which is just a bad idea. I think we also need to sort that whole story out before removing the EXPERIMENTAL tags.