Re: [dm-devel] Kernel-4.14: With ubuntu-18.04 building rootfs images and booting gives SQUASHFS error: xz decompression failed, data probably corrupt

2021-11-09 Thread Pintu Agarwal
On Tue, 9 Nov 2021 at 16:45, Pintu Agarwal wrote: > > Hi, > > On Mon, 8 Nov 2021 at 20:00, Pintu Agarwal wrote: > > > > Hi, > > Here are few details. > > * Linux Kernel: 4.14 > > * Processor: Qualcomm Arm32 Cortex-A7 > > * Storage: NAND 512MB > > * Platform: Simple busybox > > * Filesystem: UBIFS

Re: [dm-devel] Kernel-4.14: With ubuntu-18.04 building rootfs images and booting gives SQUASHFS error: xz decompression failed, data probably corrupt

2021-11-09 Thread Pintu Agarwal
Hi, On Mon, 8 Nov 2021 at 20:00, Pintu Agarwal wrote: > > Hi, > Here are few details. > * Linux Kernel: 4.14 > * Processor: Qualcomm Arm32 Cortex-A7 > * Storage: NAND 512MB > * Platform: Simple busybox > * Filesystem: UBIFS, Squashfs > * Build system: Linux Ubuntu 18.04 with Yocto build system >

Re: [PATCH v2 2/2] dax,pmem: Implement pmem based dax data recovery

