Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4052190ybl; Mon, 26 Aug 2019 04:52:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqy56he5cI8ytTKZORVxNkuRNXUouOlAT9k+ZheGTJjKYCeO/z2Y+elscgA9xa6DJQPmWGKg X-Received: by 2002:a17:902:e584:: with SMTP id cl4mr18112817plb.160.1566820378927; Mon, 26 Aug 2019 04:52:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566820378; cv=none; d=google.com; s=arc-20160816; b=XrEb6+DtG9/hay3MR0fISuQ5PESB7rLf/16msiRqf49FhrTkSR/1utPoPiZ3ghoUxB TPiPXa7+kRRel1+42y/nbdNY7V/B2schfb0al6WaRUsfYa4r4ciVzroO99zQTBxXNgkh 3h4sVRE4K4NPxPMxVJnMzsBzkUo8XBCx3aRlQYUlNGCIkpeewmZMVgPRlp/MAetmfB0A GcyhgOJ6Xh/UcgPwLF0SEJhu2tZfkT9s/AAzaayn3S+zSVB2Fxd8bBy5RWpeGQHUnZ3J xO1zwi7ubSb1RE/QVCO/CeXRPxVNqdMGe1e7nAk0h0Nyn17iw5hv7PgOVTBXvysIcsYJ aShA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=1TviH4OE9g0ePmo1qrMkYXUOeKWbt5qrTfsr6aQ4WxU=; b=bzmW8tQjAP9kWJT7ozwESHIKYl6BL55U9oIULMur/7IJWd26vzahOd1oSXkGchhNd4 MSr3fqIf+zH4lOIjuUUhHA1Gh89ObmH2rjNu4XxPKhal1HypzZWGxmwITCloCoDd/k0K h/v+qdQ9gGqfckH4aeJPZuTGWHla64kLmfeTsnmWkk6G3UOEW2109qx24N6zsmMtjdcE xwQ4pYtxg1zEfpr/bnaCl72G9bttPYEd7QGlcNkOZdsJDpW/K/nOh3r2hBBdPpoiBKOt 8sOAXcCxRkHi5AQqkF2bjvFveG/f7PBcNhYxpAV2Ujw6qNv44Rd4/5fGJICNqvHrgTpW i+YQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=O5LzO9tg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 28si8713786pgp.22.2019.08.26.04.52.42; Mon, 26 Aug 2019 04:52:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=O5LzO9tg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730927AbfHZLvy (ORCPT + 99 others); Mon, 26 Aug 2019 07:51:54 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:60724 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726497AbfHZLvy (ORCPT ); Mon, 26 Aug 2019 07:51:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=1TviH4OE9g0ePmo1qrMkYXUOeKWbt5qrTfsr6aQ4WxU=; b=O5LzO9tgN9SeWoWyNekXsB84f z4Ph/BrpqE+paC2R4jl2cl2TzLbtp+2yxI/fOw+MeqKPMnQK4QJX02locG6ZNxYahWDmjweD6nnpg nva5LPAg0YFTr0PZea8YcP/FFVV1VzDZD6JvgezWruy98VHRS+ZkdjTBpAK3iq45ziNpZGN+BQfyS aQYxVxYIk/0VrRqweGa/QpVtUNU4zCDyPzo8JtaUeYsE38Q/BoMXY9yLOwEoeGoA+o4oHh7VfCKDf kZKrL8CCks1psw19Ta4SajwqsffaKQBtg+wngaRH25bXkw9vP0oY6UM4WHCmXkT7MQvhJ118VjupW hmWIo3Yzw==; Received: from hch by bombadil.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1i2DXM-0007qP-IW; Mon, 26 Aug 2019 11:51:52 +0000 Date: Mon, 26 Aug 2019 04:51:52 -0700 From: Christoph Hellwig To: Vivek Goyal Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org, virtio-fs@redhat.com, miklos@szeredi.hu, stefanha@redhat.com, dgilbert@redhat.com, Dan Williams Subject: Re: [PATCH 01/19] dax: remove block device dependencies Message-ID: <20190826115152.GA21051@infradead.org> References: <20190821175720.25901-1-vgoyal@redhat.com> <20190821175720.25901-2-vgoyal@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190821175720.25901-2-vgoyal@redhat.com> User-Agent: Mutt/1.11.4 (2019-03-13) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 21, 2019 at 01:57:02PM -0400, Vivek Goyal wrote: > From: Stefan Hajnoczi > > Although struct dax_device itself is not tied to a block device, some > DAX code assumes there is a block device. Make block devices optional > by allowing bdev to be NULL in commonly used DAX APIs. > > When there is no block device: > * Skip the partition offset calculation in bdev_dax_pgoff() > * Skip the blkdev_issue_zeroout() optimization > > Note that more block device assumptions remain but I haven't reach those > code paths yet. I think this should be split into two patches. For bdev_dax_pgoff I'd much rather have the partition offset if there is on in the daxdev somehow so that we can get rid of the block device entirely. Similarly for dax_range_is_aligned I'd rather have a pure dax way to offload zeroing rather than this bdev hack. In the long run I'd really like to make the bdev vs daxdev in iomap a union instead of having to carry both around.