Hi Jens,
this series adds a bvec_virt helper to return the virtual address of the
data in bvec to replace the open coded calculation, and as a reminder
that generall bio/bvec data can be in high memory unless it is caller
controller or in an architecture specific driver where highmem is
Use bvec_virt instead of open coding it.
Signed-off-by: Christoph Hellwig
---
drivers/block/virtio_blk.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 4b49df2dfd23..767b4f72a54d 100644
--- a/drivers/block
Use bvec_virt instead of open coding it.
Signed-off-by: Christoph Hellwig
---
drivers/block/rbd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 6d596c2c2cd6..e65c9d706f6f 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block
Use bvec_virt instead of open coding it.
Signed-off-by: Christoph Hellwig
---
fs/squashfs/block.c| 7 +++
fs/squashfs/lz4_wrapper.c | 2 +-
fs/squashfs/lzo_wrapper.c | 2 +-
fs/squashfs/xz_wrapper.c | 2 +-
fs/squashfs/zlib_wrapper.c | 2 +-
fs/squashfs/zstd_wrapper.c | 2 +-
6
Use bvec_virt instead of open coding it.
Signed-off-by: Christoph Hellwig
---
drivers/s390/block/dasd_diag.c | 2 +-
drivers/s390/block/dasd_eckd.c | 14 +++---
drivers/s390/block/dasd_fba.c | 4 ++--
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/s390/block
Use bvec_virt instead of open coding it.
Signed-off-by: Christoph Hellwig
---
drivers/s390/block/dcssblk.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c
index 29180bdf0977..5be3d1c39a78 100644
--- a/drivers/s390
Use bvec_virt instead of open coding it.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm-integrity.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c
index 20f2510db1f6..a9ea361769a7 100644
--- a/drivers/md/dm
Use the bvec_virt helper to clean up the bio integrity processing a
little bit.
Signed-off-by: Christoph Hellwig
---
block/bio-integrity.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/block/bio-integrity.c b/block/bio-integrity.c
index 8f54d49dc500..6b47cddbbca1
Use bvec_virt instead of open coding it.
Signed-off-by: Christoph Hellwig
---
drivers/block/ps3vram.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/ps3vram.c b/drivers/block/ps3vram.c
index 7fbf469651c4..c7b19e128b03 100644
--- a/drivers/block/ps3vram.c
+++ b
On Mon, Oct 11, 2021 at 03:09:09PM -0400, Michael S. Tsirkin wrote:
> The reason we have trouble is that it's not clear what does the API mean
> outside the realm of TDX.
> If we really, truly want an API that says "ioremap and it's a hardened
> driver" then I guess ioremap_hardened_driver is what
The whole series looks good to me:
Reviewed-by: Christoph Hellwig
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
On Mon, Oct 18, 2021 at 09:43:51AM -0700, Darrick J. Wong wrote:
> > --- a/fs/xfs/xfs_super.c
> > +++ b/fs/xfs/xfs_super.c
> > @@ -339,6 +339,32 @@ xfs_buftarg_is_dax(
> > bdev_nr_sectors(bt->bt_bdev));
> > }
> >
> > +static int
> > +xfs_setup_dax(
>
> /me wonders if this
Just as last time: This does not make any sense. ioremap is shared
by definition.
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
On Tue, Oct 05, 2021 at 06:42:43AM -0400, Michael S. Tsirkin wrote:
> Stefan also pointed out this duplicates the logic from
>
> if (blksize < 512 || blksize > PAGE_SIZE || !is_power_of_2(blksize))
> return -EINVAL;
>
>
> and a bunch of other places.
>
>
> Would it be
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
---
drivers/md/dm-linear.c | 49
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
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
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
Hi Dan,
this series cleans up and simplifies the association between DAX and block
devices in preparation of allowing to mount file systems directly on DAX
devices without a detour through block devices.
Diffstat:
drivers/dax/Kconfig |4
drivers/dax/bus.c|2
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 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
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 inserti
Replace the dax_host_hash with an xarray indexed by the pointer value
of the gendisk, and require explicitl calls from the block drivers that
want to associate their gendisk with a dax_device.
Signed-off-by: Christoph Hellwig
---
drivers/dax/bus.c| 2 +-
drivers/dax/super.c
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
---
drivers/md/dm-log-writes.c | 42
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
---
drivers/md/dm-stripe.c | 63
No functional changet, but this will allow for a tighter integration
with the iomap code, including possible passing the partition offset
in the iomap in the future. For now it mostly avoids growing more
callers outside of fs/dax.c.
Signed-off-by: Christoph Hellwig
---
drivers/dax/super.c | 14
Looks good,
Reviewed-by: Christoph Hellwig
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
On Mon, Sep 27, 2021 at 12:53:14PM +0100, Christoph Hellwig wrote:
> Looks good,
>
> Reviewed-by: Christoph Hellwig
Err, sorry. This was supposed to go to the lastest iteration, I'll
add it there.
___
Virtualization mailing list
Virtu
Looks good,
Reviewed-by: Christoph Hellwig
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
On Mon, Aug 30, 2021 at 03:00:23PM +0300, Max Gurtovoy wrote:
> +static int virtblk_queue_count_set(const char *val,
> + const struct kernel_param *kp)
> +{
> + unsigned int n;
> + int ret;
> +
> + ret = kstrtouint(val, 10, );
> + if (ret != 0 || n > nr_cpu_ids)
> +
On Mon, Oct 25, 2021 at 11:24:57AM +0300, Max Gurtovoy wrote:
> Maybe we can compare the returned status to BLK_STS_OK. But I see we don't
> do it also in NVMe subsystem so I guess we can assume BLK_STS_OK == 0
> forever.
Jes, BLK_STS_OK == 0 is an intentional allowed short cut. It is not
On Mon, Nov 22, 2021 at 07:33:06PM -0800, Dan Williams wrote:
> Is it time to add a "DAX" symbol namespace?
What would be the benefit?
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
On Mon, Nov 22, 2021 at 06:54:09PM -0800, Dan Williams wrote:
> On Thu, Nov 18, 2021 at 10:55 PM Christoph Hellwig wrote:
> >
> > On Wed, Nov 17, 2021 at 09:23:44AM -0800, Dan Williams wrote:
> > > Applied, fixed the spelling of 'dependent' in the subject and picked
On Wed, Nov 17, 2021 at 09:23:44AM -0800, Dan Williams wrote:
> Applied, fixed the spelling of 'dependent' in the subject and picked
> up Mike's Ack from the previous send:
>
> https://lore.kernel.org/r/yyasbvuorceds...@redhat.com
>
> Christoph, any particular reason you did not pick up the tags
On Wed, Nov 17, 2021 at 09:44:25AM -0800, Dan Williams wrote:
> On Tue, Nov 9, 2021 at 12:33 AM Christoph Hellwig wrote:
> >
> > 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
>
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
Reviewed-by: Dan
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
Reviewed-by: Dan Williams
Reviewed-by: Darrick J. Wong
---
drivers/dax/super.c | 14 --
fs/dax.c
Just open code the block size and dax_dev == NULL checks in the callers.
Signed-off-by: Christoph Hellwig
Acked-by: Mike Snitzer
Reviewed-by: Gao Xiang [erofs]
Reviewed-by: Dan Williams
Reviewed-by: Darrick J. Wong
---
drivers/dax/super.c | 36
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
Reviewed-by: Dan Williams
Reviewed-by: Darrick J. Wong
---
fs/dax.c | 29 +
1 file
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
Reviewed-by: Dan Williams
Reviewed-by: Darrick J. Wong
---
fs/ext2/super.c | 12 +---
1 file changed, 5 insertions(+), 7 deletions(-)
diff
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
Reviewed-by: Dan
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
Reviewed-by: Dan Williams
Reviewed-by: Darrick J. Wong
---
fs/dax.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff
it for reflink support as well.
Signed-off-by: Christoph Hellwig
Reviewed-by: Dan Williams
---
fs/dax.c | 77 ++
fs/ext2/inode.c| 7 ++--
fs/ext4/inode.c| 5 +--
fs/iomap/buffered-io.c | 35 +++
fs/xfs/xfs_iomap.c
Despite its name copy_user_page expected kernel addresses, which is what
we already have.
Signed-off-by: Christoph Hellwig
Reviewed-by: Dan Williams
Reviewed-by: Darrick J. Wong
---
fs/dax.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/dax.c b/fs/dax.c
index
Hide the DAX device lookup from the xfs_super.c code.
Signed-off-by: Christoph Hellwig
Reviewed-by: Darrick J. Wong
Reviewed-by: Dan Williams
---
fs/xfs/xfs_buf.c | 8
fs/xfs/xfs_buf.h | 4 ++--
fs/xfs/xfs_super.c | 26 +-
3 files changed, 11 insertions
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
Reviewed-by: Dan Williams
Reviewed-by: Darrick J. Wong
---
fs/xfs/xfs_bmap_util.c | 7 +++
fs
To prepare for looking at the IOMAP_DAX flag in xfs_bmbt_to_iomap pass in
the input mapping flags to xfs_bmbt_to_iomap.
Signed-off-by: Christoph Hellwig
---
fs/xfs/libxfs/xfs_bmap.c | 4 ++--
fs/xfs/xfs_aops.c| 2 +-
fs/xfs/xfs_iomap.c | 35
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
Reviewed-by: Dan Williams
Reviewed-by: Darrick J. Wong
---
fs/dax.c | 36 +++-
1 file changed, 19 insertions(+), 17 deletion
that are based on the block device.
In the long run it should also allow turning the bdev, dax_dev
and inline_data into a union.
Signed-off-by: Christoph Hellwig
Reviewed-by: Dan Williams
---
fs/dax.c | 7 ---
fs/ext4/inode.c | 4 ++--
fs/xfs/xfs_iomap.c| 7 ---
fs/xfs
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
Reviewed-by: Dan Williams
Reviewed-by: Darrick J. Wong
---
fs/ext4/super.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git
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
Reviewed-by: Dan Williams
---
drivers/dax/super.c | 49 +
1 file changed, 1 insertion(+), 48 deletions(-)
diff
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.
Changes since v1:
- rebase on latest v5.16-rc
- ensure the new dax zeroing helpers are always declared
- fix a dax_dev leak in pmem_attach_disk
- remove '\n' from an
Make sure ->dax_dev is NULL on error so that the cleanup path doesn't
trip over an ERR_PTR.
Reported-by: Dan Williams
Signed-off-by: Christoph Hellwig
---
drivers/md/dm.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
in
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
Reviewed-by: Dan
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
Reviewed-by: Dan Williams
---
drivers/dax/super.c | 23 ++-
CONFIG_DAX_DRIVER only selects CONFIG_DAX now, so remove it.
Signed-off-by: Christoph Hellwig
Reviewed-by: Dan Williams
---
drivers/dax/Kconfig| 4
drivers/nvdimm/Kconfig | 2 +-
drivers/s390/block/Kconfig | 2 +-
fs/fuse/Kconfig| 2 +-
4 files changed, 3
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
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
Acked
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
Reviewed-by: Dan Williams
Reviewed-by: Darrick J. Wong
---
fs/xfs/xfs_super.c | 47
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
Reviewed-by: Dan Williams
Reviewed-by: Darrick J. Wong
---
include
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
Reviewed-by: Dan Williams
Reviewed-by: Darrick J. Wong
---
fs/xfs/xfs_iomap.c | 4 ++--
1 file
Prepare for the removal of 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
Reviewed-by: Dan Williams
---
drivers/dax/super.c | 9 ++---
drivers/md
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
Reviewed-by: Gao X
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
Reviewed-by: Dan Williams
Reviewed-by: Darrick J. Wong
---
fs/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff
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
Reviewed-by: Dan Williams
Reviewed-by: Darrick J. Wong
---
fs/Kconfig| 4 ++--
fs/iomap/Makefile | 4 ++--
2 files changed, 4
On Tue, Nov 23, 2021 at 02:25:55PM -0800, Darrick J. Wong wrote:
> > + if ((get_start_sect(bdev) * SECTOR_SIZE) % PAGE_SIZE ||
> > + (bdev_nr_sectors(bdev) * SECTOR_SIZE) % PAGE_SIZE) {
>
> Do we have to be careful about 64-bit division here, or do we not
> support DAX on 32-bit?
I can't
On Tue, Nov 23, 2021 at 02:36:42PM -0800, Darrick J. Wong wrote:
> > - phys_addr_t phys_off = (start_sect + sector) * 512;
> > -
> > - if (pgoff)
> > - *pgoff = PHYS_PFN(phys_off);
> > - if (phys_off % PAGE_SIZE || size % PAGE_SIZE)
>
> AFAICT, we're relying on fs_dax_get_by_bdev
On Tue, Nov 23, 2021 at 01:22:13PM -0800, Dan Williams wrote:
> On Tue, Nov 9, 2021 at 12:34 AM Christoph Hellwig wrote:
> >
> > Factor out a helper for the "manual" zeroing of a DAX range to clean
> > up dax_iomap_zero a lot.
> >
>
>
On Tue, Nov 23, 2021 at 02:53:15PM -0800, Darrick J. Wong wrote:
> > -s64 dax_iomap_zero(loff_t pos, u64 length, struct iomap *iomap)
> > +static loff_t dax_zero_iter(struct iomap_iter *iter, bool *did_zero)
>
> Shouldn't this return value remain s64 to match iomap_iter.processed?
I'll switch it
On Tue, Nov 23, 2021 at 06:56:29PM -0800, Dan Williams wrote:
> On Tue, Nov 9, 2021 at 12:34 AM Christoph Hellwig wrote:
> >
> > Prepare from removing the block_device from the DAX I/O path by returning
>
> s/from removing/for the removal of/
Fixed.
> >
On Tue, Nov 23, 2021 at 06:47:10PM -0800, Dan Williams wrote:
> On Tue, Nov 9, 2021 at 12:34 AM Christoph Hellwig wrote:
> >
> > Add a flag so that the file system can easily detect DAX operations.
>
> Looks ok, but I would have preferred a quick note about the rationale
On Tue, Nov 23, 2021 at 02:31:23PM -0800, Darrick J. Wong wrote:
> > - struct super_block *sb = mp->m_super;
> > -
> > - if (!xfs_buftarg_is_dax(sb, mp->m_ddev_targp) &&
> > - (!mp->m_rtdev_targp || !xfs_buftarg_is_dax(sb, mp->m_rtdev_targp))) {
> > + if
On Tue, Nov 23, 2021 at 01:46:35PM -0800, Dan Williams wrote:
> > + const struct iomap_ops *ops)
> > +{
> > + unsigned int blocksize = i_blocksize(inode);
> > + unsigned int off = pos & (blocksize - 1);
> > +
> > + /* Block boundary? Nothing to do */
> > + if
On Tue, Nov 23, 2021 at 02:54:30PM -0800, Darrick J. Wong wrote:
> Nit: no space before the paren ^ here.
Fixed.
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
On Tue, Nov 23, 2021 at 06:40:47PM -0800, Dan Williams wrote:
> On Tue, Nov 9, 2021 at 12:34 AM Christoph Hellwig wrote:
> >
> > Hide the DAX device lookup from the xfs_super.c code.
> >
> > Reviewed-by: Christoph Hellwig
>
> That's an interesting spelling of
On Tue, Nov 23, 2021 at 03:01:24PM -0800, Darrick J. Wong wrote:
> On Tue, Nov 09, 2021 at 09:33:03AM +0100, Christoph Hellwig wrote:
> > Use the explicit DAX flag instead of checking the inode flag in the
> > iomap code.
> >
> > Signed-off-by: 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.
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
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 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
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
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
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
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
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
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
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
it for reflink support as well.
Signed-off-by: Christoph Hellwig
---
fs/dax.c | 77 ++
fs/ext2/inode.c| 6 ++--
fs/ext4/inode.c| 4 +--
fs/iomap/buffered-io.c | 35 +++
fs/xfs/xfs_iomap.c | 6
include
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
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
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 inserti
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
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
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
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
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
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
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
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
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
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
501 - 600 of 910 matches
Mail list logo