2021-11-09 Thread Dan Williams
On Tue, Nov 9, 2021 at 11:59 AM Jane Chu wrote: > > On 11/9/2021 10:48 AM, Dan Williams wrote: > > On Mon, Nov 8, 2021 at 11:27 PM Christoph Hellwig > > wrote: > >> > >> On Fri, Nov 05, 2021 at 07:16:38PM -0600, Jane Chu wrote: > >>> static size_t pmem_copy_from_iter(struct dax_device *dax_dev

Re: [PATCH v2 2/2] dax,pmem: Implement pmem based dax data recovery

2021-11-09 Thread Jane Chu
On 11/9/2021 10:48 AM, Dan Williams wrote: > On Mon, Nov 8, 2021 at 11:27 PM Christoph Hellwig wrote: >> >> On Fri, Nov 05, 2021 at 07:16:38PM -0600, Jane Chu wrote: >>> static size_t pmem_copy_from_iter(struct dax_device *dax_dev, pgoff_t >>> pgoff, >>>void *addr, size_t bytes,

Re: [PATCH v2 2/2] dax,pmem: Implement pmem based dax data recovery

2021-11-09 Thread Christoph Hellwig
On Tue, Nov 09, 2021 at 10:48:51AM -0800, Dan Williams wrote: > I think we just make error management a first class citizen of a > dax-device and stop abstracting it behind a driver callback. That way > the driver that registers the dax-device can optionally register error > management as well. The

Re: [dm-devel] [git pull] device mapper changes for 5.16

2021-11-09 Thread pr-tracker-bot
The pull request you sent on Mon, 8 Nov 2021 16:25:28 -0500: > git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git > tags/for-5.16/dm-changes has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/c183e1707aba2c707837569b473d1e9fd48110c4 Thank you! --

Re: [PATCH v2 2/2] dax,pmem: Implement pmem based dax data recovery

2021-11-09 Thread Jane Chu
On 11/8/2021 11:27 PM, Christoph Hellwig wrote: > On Fri, Nov 05, 2021 at 07:16:38PM -0600, Jane Chu wrote: >> static size_t pmem_copy_from_iter(struct dax_device *dax_dev, pgoff_t >> pgoff, >> void *addr, size_t bytes, struct iov_iter *i, int mode) >> { >> +phys_addr_t pmem_o

Re: [PATCH v2 2/2] dax,pmem: Implement pmem based dax data recovery

2021-11-09 Thread Dan Williams
On Mon, Nov 8, 2021 at 11:27 PM Christoph Hellwig wrote: > > On Fri, Nov 05, 2021 at 07:16:38PM -0600, Jane Chu wrote: > > static size_t pmem_copy_from_iter(struct dax_device *dax_dev, pgoff_t > > pgoff, > > void *addr, size_t bytes, struct iov_iter *i, int mode) > > { > > + p

[PATCH 27/29] dax: fix up some of the block device related ifdefs

2021-11-09 Thread Christoph Hellwig
The DAX device <-> block device association is only enabled if CONFIG_BLOCK is enabled. Update dax.h to account for that and use the right conditions for the fs_put_dax stub as well. Signed-off-by: Christoph Hellwig --- include/linux/dax.h | 41 - 1 file

[PATCH 29/29] fsdax: don't require CONFIG_BLOCK

2021-11-09 Thread Christoph Hellwig
The file system DAX code now does not require the block code. So allow building a kernel with fuse DAX but not block layer. Signed-off-by: Christoph Hellwig --- fs/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/Kconfig b/fs/Kconfig index 6d608330a096e..7a2b11

[PATCH 28/29] iomap: build the block based code conditionally

2021-11-09 Thread Christoph Hellwig
Only build the block based iomap code if CONFIG_BLOCK is set. Currently that is always the case, but it will change soon. Signed-off-by: Christoph Hellwig --- fs/Kconfig| 4 ++-- fs/iomap/Makefile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/Kconfig b/fs/K

[PATCH 26/29] fsdax: shift partition offset handling into the file systems

2021-11-09 Thread Christoph Hellwig
Remove the last user of ->bdev in dax.c by requiring the file system to pass in an address that already includes the DAX offset. As part of the only set ->bdev or ->daxdev when actually required in the ->iomap_begin methods. Signed-off-by: Christoph Hellwig --- fs/dax.c | 6 +--

[PATCH 25/29] dax: return the partition offset from fs_dax_get_by_bdev

2021-11-09 Thread Christoph Hellwig
Prepare from removing the block_device from the DAX I/O path by returning the partition offset from fs_dax_get_by_bdev so that the file systems have it at hand for use during I/O. Signed-off-by: Christoph Hellwig --- drivers/dax/super.c | 9 ++--- drivers/md/dm.c | 4 ++-- fs/erofs/inter

[PATCH 23/29] xfs: use IOMAP_DAX to check for DAX mappings

2021-11-09 Thread Christoph Hellwig
Use the explicit DAX flag instead of checking the inode flag in the iomap code. Signed-off-by: Christoph Hellwig --- fs/xfs/xfs_iomap.c | 7 --- fs/xfs/xfs_iomap.h | 3 ++- fs/xfs/xfs_pnfs.c | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/x

[PATCH 24/29] xfs: use xfs_direct_write_iomap_ops for DAX zeroing

2021-11-09 Thread Christoph Hellwig
While the buffered write iomap ops do work due to the fact that zeroing never allocates blocks, the DAX zeroing should use the direct ops just like actual DAX I/O. Signed-off-by: Christoph Hellwig --- fs/xfs/xfs_iomap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/x

[PATCH 22/29] iomap: add a IOMAP_DAX flag

2021-11-09 Thread Christoph Hellwig
Add a flag so that the file system can easily detect DAX operations. Signed-off-by: Christoph Hellwig --- fs/dax.c | 7 --- include/linux/iomap.h | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index 5b52b878124ac..0bd6cdcbacfc4 100644 -

[PATCH 20/29] ext4: cleanup the dax handling in ext4_fill_super

2021-11-09 Thread Christoph Hellwig
Only call fs_dax_get_by_bdev once the sbi has been allocated and remove the need for the dax_dev local variable. Signed-off-by: Christoph Hellwig --- fs/ext4/super.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index eb4df43abd76e..

[PATCH 21/29] xfs: move dax device handling into xfs_{alloc,free}_buftarg

2021-11-09 Thread Christoph Hellwig
Hide the DAX device lookup from the xfs_super.c code. Reviewed-by: Christoph Hellwig --- fs/xfs/xfs_buf.c | 8 fs/xfs/xfs_buf.h | 4 ++-- fs/xfs/xfs_super.c | 26 +- 3 files changed, 11 insertions(+), 27 deletions(-) diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/

[PATCH 17/29] fsdax: factor out a dax_memzero helper

2021-11-09 Thread Christoph Hellwig
Factor out a helper for the "manual" zeroing of a DAX range to clean up dax_iomap_zero a lot. Signed-off-by: Christoph Hellwig --- fs/dax.c | 36 +++- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index d7a923d152240..dc9ebeff

[PATCH 19/29] ext2: cleanup the dax handling in ext2_fill_super

2021-11-09 Thread Christoph Hellwig
Only call fs_dax_get_by_bdev once the sbi has been allocated and remove the need for the dax_dev local variable. Signed-off-by: Christoph Hellwig --- fs/ext2/super.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/fs/ext2/super.c b/fs/ext2/super.c index a964066a8

[PATCH 18/29] fsdax: decouple zeroing from the iomap buffered I/O code

2021-11-09 Thread Christoph Hellwig
Unshare the DAX and iomap buffered I/O page zeroing code. This code previously did a IS_DAX check deep inside the iomap code, which in fact was the only DAX check in the code. Instead move these checks into the callers. Most callers already have DAX special casing anyway and XFS will need it for

[PATCH 15/29] xfs: add xfs_zero_range and xfs_truncate_page helpers

2021-11-09 Thread Christoph Hellwig
From: Shiyang Ruan Add helpers to prepare for using different DAX operations. Signed-off-by: Shiyang Ruan [hch: split from a larger patch + slight cleanups] Signed-off-by: Christoph Hellwig --- fs/xfs/xfs_bmap_util.c | 7 +++ fs/xfs/xfs_file.c | 3 +-- fs/xfs/xfs_iomap.c | 25 +

[PATCH 14/29] fsdax: simplify the pgoff calculation

2021-11-09 Thread Christoph Hellwig
Replace the two steps of dax_iomap_sector and bdev_dax_pgoff with a single dax_iomap_pgoff helper that avoids lots of cumbersome sector conversions. Signed-off-by: Christoph Hellwig --- drivers/dax/super.c | 14 -- fs/dax.c| 35 ++- include

[PATCH 16/29] fsdax: simplify the offset check in dax_iomap_zero

2021-11-09 Thread Christoph Hellwig
The file relative offset must have the same alignment as the storage offset, so use that and get rid of the call to iomap_sector. Signed-off-by: Christoph Hellwig --- fs/dax.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index 5364549d67a48..d7a923d1

[PATCH 12/29] fsdax: remove a pointless __force cast in copy_cow_page_dax

2021-11-09 Thread Christoph Hellwig
Despite its name copy_user_page expected kernel addresses, which is what we already have. Signed-off-by: Christoph Hellwig --- fs/dax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/dax.c b/fs/dax.c index 4e3e5a283a916..73bd1439d8089 100644 --- a/fs/dax.c +++ b/fs/dax.c

[PATCH 11/29] dm-stripe: add a stripe_dax_pgoff helper

2021-11-09 Thread Christoph Hellwig
Add a helper to perform the entire remapping for DAX accesses. This helper open codes bdev_dax_pgoff given that the alignment checks have already been done by the submitting file system and don't need to be repeated. Signed-off-by: Christoph Hellwig Acked-by: Mike Snitzer --- drivers/md/dm-str

[PATCH 13/29] fsdax: use a saner calling convention for copy_cow_page_dax

2021-11-09 Thread Christoph Hellwig
Just pass the vm_fault and iomap_iter structures, and figure out the rest locally. Note that this requires moving dax_iomap_sector up in the file. Signed-off-by: Christoph Hellwig --- fs/dax.c | 29 + 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/fs

[PATCH 10/29] dm-log-writes: add a log_writes_dax_pgoff helper

2021-11-09 Thread Christoph Hellwig
Add a helper to perform the entire remapping for DAX accesses. This helper open codes bdev_dax_pgoff given that the alignment checks have already been done by the submitting file system and don't need to be repeated. Signed-off-by: Christoph Hellwig Acked-by: Mike Snitzer --- drivers/md/dm-log

[PATCH 09/29] dm-linear: add a linear_dax_pgoff helper

2021-11-09 Thread Christoph Hellwig
Add a helper to perform the entire remapping for DAX accesses. This helper open codes bdev_dax_pgoff given that the alignment checks have already been done by the submitting file system and don't need to be repeated. Signed-off-by: Christoph Hellwig Acked-by: Mike Snitzer --- drivers/md/dm-lin

[PATCH 07/29] xfs: factor out a xfs_setup_dax_always helper

2021-11-09 Thread Christoph Hellwig
Factor out another DAX setup helper to simplify future changes. Also move the experimental warning after the checks to not clutter the log too much if the setup failed. Signed-off-by: Christoph Hellwig --- fs/xfs/xfs_super.c | 47 +++--- 1 file changed, 2

[PATCH 08/29] dax: remove dax_capable

2021-11-09 Thread Christoph Hellwig
Just open code the block size and dax_dev == NULL checks in the callers. Signed-off-by: Christoph Hellwig Acked-by: Mike Snitzer --- drivers/dax/super.c | 36 drivers/md/dm-table.c| 22 +++--- drivers/md/dm.c | 2

[PATCH 04/29] dax: simplify the dax_device <-> gendisk association

2021-11-09 Thread Christoph Hellwig
Replace the dax_host_hash with an xarray indexed by the pointer value of the gendisk, and require explicitly calls from the block drivers that want to associate their gendisk with a dax_device. Signed-off-by: Christoph Hellwig Acked-by: Mike Snitzer --- drivers/dax/bus.c| 6 +- dr

[PATCH 03/29] dax: remove CONFIG_DAX_DRIVER

2021-11-09 Thread Christoph Hellwig
CONFIG_DAX_DRIVER only selects CONFIG_DAX now, so remove it. Signed-off-by: Christoph Hellwig --- drivers/dax/Kconfig| 4 drivers/nvdimm/Kconfig | 2 +- drivers/s390/block/Kconfig | 2 +- fs/fuse/Kconfig| 2 +- 4 files changed, 3 insertions(+), 7 deletions(-) diff -

[PATCH 05/29] dax: remove the pgmap sanity checks in generic_fsdax_supported

2021-11-09 Thread Christoph Hellwig
Drivers that register a dax_dev should make sure it works, no need to double check from the file system. Signed-off-by: Christoph Hellwig --- drivers/dax/super.c | 49 + 1 file changed, 1 insertion(+), 48 deletions(-) diff --git a/drivers/dax/super.c

decouple DAX from block devices

2021-11-09 Thread Christoph Hellwig
Hi Dan, this series decouples the DAX from the block layer so that the block_device is not needed at all for the DAX I/O path.

[PATCH 06/29] dax: move the partition alignment check into fs_dax_get_by_bdev

2021-11-09 Thread Christoph Hellwig
fs_dax_get_by_bdev is the primary interface to find a dax device for a block device, so move the partition alignment check there instead of wiring it up through ->dax_supported. Signed-off-by: Christoph Hellwig --- drivers/dax/super.c | 23 ++- 1 file changed, 6 insertions(+)

[PATCH 01/29] nvdimm/pmem: move dax_attribute_group from dax to pmem

2021-11-09 Thread Christoph Hellwig
dax_attribute_group is only used by the pmem driver, and can avoid the completely pointless lookup by the disk name if moved there. This leaves just a single caller of dax_get_by_host, so move dax_get_by_host into the same ifdef block as that caller. Signed-off-by: Christoph Hellwig Reviewed-by:

[PATCH 02/29] dm: make the DAX support dependend on CONFIG_FS_DAX

2021-11-09 Thread Christoph Hellwig
The device mapper DAX support is all hanging off a block device and thus can't be used with device dax. Make it depend on CONFIG_FS_DAX instead of CONFIG_DAX_DRIVER. This also means that bdev_dax_pgoff only needs to be built under CONFIG_FS_DAX now. Signed-off-by: Christoph Hellwig --- drivers