[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160511080537.GA14744@quack2.suse.cz>
Date: Wed, 11 May 2016 10:05:37 +0200
From: Jan Kara <jack@...e.cz>
To: Toshi Kani <toshi.kani@....com>
Cc: dan.j.williams@...el.com, jack@...e.cz, david@...morbit.com,
viro@...iv.linux.org.uk, axboe@...com, hch@...radead.org,
boaz@...xistor.com, tytso@....edu, adilger.kernel@...ger.ca,
ross.zwisler@...ux.intel.com, micah.parrish@....com,
linux-nvdimm@...ts.01.org, linux-fsdevel@...r.kernel.org,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 6/6] block: Update blkdev_dax_capable() for consistency
On Tue 10-05-16 10:23:57, 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.
...
> +bool bdev_dax_capable(struct block_device *bdev)
> +{
> + struct gendisk *disk = bdev->bd_disk;
> + struct blk_dax_ctl dax = {
> + .size = PAGE_SIZE,
> + };
> +
> + if (!IS_ENABLED(CONFIG_FS_DAX))
> + return false;
Frankly, I prefer the #ifdef CONFIG_FS_DAX and just compile the code out
when DAX is not enabled (like it was with blkdev_dax_capable()). That way we
don't grow the kernel for people who don't care about DAX.
Honza
--
Jan Kara <jack@...e.com>
SUSE Labs, CR
Powered by blists - more mailing lists