Re: [PATCH 1/9] fsdax: improve the FS_DAX Kconfig description and help text

2021-08-23 Thread Christoph Hellwig
On Mon, Aug 23, 2021 at 11:45:52AM -0700, Dan Williams wrote: > On Mon, Aug 23, 2021 at 5:37 AM Christoph Hellwig wrote: > > > > Rename the main option text to clarify it is for file system access, > > and add a bit of text that explains how to actually switch a nvdimm > > to a fsdax capable state

Re: can we finally kill off CONFIG_FS_DAX_LIMITED

2021-08-23 Thread David Hildenbrand
On 23.08.21 16:05, Gerald Schaefer wrote: On Fri, 20 Aug 2021 07:43:40 +0200 Christoph Hellwig wrote: Hi all, looking at the recent ZONE_DEVICE related changes we still have a horrible maze of different code paths. I already suggested to depend on ARCH_HAS_PTE_SPECIAL for ZONE_DEVICE there,

Re: [PATCH 7/9] dax: stub out dax_supported for !CONFIG_FS_DAX

2021-08-23 Thread Christoph Hellwig
On Mon, Aug 23, 2021 at 02:15:47PM -0700, Dan Williams wrote: > > +static inline bool dax_supported(struct dax_device *dax_dev, > > + struct block_device *bdev, int blocksize, sector_t start, > > + sector_t len) > > +{ > > + return false; > > +} > > I've started c

RE: [ndctl PATCH 1/5] ndctl, ccan: import ciniparser

2021-08-23 Thread qi.f...@fujitsu.com
> > On Mon, 2021-08-23 at 09:48 -0700, Dan Williams wrote: > > On Sun, Aug 22, 2021 at 1:36 PM QI Fuli wrote: > > > > > > Import ciniparser from ccan[1]. > > > [1] https://ccodearchive.net/info/ciniparser.html > > > > Hi Qi, > > > > Vishal points out that an updated version of this code is now >

Re: [PATCH 9/9] dax: remove bdev_dax_supported

2021-08-23 Thread Dan Williams
On Mon, Aug 23, 2021 at 5:45 AM Christoph Hellwig wrote: > > All callers already have a dax_device obtained from fs_dax_get_by_bdev > at hand, so just pass that to dax_supported() insted of doing another > lookup. Looks good, series passes regression tests: Reviewed-by: Dan Williams I can take

Re: [PATCH 8/9] xfs: factor out a xfs_buftarg_is_dax helper

2021-08-23 Thread Dan Williams
On Mon, Aug 23, 2021 at 5:44 AM Christoph Hellwig wrote: > I wouldn't mind adding: "In support of a future change to kill bdev_dax_supported() first move its usage to a helper." ...but either way: Reviewed-by: Dan Williams

Re: [PATCH 7/9] dax: stub out dax_supported for !CONFIG_FS_DAX

2021-08-23 Thread Dan Williams
On Mon, Aug 23, 2021 at 5:43 AM Christoph Hellwig wrote: > > dax_supported calls into ->dax_supported which checks for fsdax support. > Don't bother building it for !CONFIG_FS_DAX as it will always return > false. > Looks good, modulo formatting question below: Reviewed-by: Dan Williams > diff

Re: [PATCH 6/9] dax: remove __generic_fsdax_supported

2021-08-23 Thread Dan Williams
On Mon, Aug 23, 2021 at 5:42 AM Christoph Hellwig wrote: > > Just implement generic_fsdax_supported directly out of line instead of > adding a wrapper. Given that generic_fsdax_supported is only supplied > for CONFIG_FS_DAX builds this also allows to not provide it at all for > !CONFIG_FS_DAX bui

Re: [PATCH 5/9] dax: move the dax_read_lock() locking into dax_supported

2021-08-23 Thread Dan Williams
On Mon, Aug 23, 2021 at 5:40 AM Christoph Hellwig wrote: > > Move the dax_read_lock/dax_read_unlock pair from the callers into > dax_supported to make it a little easier to use. Looks good: Reviewed-by: Dan Williams

