From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 181C568 for ; Mon, 1 Nov 2021 16:17:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635783467; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=F2vxwqlB6wFzeCRM5lLa77O94J13VaOz9ZvoVd+rZG8=; b=B7k9y58G4JcIJeeiOMtSuF/pN9PKfe884hWhZsMpBKVicHOLGOaAhA3bkvQohmEfRR30U6 ZdVJcyY/DGGosjEivx/lAq1oA8SbdNvebn4BSrV8ZNz5rn9Tc0zupJl4VmczztD5x2R0JF Ak+B7EQ3PIAaXpM6rGqwJSPquMZgtiQ= Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-421-aWpWUt_VMuOoPUAfaUp7Kg-1; Mon, 01 Nov 2021 12:17:46 -0400 X-MC-Unique: aWpWUt_VMuOoPUAfaUp7Kg-1 Received: by mail-qt1-f198.google.com with SMTP id n13-20020ac85a0d000000b002ac840c2829so1595835qta.14 for ; Mon, 01 Nov 2021 09:17:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=F2vxwqlB6wFzeCRM5lLa77O94J13VaOz9ZvoVd+rZG8=; b=y3xKYs/VtL71hyCjaLiuDwuX/U+FNMNzSmPm/6FGy4Y0mE7IgCOZ74mN7meaM05IH7 gobOHLl+78JgVJmy4HAvX8lR9SqbwrVQEXG4rpJeouIknSnZONsWXxZbGEepXUQWqVxf bD7EYuQZ1qyn0HNAZM37x2Qu4iZnHD2lOsSn+0erv43NwGzphsteydD0cOKGCC2asmGw az2IXXoUcHI8gVXsQfR7KusTD2xWt2egYpv7wdScivzM7IwiQbzK3cxNmVNkJe59CNCY E2I4hTSYjf29xh2ycHj4xvJqeoiIQfSUejlwTCMyAaFAyilDnh+k3LGykjcREScz79z2 TvjA== X-Gm-Message-State: AOAM532dOcmpLr/wwTRlebeGXtMz+OVHpx3kZPkfJ/9jvyL/pIlQjqdH 3bOERqbDs144zXzkXDTa+dTVEb1x0dhRP7ALQUQ+zQ6lxr4cEa51ojbR3kXWjv28jnSTgdkbsr5 lEhuTnuo5QraEHAQ= X-Received: by 2002:a05:622a:1006:: with SMTP id d6mr31006241qte.259.1635783465568; Mon, 01 Nov 2021 09:17:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsvnNj6Smb4Ra96XKXfYd15LiYJibYUWXpiZB6UR51qpyc+daCyIZfeeXzYlbHsOmSJkMTRA== X-Received: by 2002:a05:622a:1006:: with SMTP id d6mr31006216qte.259.1635783465346; Mon, 01 Nov 2021 09:17:45 -0700 (PDT) Received: from localhost (pool-68-160-176-52.bstnma.fios.verizon.net. [68.160.176.52]) by smtp.gmail.com with ESMTPSA id f66sm5772868qkj.76.2021.11.01.09.17.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Nov 2021 09:17:44 -0700 (PDT) Date: Mon, 1 Nov 2021 12:17:43 -0400 From: Mike Snitzer To: Dan Williams Cc: Christoph Hellwig , Ira Weiny , device-mapper development , linux-xfs , Linux NVDIMM , linux-s390 , linux-fsdevel , linux-erofs@lists.ozlabs.org, linux-ext4 , virtualization@lists.linux-foundation.org Subject: Re: [PATCH 07/11] dax: remove dax_capable Message-ID: References: <20211018044054.1779424-1-hch@lst.de> <20211018044054.1779424-8-hch@lst.de> Precedence: bulk X-Mailing-List: nvdimm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=snitzer@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Oct 27 2021 at 8:16P -0400, Dan Williams wrote: > I am going to change the subject of this patch to: > > dax: remove ->dax_supported() > > On Sun, Oct 17, 2021 at 9:41 PM Christoph Hellwig wrote: > > > > I'll add a bit more background to help others review this. > > The ->dax_supported() operation arranges for a stack of devices to > each answer the question "is dax operational". That request routes to > generic_fsdax_supported() at last level device and that attempted an > actual dax_direct_access() call and did some sanity checks. However, > those sanity checks can be validated in other ways and with those > removed the only question to answer is "has each block device driver > in the stack performed dax_add_host()". That can be validated without > a dax_operation. So, just open code the block size and dax_dev == NULL > checks in the callers, and delete ->dax_supported(). > > Mike, let me know if you have any concerns. Thanks for your additional background, it helped. > > > Just open code the block size and dax_dev == NULL checks in the callers. > > > > Signed-off-by: Christoph Hellwig > > --- > > drivers/dax/super.c | 36 ------------------------------------ > > drivers/md/dm-table.c | 22 +++++++++++----------- > > drivers/md/dm.c | 21 --------------------- > > drivers/md/dm.h | 4 ---- > > drivers/nvdimm/pmem.c | 1 - > > drivers/s390/block/dcssblk.c | 1 - > > fs/erofs/super.c | 11 +++++++---- > > fs/ext2/super.c | 6 ++++-- > > fs/ext4/super.c | 9 ++++++--- > > fs/xfs/xfs_super.c | 21 ++++++++------------- > > include/linux/dax.h | 14 -------------- > > 11 files changed, 36 insertions(+), 110 deletions(-) > > > > diff --git a/drivers/dax/super.c b/drivers/dax/super.c > > index 482fe775324a4..803942586d1b6 100644 > > --- a/drivers/dax/super.c > > +++ b/drivers/dax/super.c > > @@ -108,42 +108,6 @@ struct dax_device *fs_dax_get_by_bdev(struct block_device *bdev) > > return dax_dev; > > } > > EXPORT_SYMBOL_GPL(fs_dax_get_by_bdev); > > - > > -bool generic_fsdax_supported(struct dax_device *dax_dev, > > - struct block_device *bdev, int blocksize, sector_t start, > > - sector_t sectors) > > -{ > > - if (blocksize != PAGE_SIZE) { > > - pr_info("%pg: error: unsupported blocksize for dax\n", bdev); > > - return false; > > - } > > - > > - if (!dax_dev) { > > - pr_debug("%pg: error: dax unsupported by block device\n", bdev); > > - return false; > > - } > > - > > - return true; > > -} > > -EXPORT_SYMBOL_GPL(generic_fsdax_supported); > > - > > -bool dax_supported(struct dax_device *dax_dev, struct block_device *bdev, > > - int blocksize, sector_t start, sector_t len) > > -{ > > - bool ret = false; > > - int id; > > - > > - if (!dax_dev) > > - return false; > > - > > - id = dax_read_lock(); > > - if (dax_alive(dax_dev) && dax_dev->ops->dax_supported) > > - ret = dax_dev->ops->dax_supported(dax_dev, bdev, blocksize, > > - start, len); > > - dax_read_unlock(id); > > - return ret; > > -} > > -EXPORT_SYMBOL_GPL(dax_supported); > > #endif /* CONFIG_BLOCK && CONFIG_FS_DAX */ > > > > enum dax_device_flags { > > diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c > > index 1fa4d5582dca5..4ae671c2168ea 100644 > > --- a/drivers/md/dm-table.c > > +++ b/drivers/md/dm-table.c > > @@ -807,12 +807,14 @@ void dm_table_set_type(struct dm_table *t, enum dm_queue_mode type) > > EXPORT_SYMBOL_GPL(dm_table_set_type); > > > > /* validate the dax capability of the target device span */ > > -int device_not_dax_capable(struct dm_target *ti, struct dm_dev *dev, > > +static int device_not_dax_capable(struct dm_target *ti, struct dm_dev *dev, > > sector_t start, sector_t len, void *data) > > { > > - int blocksize = *(int *) data; > > + if (dev->dax_dev) > > + return false; > > > > - return !dax_supported(dev->dax_dev, dev->bdev, blocksize, start, len); > > + pr_debug("%pg: error: dax unsupported by block device\n", dev->bdev); Would prefer the use of DMDEBUG() here (which doesn't need trailing \n) But otherwise: Acked-by: Mike Snitzer 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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 749DAC433FE for ; Mon, 1 Nov 2021 16:17:52 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1AC3C610D2 for ; Mon, 1 Nov 2021 16:17:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1AC3C610D2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id DD73A80C35; Mon, 1 Nov 2021 16:17:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id H73ZfJUXO-lN; Mon, 1 Nov 2021 16:17:51 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id 8DBCC80C22; Mon, 1 Nov 2021 16:17:50 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 662A4C0019; Mon, 1 Nov 2021 16:17:50 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 69842C000E for ; Mon, 1 Nov 2021 16:17:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 4530660605 for ; Mon, 1 Nov 2021 16:17:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.com Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xqxBIV7HlL_2 for ; Mon, 1 Nov 2021 16:17:48 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp3.osuosl.org (Postfix) with ESMTPS id 78DBC605D9 for ; Mon, 1 Nov 2021 16:17:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635783467; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=F2vxwqlB6wFzeCRM5lLa77O94J13VaOz9ZvoVd+rZG8=; b=B7k9y58G4JcIJeeiOMtSuF/pN9PKfe884hWhZsMpBKVicHOLGOaAhA3bkvQohmEfRR30U6 ZdVJcyY/DGGosjEivx/lAq1oA8SbdNvebn4BSrV8ZNz5rn9Tc0zupJl4VmczztD5x2R0JF Ak+B7EQ3PIAaXpM6rGqwJSPquMZgtiQ= Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-57-MgkBamMrMeOhCtU8GY1E4A-1; Mon, 01 Nov 2021 12:17:46 -0400 X-MC-Unique: MgkBamMrMeOhCtU8GY1E4A-1 Received: by mail-qv1-f70.google.com with SMTP id p10-20020a0cc3ca000000b0038559d56582so16760179qvi.18 for ; Mon, 01 Nov 2021 09:17:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=F2vxwqlB6wFzeCRM5lLa77O94J13VaOz9ZvoVd+rZG8=; b=w6wNsnEuGC+W9hE3wmbpp3DJFxmQRNK7AdZfPcfHwLXwjqf4KAluRUX3aP/fWd9N0P lK0mRO0Nlkwl2y0BJC+SI0K14yTewM7mwP/7LeFsEZkIpcs3eeTzfe011nd8wrqR9CRX UBLuB0SAvTzAzq43qeSuuvTi8DQqJn5KopxLoqZf4eFHyHxht8ks/InCEHutcgAZ4qEw goQw8LuSLntXNNWdKIZbBtrWppismISAmrZVU5ewxRN+yYuxgf3KiHYZqq9hUk8geR1g GJ0qpqE4gvTZwuxY9GjnOA+IRdb64Osg97CCjfRZbw1KFOM4g87thCVg/u5PcH1QlN/Z bq8A== X-Gm-Message-State: AOAM531vKVL9PS4tERlcC/1F0+SKXhfCv8eC+8RRg8QGmkT1DNquDDV5 Tv1FJcjummvGFH61PaRc9H+ceEoaM1b5hRDENvFJlySG+n8cfuW+tfgylxnpkRLAW94d6W3bWG6 Ze6XrAnoeNl8xaRfuvxT6jOIXVgGV+T4VM/6xOLSk X-Received: by 2002:a05:622a:1006:: with SMTP id d6mr31006242qte.259.1635783465568; Mon, 01 Nov 2021 09:17:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsvnNj6Smb4Ra96XKXfYd15LiYJibYUWXpiZB6UR51qpyc+daCyIZfeeXzYlbHsOmSJkMTRA== X-Received: by 2002:a05:622a:1006:: with SMTP id d6mr31006216qte.259.1635783465346; Mon, 01 Nov 2021 09:17:45 -0700 (PDT) Received: from localhost (pool-68-160-176-52.bstnma.fios.verizon.net. [68.160.176.52]) by smtp.gmail.com with ESMTPSA id f66sm5772868qkj.76.2021.11.01.09.17.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Nov 2021 09:17:44 -0700 (PDT) Date: Mon, 1 Nov 2021 12:17:43 -0400 From: Mike Snitzer To: Dan Williams Subject: Re: [PATCH 07/11] dax: remove dax_capable Message-ID: References: <20211018044054.1779424-1-hch@lst.de> <20211018044054.1779424-8-hch@lst.de> MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=snitzer@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Cc: Linux NVDIMM , linux-s390 , linux-erofs@lists.ozlabs.org, virtualization@lists.linux-foundation.org, linux-xfs , device-mapper development , linux-fsdevel , linux-ext4 , Ira Weiny , Christoph Hellwig X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" On Wed, Oct 27 2021 at 8:16P -0400, Dan Williams wrote: > I am going to change the subject of this patch to: > > dax: remove ->dax_supported() > > On Sun, Oct 17, 2021 at 9:41 PM Christoph Hellwig wrote: > > > > I'll add a bit more background to help others review this. > > The ->dax_supported() operation arranges for a stack of devices to > each answer the question "is dax operational". That request routes to > generic_fsdax_supported() at last level device and that attempted an > actual dax_direct_access() call and did some sanity checks. However, > those sanity checks can be validated in other ways and with those > removed the only question to answer is "has each block device driver > in the stack performed dax_add_host()". That can be validated without > a dax_operation. So, just open code the block size and dax_dev == NULL > checks in the callers, and delete ->dax_supported(). > > Mike, let me know if you have any concerns. Thanks for your additional background, it helped. > > > Just open code the block size and dax_dev == NULL checks in the callers. > > > > Signed-off-by: Christoph Hellwig > > --- > > drivers/dax/super.c | 36 ------------------------------------ > > drivers/md/dm-table.c | 22 +++++++++++----------- > > drivers/md/dm.c | 21 --------------------- > > drivers/md/dm.h | 4 ---- > > drivers/nvdimm/pmem.c | 1 - > > drivers/s390/block/dcssblk.c | 1 - > > fs/erofs/super.c | 11 +++++++---- > > fs/ext2/super.c | 6 ++++-- > > fs/ext4/super.c | 9 ++++++--- > > fs/xfs/xfs_super.c | 21 ++++++++------------- > > include/linux/dax.h | 14 -------------- > > 11 files changed, 36 insertions(+), 110 deletions(-) > > > > diff --git a/drivers/dax/super.c b/drivers/dax/super.c > > index 482fe775324a4..803942586d1b6 100644 > > --- a/drivers/dax/super.c > > +++ b/drivers/dax/super.c > > @@ -108,42 +108,6 @@ struct dax_device *fs_dax_get_by_bdev(struct block_device *bdev) > > return dax_dev; > > } > > EXPORT_SYMBOL_GPL(fs_dax_get_by_bdev); > > - > > -bool generic_fsdax_supported(struct dax_device *dax_dev, > > - struct block_device *bdev, int blocksize, sector_t start, > > - sector_t sectors) > > -{ > > - if (blocksize != PAGE_SIZE) { > > - pr_info("%pg: error: unsupported blocksize for dax\n", bdev); > > - return false; > > - } > > - > > - if (!dax_dev) { > > - pr_debug("%pg: error: dax unsupported by block device\n", bdev); > > - return false; > > - } > > - > > - return true; > > -} > > -EXPORT_SYMBOL_GPL(generic_fsdax_supported); > > - > > -bool dax_supported(struct dax_device *dax_dev, struct block_device *bdev, > > - int blocksize, sector_t start, sector_t len) > > -{ > > - bool ret = false; > > - int id; > > - > > - if (!dax_dev) > > - return false; > > - > > - id = dax_read_lock(); > > - if (dax_alive(dax_dev) && dax_dev->ops->dax_supported) > > - ret = dax_dev->ops->dax_supported(dax_dev, bdev, blocksize, > > - start, len); > > - dax_read_unlock(id); > > - return ret; > > -} > > -EXPORT_SYMBOL_GPL(dax_supported); > > #endif /* CONFIG_BLOCK && CONFIG_FS_DAX */ > > > > enum dax_device_flags { > > diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c > > index 1fa4d5582dca5..4ae671c2168ea 100644 > > --- a/drivers/md/dm-table.c > > +++ b/drivers/md/dm-table.c > > @@ -807,12 +807,14 @@ void dm_table_set_type(struct dm_table *t, enum dm_queue_mode type) > > EXPORT_SYMBOL_GPL(dm_table_set_type); > > > > /* validate the dax capability of the target device span */ > > -int device_not_dax_capable(struct dm_target *ti, struct dm_dev *dev, > > +static int device_not_dax_capable(struct dm_target *ti, struct dm_dev *dev, > > sector_t start, sector_t len, void *data) > > { > > - int blocksize = *(int *) data; > > + if (dev->dax_dev) > > + return false; > > > > - return !dax_supported(dev->dax_dev, dev->bdev, blocksize, start, len); > > + pr_debug("%pg: error: dax unsupported by block device\n", dev->bdev); Would prefer the use of DMDEBUG() here (which doesn't need trailing \n) But otherwise: Acked-by: Mike Snitzer _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization 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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3BCC7C433EF for ; Mon, 1 Nov 2021 16:17:57 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A4D81610D2 for ; Mon, 1 Nov 2021 16:17:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A4D81610D2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4HjdVW2HCtz2yHM for ; Tue, 2 Nov 2021 03:17:55 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=B7k9y58G; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=B7k9y58G; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=redhat.com (client-ip=216.205.24.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=snitzer@redhat.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=B7k9y58G; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=B7k9y58G; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4HjdVQ2rCJz2x9c for ; Tue, 2 Nov 2021 03:17:49 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635783467; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=F2vxwqlB6wFzeCRM5lLa77O94J13VaOz9ZvoVd+rZG8=; b=B7k9y58G4JcIJeeiOMtSuF/pN9PKfe884hWhZsMpBKVicHOLGOaAhA3bkvQohmEfRR30U6 ZdVJcyY/DGGosjEivx/lAq1oA8SbdNvebn4BSrV8ZNz5rn9Tc0zupJl4VmczztD5x2R0JF Ak+B7EQ3PIAaXpM6rGqwJSPquMZgtiQ= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635783467; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=F2vxwqlB6wFzeCRM5lLa77O94J13VaOz9ZvoVd+rZG8=; b=B7k9y58G4JcIJeeiOMtSuF/pN9PKfe884hWhZsMpBKVicHOLGOaAhA3bkvQohmEfRR30U6 ZdVJcyY/DGGosjEivx/lAq1oA8SbdNvebn4BSrV8ZNz5rn9Tc0zupJl4VmczztD5x2R0JF Ak+B7EQ3PIAaXpM6rGqwJSPquMZgtiQ= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-563-Eu_wrUTaNA-trlQharG57g-1; Mon, 01 Nov 2021 12:17:46 -0400 X-MC-Unique: Eu_wrUTaNA-trlQharG57g-1 Received: by mail-qv1-f69.google.com with SMTP id bu1-20020ad455e1000000b0038529a6d278so16716374qvb.10 for ; Mon, 01 Nov 2021 09:17:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=F2vxwqlB6wFzeCRM5lLa77O94J13VaOz9ZvoVd+rZG8=; b=hutUy2HV6/3eguyjTX7i1OxUDHhg02Sv+7oq2NRwflmI1AMK6Qd02Vfm8+kmgUZNhf jwcWKgon7hsSd3CC5piQdqHvzabMpCs/e/3nqo2hwKx+zBKs6NkY+kmFhqP3tAuDFzpl tYLRGdaB/QFMImLnUsULlNdJZChLkxVkIUqrKbuhilQbRLkTdynmWJI4PiyAo5C9wJjO xDJLlGB5W/hy6sycQs90pHHe4xLVw1jXbRBMHiIHc2h8UATGyGACEOkHHHM1jtBxLUI5 ayW8OTljBdS6hyYElzzIkE4oqC0Ho/dTwmbuz0VH+ly6M0rMsadEHDgpCghdUIWc2YlE oiXw== X-Gm-Message-State: AOAM531jmABNNnqH9ujmFmXBVZpXD2GME9UZR5MTNc4ZqtfjXEmqtwzf KkfrR/9agsojYBg54Pk5c/fS24w2mRjWTnZTleb8HKp8G8zxHlc9B0iTl5ZFW5wJa0KqZfqXyB/ tbmGjaWRr68+wN5R5czPAm9o= X-Received: by 2002:a05:622a:1006:: with SMTP id d6mr31006255qte.259.1635783465587; Mon, 01 Nov 2021 09:17:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsvnNj6Smb4Ra96XKXfYd15LiYJibYUWXpiZB6UR51qpyc+daCyIZfeeXzYlbHsOmSJkMTRA== X-Received: by 2002:a05:622a:1006:: with SMTP id d6mr31006216qte.259.1635783465346; Mon, 01 Nov 2021 09:17:45 -0700 (PDT) Received: from localhost (pool-68-160-176-52.bstnma.fios.verizon.net. [68.160.176.52]) by smtp.gmail.com with ESMTPSA id f66sm5772868qkj.76.2021.11.01.09.17.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Nov 2021 09:17:44 -0700 (PDT) Date: Mon, 1 Nov 2021 12:17:43 -0400 From: Mike Snitzer To: Dan Williams Subject: Re: [PATCH 07/11] dax: remove dax_capable Message-ID: References: <20211018044054.1779424-1-hch@lst.de> <20211018044054.1779424-8-hch@lst.de> MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=snitzer@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-BeenThere: linux-erofs@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development of Linux EROFS file system List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linux NVDIMM , linux-s390 , linux-erofs@lists.ozlabs.org, virtualization@lists.linux-foundation.org, linux-xfs , device-mapper development , linux-fsdevel , linux-ext4 , Ira Weiny , Christoph Hellwig Errors-To: linux-erofs-bounces+linux-erofs=archiver.kernel.org@lists.ozlabs.org Sender: "Linux-erofs" On Wed, Oct 27 2021 at 8:16P -0400, Dan Williams wrote: > I am going to change the subject of this patch to: > > dax: remove ->dax_supported() > > On Sun, Oct 17, 2021 at 9:41 PM Christoph Hellwig wrote: > > > > I'll add a bit more background to help others review this. > > The ->dax_supported() operation arranges for a stack of devices to > each answer the question "is dax operational". That request routes to > generic_fsdax_supported() at last level device and that attempted an > actual dax_direct_access() call and did some sanity checks. However, > those sanity checks can be validated in other ways and with those > removed the only question to answer is "has each block device driver > in the stack performed dax_add_host()". That can be validated without > a dax_operation. So, just open code the block size and dax_dev == NULL > checks in the callers, and delete ->dax_supported(). > > Mike, let me know if you have any concerns. Thanks for your additional background, it helped. > > > Just open code the block size and dax_dev == NULL checks in the callers. > > > > Signed-off-by: Christoph Hellwig > > --- > > drivers/dax/super.c | 36 ------------------------------------ > > drivers/md/dm-table.c | 22 +++++++++++----------- > > drivers/md/dm.c | 21 --------------------- > > drivers/md/dm.h | 4 ---- > > drivers/nvdimm/pmem.c | 1 - > > drivers/s390/block/dcssblk.c | 1 - > > fs/erofs/super.c | 11 +++++++---- > > fs/ext2/super.c | 6 ++++-- > > fs/ext4/super.c | 9 ++++++--- > > fs/xfs/xfs_super.c | 21 ++++++++------------- > > include/linux/dax.h | 14 -------------- > > 11 files changed, 36 insertions(+), 110 deletions(-) > > > > diff --git a/drivers/dax/super.c b/drivers/dax/super.c > > index 482fe775324a4..803942586d1b6 100644 > > --- a/drivers/dax/super.c > > +++ b/drivers/dax/super.c > > @@ -108,42 +108,6 @@ struct dax_device *fs_dax_get_by_bdev(struct block_device *bdev) > > return dax_dev; > > } > > EXPORT_SYMBOL_GPL(fs_dax_get_by_bdev); > > - > > -bool generic_fsdax_supported(struct dax_device *dax_dev, > > - struct block_device *bdev, int blocksize, sector_t start, > > - sector_t sectors) > > -{ > > - if (blocksize != PAGE_SIZE) { > > - pr_info("%pg: error: unsupported blocksize for dax\n", bdev); > > - return false; > > - } > > - > > - if (!dax_dev) { > > - pr_debug("%pg: error: dax unsupported by block device\n", bdev); > > - return false; > > - } > > - > > - return true; > > -} > > -EXPORT_SYMBOL_GPL(generic_fsdax_supported); > > - > > -bool dax_supported(struct dax_device *dax_dev, struct block_device *bdev, > > - int blocksize, sector_t start, sector_t len) > > -{ > > - bool ret = false; > > - int id; > > - > > - if (!dax_dev) > > - return false; > > - > > - id = dax_read_lock(); > > - if (dax_alive(dax_dev) && dax_dev->ops->dax_supported) > > - ret = dax_dev->ops->dax_supported(dax_dev, bdev, blocksize, > > - start, len); > > - dax_read_unlock(id); > > - return ret; > > -} > > -EXPORT_SYMBOL_GPL(dax_supported); > > #endif /* CONFIG_BLOCK && CONFIG_FS_DAX */ > > > > enum dax_device_flags { > > diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c > > index 1fa4d5582dca5..4ae671c2168ea 100644 > > --- a/drivers/md/dm-table.c > > +++ b/drivers/md/dm-table.c > > @@ -807,12 +807,14 @@ void dm_table_set_type(struct dm_table *t, enum dm_queue_mode type) > > EXPORT_SYMBOL_GPL(dm_table_set_type); > > > > /* validate the dax capability of the target device span */ > > -int device_not_dax_capable(struct dm_target *ti, struct dm_dev *dev, > > +static int device_not_dax_capable(struct dm_target *ti, struct dm_dev *dev, > > sector_t start, sector_t len, void *data) > > { > > - int blocksize = *(int *) data; > > + if (dev->dax_dev) > > + return false; > > > > - return !dax_supported(dev->dax_dev, dev->bdev, blocksize, start, len); > > + pr_debug("%pg: error: dax unsupported by block device\n", dev->bdev); Would prefer the use of DMDEBUG() here (which doesn't need trailing \n) But otherwise: Acked-by: Mike Snitzer 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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5E64C433F5 for ; Mon, 1 Nov 2021 16:18:02 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 73D17610A5 for ; Mon, 1 Nov 2021 16:18:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 73D17610A5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=tempfail smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635783481; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=xniEL4FaYHWETbFvg2BqcckYgdN8Em2vYLRAskHv/ZY=; b=belnzs76zZO6grQ6KmFfRcQvpgfkLTjzKPFJxHEvmlcz9PA1Oz5V/yMtZfwa0qhmhvcbtO gn5CcRu0j/PtPesEHktXmJWyp8wRrSDiJqPP+hpIOZUKAuB7JixHX/m9GR3nws/2kALPSQ f9en6Q2O8RBwEW5dzuedJb8B1K1hgWc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-523-V5073ysFM0qm2QbBi-VbQw-1; Mon, 01 Nov 2021 12:17:58 -0400 X-MC-Unique: V5073ysFM0qm2QbBi-VbQw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0391C10A8E0C; Mon, 1 Nov 2021 16:17:53 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BE6F460CC9; Mon, 1 Nov 2021 16:17:52 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 2D9C14EA2A; Mon, 1 Nov 2021 16:17:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1A1GHo0S003265 for ; Mon, 1 Nov 2021 12:17:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id CB9A72166B3F; Mon, 1 Nov 2021 16:17:50 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C5CF72166B2D for ; Mon, 1 Nov 2021 16:17:47 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 26208899EE2 for ; Mon, 1 Nov 2021 16:17:47 +0000 (UTC) Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-65-QGrYNepYPMWOv8IizH8Rvw-1; Mon, 01 Nov 2021 12:17:46 -0400 X-MC-Unique: QGrYNepYPMWOv8IizH8Rvw-1 Received: by mail-qk1-f198.google.com with SMTP id ay9-20020a05620a178900b00462db20ac02so7152377qkb.10 for ; Mon, 01 Nov 2021 09:17:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=F2vxwqlB6wFzeCRM5lLa77O94J13VaOz9ZvoVd+rZG8=; b=m+bZ2Cbth8eSHORZOQGhV9GL7Kpxx7Z8cRC0G2zMjYpLKiS8fNcahsxyUwep/XlK+1 0rhGBynFzVsPtJj/kDSh56dRpEdx3+sh7yxeO5vMRfQTTbU/x4SfK91NR0LqtFd92gjh 67zVHKdFTb32Mx6VEUyxcsUd17x2LKV1BG3NHmguE2B17R4a2hK2g2Wss24trQfXrq3p U6lRfg4ZceH4+50m7M5S4dAzSGH5EzicoMXc82+DWkMMiq4XfpCGistw5n0N1bD0me0d i0kKV/TJzs2SVq6UsJLj4V8+vP/UK17Wn2xBI5UvXMjEKAqxg2SDHfp6r+iVctEY8fmq YyGA== X-Gm-Message-State: AOAM532ZbCA/oUOUjlwitLxwmN04Yll/IokTbISmKUUqrwkNlnN/ApVz +RSW+4x18EMeIrGvsa+aOBEgsuhRXiaffrEcd6NZHMj+y3arxJGlJgjiTLoM/CjItS4J8zyqsBL N2vhi8UQeRxlbog== X-Received: by 2002:a05:622a:1006:: with SMTP id d6mr31006249qte.259.1635783465575; Mon, 01 Nov 2021 09:17:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsvnNj6Smb4Ra96XKXfYd15LiYJibYUWXpiZB6UR51qpyc+daCyIZfeeXzYlbHsOmSJkMTRA== X-Received: by 2002:a05:622a:1006:: with SMTP id d6mr31006216qte.259.1635783465346; Mon, 01 Nov 2021 09:17:45 -0700 (PDT) Received: from localhost (pool-68-160-176-52.bstnma.fios.verizon.net. [68.160.176.52]) by smtp.gmail.com with ESMTPSA id f66sm5772868qkj.76.2021.11.01.09.17.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Nov 2021 09:17:44 -0700 (PDT) Date: Mon, 1 Nov 2021 12:17:43 -0400 From: Mike Snitzer To: Dan Williams Message-ID: References: <20211018044054.1779424-1-hch@lst.de> <20211018044054.1779424-8-hch@lst.de> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: dm-devel@redhat.com Cc: Linux NVDIMM , linux-s390 , linux-erofs@lists.ozlabs.org, virtualization@lists.linux-foundation.org, linux-xfs , device-mapper development , linux-fsdevel , linux-ext4 , Ira Weiny , Christoph Hellwig Subject: Re: [dm-devel] [PATCH 07/11] dax: remove dax_capable X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Wed, Oct 27 2021 at 8:16P -0400, Dan Williams wrote: > I am going to change the subject of this patch to: > > dax: remove ->dax_supported() > > On Sun, Oct 17, 2021 at 9:41 PM Christoph Hellwig wrote: > > > > I'll add a bit more background to help others review this. > > The ->dax_supported() operation arranges for a stack of devices to > each answer the question "is dax operational". That request routes to > generic_fsdax_supported() at last level device and that attempted an > actual dax_direct_access() call and did some sanity checks. However, > those sanity checks can be validated in other ways and with those > removed the only question to answer is "has each block device driver > in the stack performed dax_add_host()". That can be validated without > a dax_operation. So, just open code the block size and dax_dev == NULL > checks in the callers, and delete ->dax_supported(). > > Mike, let me know if you have any concerns. Thanks for your additional background, it helped. > > > Just open code the block size and dax_dev == NULL checks in the callers. > > > > Signed-off-by: Christoph Hellwig > > --- > > drivers/dax/super.c | 36 ------------------------------------ > > drivers/md/dm-table.c | 22 +++++++++++----------- > > drivers/md/dm.c | 21 --------------------- > > drivers/md/dm.h | 4 ---- > > drivers/nvdimm/pmem.c | 1 - > > drivers/s390/block/dcssblk.c | 1 - > > fs/erofs/super.c | 11 +++++++---- > > fs/ext2/super.c | 6 ++++-- > > fs/ext4/super.c | 9 ++++++--- > > fs/xfs/xfs_super.c | 21 ++++++++------------- > > include/linux/dax.h | 14 -------------- > > 11 files changed, 36 insertions(+), 110 deletions(-) > > > > diff --git a/drivers/dax/super.c b/drivers/dax/super.c > > index 482fe775324a4..803942586d1b6 100644 > > --- a/drivers/dax/super.c > > +++ b/drivers/dax/super.c > > @@ -108,42 +108,6 @@ struct dax_device *fs_dax_get_by_bdev(struct block_device *bdev) > > return dax_dev; > > } > > EXPORT_SYMBOL_GPL(fs_dax_get_by_bdev); > > - > > -bool generic_fsdax_supported(struct dax_device *dax_dev, > > - struct block_device *bdev, int blocksize, sector_t start, > > - sector_t sectors) > > -{ > > - if (blocksize != PAGE_SIZE) { > > - pr_info("%pg: error: unsupported blocksize for dax\n", bdev); > > - return false; > > - } > > - > > - if (!dax_dev) { > > - pr_debug("%pg: error: dax unsupported by block device\n", bdev); > > - return false; > > - } > > - > > - return true; > > -} > > -EXPORT_SYMBOL_GPL(generic_fsdax_supported); > > - > > -bool dax_supported(struct dax_device *dax_dev, struct block_device *bdev, > > - int blocksize, sector_t start, sector_t len) > > -{ > > - bool ret = false; > > - int id; > > - > > - if (!dax_dev) > > - return false; > > - > > - id = dax_read_lock(); > > - if (dax_alive(dax_dev) && dax_dev->ops->dax_supported) > > - ret = dax_dev->ops->dax_supported(dax_dev, bdev, blocksize, > > - start, len); > > - dax_read_unlock(id); > > - return ret; > > -} > > -EXPORT_SYMBOL_GPL(dax_supported); > > #endif /* CONFIG_BLOCK && CONFIG_FS_DAX */ > > > > enum dax_device_flags { > > diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c > > index 1fa4d5582dca5..4ae671c2168ea 100644 > > --- a/drivers/md/dm-table.c > > +++ b/drivers/md/dm-table.c > > @@ -807,12 +807,14 @@ void dm_table_set_type(struct dm_table *t, enum dm_queue_mode type) > > EXPORT_SYMBOL_GPL(dm_table_set_type); > > > > /* validate the dax capability of the target device span */ > > -int device_not_dax_capable(struct dm_target *ti, struct dm_dev *dev, > > +static int device_not_dax_capable(struct dm_target *ti, struct dm_dev *dev, > > sector_t start, sector_t len, void *data) > > { > > - int blocksize = *(int *) data; > > + if (dev->dax_dev) > > + return false; > > > > - return !dax_supported(dev->dax_dev, dev->bdev, blocksize, start, len); > > + pr_debug("%pg: error: dax unsupported by block device\n", dev->bdev); Would prefer the use of DMDEBUG() here (which doesn't need trailing \n) But otherwise: Acked-by: Mike Snitzer -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel