From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from g1t5424.austin.hp.com ([15.216.225.54]:47473 "EHLO g1t5424.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752735AbcEJVp3 (ORCPT ); Tue, 10 May 2016 17:45:29 -0400 Message-ID: <1462916186.27137.133.camel@hpe.com> Subject: Re: [PATCH v4 6/6] block: Update blkdev_dax_capable() for consistency From: Toshi Kani To: Dan Williams Cc: Jan Kara , david , Al Viro , Jens Axboe , Christoph Hellwig , Boaz Harrosh , Theodore Ts'o , Andreas Dilger , Ross Zwisler , micah.parrish@hpe.com, "linux-nvdimm@lists.01.org" , linux-fsdevel , linux-block@vger.kernel.org, "linux-kernel@vger.kernel.org" , Vishal L Verma Date: Tue, 10 May 2016 15:36:26 -0600 In-Reply-To: References: <1462897437-16626-1-git-send-email-toshi.kani@hpe.com> <1462897437-16626-7-git-send-email-toshi.kani@hpe.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, 2016-05-10 at 12:49 -0700, Dan Williams wrote: > On Tue, May 10, 2016 at 9:23 AM, Toshi Kani wrote: > > > > blkdev_dax_capable() is similar to bdev_dax_supported(), but needs > > to remain as a separate interface for checking dax capability of > > a raw block device. > > > > Rename and relocate blkdev_dax_capable() to keep them maintained > > consistently, and call bdev_direct_access() for the dax capability > > check. > > > > There is no change in the behavior.  : > > diff --git a/block/ioctl.c b/block/ioctl.c > > index 4ff1f92..7eeda07 100644 > > --- a/block/ioctl.c > > +++ b/block/ioctl.c > > @@ -4,7 +4,6 @@ > >  #include > >  #include > >  #include > > -#include > >  #include > >  #include > >  #include > > @@ -407,35 +406,6 @@ static inline int is_unrecognized_ioctl(int ret) > >                 ret == -ENOIOCTLCMD; > >  } > > > > -#ifdef CONFIG_FS_DAX > > -bool blkdev_dax_capable(struct block_device *bdev) > > -{ > > -       struct gendisk *disk = bdev->bd_disk; > > - > > -       if (!disk->fops->direct_access) > > -               return false; > > - > > -       /* > > -        * If the partition is not aligned on a page boundary, we can't > > -        * do dax I/O to it. > > -        */ > > -       if ((bdev->bd_part->start_sect % (PAGE_SIZE / 512)) > > -                       || (bdev->bd_part->nr_sects % (PAGE_SIZE / > > 512))) > > -               return false; > > - > > -       /* > > -        * If the device has known bad blocks, force all I/O through > > the > > -        * driver / page cache. > > -        * > > -        * TODO: support finer grained dax error handling > > -        */ > > -       if (disk->bb && disk->bb->count) > > -               return false; > > - > > -       return true; > > -} > > -#endif > > This will collide with my pending change to revert raw block device > dax support, and also with Vishal's DAX error handling changes.  For > coordination purposes I'm thining this should all go on top of the > branch that Vishal is putting together with the dax zeroing changes > from Jan and Christoph as well. This patch does not depend on the rest of the series, so it can be handled separately.  There is a minor conflict -- bdev_dax_capable() is put under bdev_dax_supported() in the same file.  This should be easy to resolve, but let me know if you need me to merge it up. Thanks, -Toshi