Re: [PATCH 4/9] dax: mark dax_get_by_host static

2021-08-23 Thread Dan Williams
On Mon, Aug 23, 2021 at 5:39 AM Christoph Hellwig wrote: > > And move the code around a bit to avoid a forward declaration. Looks good, Reviewed-by: Dan Williams

Re: can we finally kill off CONFIG_FS_DAX_LIMITED

2021-08-23 Thread Dan Williams
On Mon, Aug 23, 2021 at 12:47 PM Gerald Schaefer wrote: > > On Mon, 23 Aug 2021 16:05:46 +0200 > Gerald Schaefer wrote: > > > On Fri, 20 Aug 2021 07:43:40 +0200 > > Christoph Hellwig wrote: > > > > > Hi all, > > > > > > looking at the recent ZONE_DEVICE related changes we still have a > > > horr

Re: can we finally kill off CONFIG_FS_DAX_LIMITED

2021-08-23 Thread Gerald Schaefer
On Mon, 23 Aug 2021 16:05:46 +0200 Gerald Schaefer wrote: > On Fri, 20 Aug 2021 07:43:40 +0200 > Christoph Hellwig wrote: > > > Hi all, > > > > looking at the recent ZONE_DEVICE related changes we still have a > > horrible maze of different code paths. I already suggested to > > depend on ARC

Re: [ndctl PATCH 1/5] ndctl, ccan: import ciniparser

2021-08-23 Thread Verma, Vishal L
On Mon, 2021-08-23 at 09:48 -0700, Dan Williams wrote: > On Sun, Aug 22, 2021 at 1:36 PM QI Fuli wrote: > > > > Import ciniparser from ccan[1]. > > [1] https://ccodearchive.net/info/ciniparser.html > > Hi Qi, > > Vishal points out that an updated version of this code is now > available as a pro

Re: [PATCH 3/9] dm: use fs_dax_get_by_bdev instead of dax_get_by_host

2021-08-23 Thread Dan Williams
On Mon, Aug 23, 2021 at 5:39 AM Christoph Hellwig wrote: > > There is no point in trying to finding the dax device if the DAX flag is > not set on the queue as none of the users of the device mapper exported > block devices could make use of the DAX capability. Looks good, Reviewed-by: Dan Willi

Re: [PATCH 2/9] dax: stop using bdevname

2021-08-23 Thread Dan Williams
On Mon, Aug 23, 2021 at 5:37 AM Christoph Hellwig wrote: > > Just use the %pg format specifier instead. > Looks good to me: Reviewed-by: Dan Williams > Signed-off-by: Christoph Hellwig > --- > drivers/dax/super.c | 20 +++- > 1 file changed, 7 insertions(+), 13 deletions(-)

Re: [PATCH 1/9] fsdax: improve the FS_DAX Kconfig description and help text

2021-08-23 Thread Dan Williams
On Mon, Aug 23, 2021 at 5:37 AM Christoph Hellwig wrote: > > Rename the main option text to clarify it is for file system access, > and add a bit of text that explains how to actually switch a nvdimm > to a fsdax capable state. > Looks good, nice improvement. A couple suggestions below. > Signed

Re: [ndctl PATCH 1/5] ndctl, ccan: import ciniparser

2021-08-23 Thread Dan Williams
On Sun, Aug 22, 2021 at 1:36 PM QI Fuli wrote: > > Import ciniparser from ccan[1]. > [1] https://ccodearchive.net/info/ciniparser.html Hi Qi, Vishal points out that an updated version of this code is now available as a proper library that ships in distributions called "iniparser".

Re: can we finally kill off CONFIG_FS_DAX_LIMITED

2021-08-23 Thread Gerald Schaefer
On Fri, 20 Aug 2021 07:43:40 +0200 Christoph Hellwig wrote: > Hi all, > > looking at the recent ZONE_DEVICE related changes we still have a > horrible maze of different code paths. I already suggested to > depend on ARCH_HAS_PTE_SPECIAL for ZONE_DEVICE there, which all modern > architectures ha

