Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp523831pxb; Thu, 21 Oct 2021 04:29:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6KCEq3Y449Wzzl+iMvAn8EGvrHmyURuOm2ky2LcxO738yZwgfxMb9nNDFesHpFKbHvZ6k X-Received: by 2002:a17:902:e843:b0:13f:2212:d64c with SMTP id t3-20020a170902e84300b0013f2212d64cmr4807503plg.16.1634815767094; Thu, 21 Oct 2021 04:29:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634815767; cv=none; d=google.com; s=arc-20160816; b=LS5a6I7C+g9mnYfING0Ica83Qo+uPUbTh/z9vWOJV1DoOXzIOiyA32H/Q8yqgpEwET Y6GbvXeK0sogrv0fZYxQPvKbf3r01sXszvQPk2nWGFQpWBbwqa+FhRS4ig8uXRukFk7q Yf7EEVgwzGtOHtpIp9BAtdVIe9j2O41UcnClzwrCJDjAROZZNVdZxOzE8vmnVOlwrx/I eyQR8ErGHr8C9tc9dVzVAJNG/DL0zLtEEWnGlkBXWrlcVxA5s2+6PGOaR6AmQzJgsPG4 DFa2ihAjn1kI/iNi6P8HHdrqwlclkacz+TwyLsA+autRu7+Y5oBjzKMqaBborYbfktgS +2OA== 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=CwTa+1wg5QXOlznIE1zlG7+NnKh5mI81WhlM1haZOqo=; b=bSU2d45iCwkplB/H9EFZZeOtmaGCL/h7mxHPDfgkMCX2GBqtjJXRT1DopAlAO3rwwm 5HC1ywgFU6YaS7FM7/kbEr41hd55CsAuxZa5thGqWTxBV5gnTTjmiPsG7NKc1hFAXhLO had+JBKXVAb3fk8dmkjWFtqAxUBg0Se0/YPxnDXSwAjGIo0uIVI9ZPpsRvs0RIT0O6NK UdbnX/wvO/3AZZZ6eOijBM8W3Qu5EciClgT/Uw5sM+5hmUgkaJUcbA6rMrLPS1Pezgcr lCN1nlld58I9QeUGAQcTFEeU1pm337LecDtuLNa2Up3RXpJo8bkx5Unw4Qcwl0j5egCa w5wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=z+uEzII9; 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 be2si6289704plb.152.2021.10.21.04.29.14; Thu, 21 Oct 2021 04:29:27 -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=bombadil.20210309 header.b=z+uEzII9; 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 S230374AbhJUL3v (ORCPT + 99 others); Thu, 21 Oct 2021 07:29:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230409AbhJUL3q (ORCPT ); Thu, 21 Oct 2021 07:29:46 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F065BC06174E; Thu, 21 Oct 2021 04:27:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=CwTa+1wg5QXOlznIE1zlG7+NnKh5mI81WhlM1haZOqo=; b=z+uEzII9ZHUtZ3Fk7euDjAPwfS zeRAzK6qJ4cqLkR23nItq3LpHoYyrBUL2GcwY14aj4Ro7/8NUln5IOIFgwF969y2xn4yE3e9oWbtC cAMZqr3l+Z+j8PHC3/2XFGeydMqPet48ELB68dSEcR+FVoNODHpuRiVoFIoSyhzv6htMOgorOUP4+ TCJPboNkUtEc4HJMC95EIvF7NKazXYCtJz4YxDfr6vkWlQE19P78Xzkl5FarR+aMvHDzOVgA+f8mx iKdGO6olcluS58IwGNSe+QsIM/RwCY0QX9aDLRdDhSfJYfcqX0Zl09fnqeH7w30Z48pNtQRMa2XIp kDlKTQug==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdWE8-007LU1-La; Thu, 21 Oct 2021 11:27:16 +0000 Date: Thu, 21 Oct 2021 04:27:16 -0700 From: Christoph Hellwig To: Jane Chu Cc: david@fromorbit.com, djwong@kernel.org, dan.j.williams@intel.com, hch@infradead.org, vishal.l.verma@intel.com, dave.jiang@intel.com, agk@redhat.com, snitzer@redhat.com, dm-devel@redhat.com, ira.weiny@intel.com, willy@infradead.org, vgoyal@redhat.com, linux-fsdevel@vger.kernel.org, nvdimm@lists.linux.dev, linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org Subject: Re: [PATCH 4/6] dm,dax,pmem: prepare dax_copy_to/from_iter() APIs with DAXDEV_F_RECOVERY Message-ID: References: <20211021001059.438843-1-jane.chu@oracle.com> <20211021001059.438843-5-jane.chu@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211021001059.438843-5-jane.chu@oracle.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 20, 2021 at 06:10:57PM -0600, Jane Chu wrote: > Prepare dax_copy_to/from_iter() APIs with DAXDEV_F_RECOVERY flag > such that when the flag is set, the underlying driver implementation > of the APIs may deal with potential poison in a given address > range and read partial data or write after clearing poison. FYI, I've been wondering for a while if we could just kill off these methods entirely. Basically the driver interaction consists of two parts: a) wether to use the flushcache/mcsafe variants of the generic helpers b) actually doing remapping for device mapper to me it seems like we should handle a) with flags in dax_operations, and only have a remap callback for device mapper. That way we'd avoid the indirect calls for the native case, and also avoid tons of boilerplate code. "futher decouple DAX from block devices" series already massages the device mapper into a form suitable for such callbacks.