[PATCH 9/9] dax: remove bdev_dax_supported

2021-08-23 Thread Christoph Hellwig
All callers already have a dax_device obtained from fs_dax_get_by_bdev at hand, so just pass that to dax_supported() insted of doing another lookup. Signed-off-by: Christoph Hellwig --- drivers/dax/super.c | 42 +- fs/ext2/super.c | 3 ++- fs/ext4/sup

[PATCH 8/9] xfs: factor out a xfs_buftarg_is_dax helper

2021-08-23 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- fs/xfs/xfs_super.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index 2c9e26a44546..5a89bf601d97 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -314,6 +314,14 @@ xfs_s

[PATCH 7/9] dax: stub out dax_supported for !CONFIG_FS_DAX

2021-08-23 Thread Christoph Hellwig
dax_supported calls into ->dax_supported which checks for fsdax support. Don't bother building it for !CONFIG_FS_DAX as it will always return false. Signed-off-by: Christoph Hellwig --- drivers/dax/super.c | 36 ++-- include/linux/dax.h | 18 ++ 2

[PATCH 6/9] dax: remove __generic_fsdax_supported

2021-08-23 Thread Christoph Hellwig
Just implement generic_fsdax_supported directly out of line instead of adding a wrapper. Given that generic_fsdax_supported is only supplied for CONFIG_FS_DAX builds this also allows to not provide it at all for !CONFIG_FS_DAX builds. Signed-off-by: Christoph Hellwig --- drivers/dax/super.c |

[PATCH 5/9] dax: move the dax_read_lock() locking into dax_supported

2021-08-23 Thread Christoph Hellwig
Move the dax_read_lock/dax_read_unlock pair from the callers into dax_supported to make it a little easier to use. Signed-off-by: Christoph Hellwig --- drivers/dax/super.c | 16 +--- drivers/md/dm-table.c | 9 ++--- 2 files changed, 11 insertions(+), 14 deletions(-) diff --gi

[PATCH 4/9] dax: mark dax_get_by_host static

2021-08-23 Thread Christoph Hellwig
And move the code around a bit to avoid a forward declaration. Signed-off-by: Christoph Hellwig --- drivers/dax/super.c | 109 ++-- include/linux/dax.h | 5 -- 2 files changed, 54 insertions(+), 60 deletions(-) diff --git a/drivers/dax/super.c b/drivers

[PATCH 3/9] dm: use fs_dax_get_by_bdev instead of dax_get_by_host

2021-08-23 Thread Christoph Hellwig
There is no point in trying to finding the dax device if the DAX flag is not set on the queue as none of the users of the device mapper exported block devices could make use of the DAX capability. Signed-off-by: Christoph Hellwig --- drivers/md/dm.c | 2 +- 1 file changed, 1 insertion(+), 1 dele

[PATCH 2/9] dax: stop using bdevname

2021-08-23 Thread Christoph Hellwig
Just use the %pg format specifier instead. Signed-off-by: Christoph Hellwig --- drivers/dax/super.c | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/drivers/dax/super.c b/drivers/dax/super.c index 44736cbd446e..3e6d7e9ee34f 100644 --- a/drivers/dax/super.

[PATCH 1/9] fsdax: improve the FS_DAX Kconfig description and help text

2021-08-23 Thread Christoph Hellwig
Rename the main option text to clarify it is for file system access, and add a bit of text that explains how to actually switch a nvdimm to a fsdax capable state. Signed-off-by: Christoph Hellwig --- fs/Kconfig | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git

dax_supported() related cleanups

2021-08-23 Thread Christoph Hellwig
Hi all, this series first clarifies how to use fsdax in the Kconfig help a bit, and te untangles the code path that checks if fsdax is supported. Diffstat drivers/dax/super.c | 191 +++--- drivers/md/dm-table.c |9 -- drivers/md/dm.c |