On Tue, Nov 23, 2021 at 02:54:30PM -0800, Darrick J. Wong wrote:
> Nit: no space before the paren ^ here.
Fixed.
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 spelli
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 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
&g
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
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
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
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
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
Reviewed-by
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
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
Ack
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
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
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
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
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 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
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
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
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
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
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
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
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
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
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
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
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 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
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
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
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
On Thu, Dec 02, 2021 at 07:59:38AM +, Roberto Sassu wrote:
> ok, I will send it together with a patch for a not yet accepted
> software, Integrity Policy Enforcement (IPE), that will be
> the primary user of the introduced functionality.
>
> Regarding the patch itself, could you please provide
On Wed, Dec 01, 2021 at 05:37:08PM +0100, Roberto Sassu wrote:
> Users of the device mapper driver might want to obtain a device status,
> with status types defined in the status_type_t enumerator.
The patch looks really odd. And without the corresponding user of your
new functionality it is enti
On Thu, Dec 02, 2021 at 09:29:52AM +, Roberto Sassu wrote:
> The problem being solved is how to grant access to files
> which satisfy a property defined in the policy.
If you have want to enforce access to files in the block layer using
a specific stacking block driver you don't just have one
While using the MC-safe copy routines is rather pointless on a virtual device
like virtiofs, it also isn't harmful at all. So just use _copy_mc_to_iter
unconditionally to simplify the code.
Signed-off-by: Christoph Hellwig
---
drivers/dax/super.c | 10 --
fs/fuse/virtio_fs.c
Remove the pointless wrappers.
Signed-off-by: Christoph Hellwig
---
drivers/dax/super.c | 8
include/linux/dax.h | 12 ++--
2 files changed, 6 insertions(+), 14 deletions(-)
diff --git a/drivers/dax/super.c b/drivers/dax/super.c
index e7152a6c4cc40..e18155f43a635 100644
--- a
Hi Dan,
this series cleans up a few loose end ends and then removes the
copy_from_iter and copy_to_iter dax_operations methods in favor of
straight calls.
Diffstat:
drivers/dax/bus.c |3 +
drivers/dax/super.c | 40 ++---
drivers/md/dm-linear.c|
Remove the DAXDEV_F_SYNC flag and thus the flags argument to alloc_dax and
just let the drivers call set_dax_synchronous directly.
Signed-off-by: Christoph Hellwig
---
drivers/dax/bus.c| 3 ++-
drivers/dax/super.c | 6 +-
drivers/md/dm.c | 2 +-
drivers
These two wrappers are never used.
Signed-off-by: Christoph Hellwig
---
drivers/nvdimm/pmem.c | 4 ++--
include/linux/uio.h | 20 +---
2 files changed, 3 insertions(+), 21 deletions(-)
diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
index 4190c8c46ca88
, then use them everywhere as they fall back to the plain
ones on s390 anyway and remove an indirect call from the read/write path
as well as a lot of boilerplate code.
Signed-off-by: Christoph Hellwig
---
drivers/dax/super.c | 36 ++--
drivers/md/dm-linear.c| 20
On Sun, Dec 12, 2021 at 06:48:05AM -0800, Dan Williams wrote:
> On Fri, Dec 10, 2021 at 6:05 AM Vivek Goyal wrote:
> >
> > On Thu, Dec 09, 2021 at 07:38:28AM +0100, Christoph Hellwig wrote:
> > > While using the MC-safe copy routines is rather pointless on a virtual
On Sun, Dec 12, 2021 at 06:44:26AM -0800, Dan Williams wrote:
> On Fri, Dec 10, 2021 at 6:17 AM Vivek Goyal wrote:
> > Going forward, I am wondering should virtiofs use flushcache version as
> > well. What if host filesystem is using DAX and mapping persistent memory
> > pfn directly into qemu add
On Sun, Dec 12, 2021 at 06:39:16AM -0800, Dan Williams wrote:
> > /* flag to check if device supports synchronous flush */
> > DAXDEV_SYNC,
> > + /* do not use uncached operations to write data */
> > + DAXDEV_CACHED,
> > + /* do not use mcsafe operations to read d
On Sun, Dec 12, 2021 at 06:22:20AM -0800, Dan Williams wrote:
> > - * Use the 'no check' versions of copy_from_iter_flushcache() and
> > - * copy_mc_to_iter() to bypass HARDENED_USERCOPY overhead. Bounds
> > + * Use the 'no check' versions of _copy_from_iter_flushcache() and
> > + * _copy_mc_to_ite
Hi Dan,
this series cleans up a few loose end ends and then removes the
copy_from_iter and copy_to_iter dax_operations methods in favor of
straight calls.
Changes since v1:
- reword a 'no check' comment
- clean up the flags for the copy routine variants
- drop the last patch
Diffstat:
driver
These two wrappers are never used.
Signed-off-by: Christoph Hellwig
---
drivers/nvdimm/pmem.c | 4 +---
include/linux/uio.h | 20 +---
2 files changed, 2 insertions(+), 22 deletions(-)
diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
index 4190c8c46ca88
Remove the DAXDEV_F_SYNC flag and thus the flags argument to alloc_dax and
just let the drivers call set_dax_synchronous directly.
Signed-off-by: Christoph Hellwig
Reviewed-by: Pankaj Gupta
Reviewed-by: Dan Williams
---
drivers/dax/bus.c| 3 ++-
drivers/dax/super.c | 6
Remove the pointless wrappers.
Signed-off-by: Christoph Hellwig
Reviewed-by: Pankaj Gupta
Reviewed-by: Dan Williams
---
drivers/dax/super.c | 8
include/linux/dax.h | 12 ++--
2 files changed, 6 insertions(+), 14 deletions(-)
diff --git a/drivers/dax/super.c b/drivers/dax
remove indirect call from the read/write fast path
as well as a lot of boilerplate code.
Signed-off-by: Christoph Hellwig
Reviewed-by: Vivek Goyal [virtiofs]
---
drivers/dax/bus.c | 2 +
drivers/dax/super.c | 36 ++--
drivers/md/dm-linear.c| 20
On Tue, Dec 21, 2021 at 10:14:56PM +0800, Ming Lei wrote:
> Hello,
>
> dm-rq may be built on blk-mq device which marks BLK_MQ_F_BLOCKING, so
> dm_mq_queue_rq() may become to sleep current context.
>
> Fixes the issue by allowing dm-rq to set BLK_MQ_F_BLOCKING in case that
> any underlying queue i
On Mon, Jan 10, 2022 at 03:51:40PM +0800, Ming Lei wrote:
> Add block layer API of resubmit_bio_noacct() for handling blk-throttle
> iops limit correctly. Typical use case is that bio split, and it isn't
> good to export blk_throtl_charge_bio_split() for drivers, so add new API
> for serving such p
On Mon, Jan 10, 2022 at 02:03:16PM -0500, Mike Snitzer wrote:
> Ming is lifting code out of __blk_queue_split() for reuse (by DM in
> this instance, because it has its own bio_split+bio_chain).
>
> Are you saying submit_bio_noacct() should be made to call
> blk_throtl_charge_bio_split() and blk_th
On Tue, Jan 11, 2022 at 09:56:36AM +0800, Ming Lei wrote:
> 2) block throttle is block layer internal stuff, and we shouldn't expose
> blk_throtl_charge_bio_split() to driver.
>
> Maybe rename the new API as submit_split_bio_noacct(), but we can't
> reuse submit_bio_noacct() simply, otherwise blk_
On Tue, Dec 28, 2021 at 04:30:08PM -0500, Mike Snitzer wrote:
> Yeah, people use request-based for IO scheduling and more capable path
> selectors. Imposing bio-based would be a pretty jarring workaround for
> BLK_MQ_F_BLOCKING. request-based DM should properly support it.
Given that nvme-tcp is
On Fri, Jan 14, 2022 at 09:51:20PM +0100, Milan Broz wrote:
> I think dm-crypt should stay as SW crypto only (using kernel crypto API,
> so HW acceleration is done through crypto drivers there).
>
> A cleaner solution is to write a much simpler new dm-crypt-inline target,
> which will implement on
rom: Christoph Hellwig
Date: Thu, 13 Jan 2022 10:53:59 +0100
Subject: block: assign bi_bdev for cloned bios in blk_rq_prep_clone
The cloned bios for the cloned request in blk_rq_prep_clone currently
still point to the original bi_bdev. This is harmless because dm-mpath
doesn't look at bi_bdev but
On Tue, Jan 11, 2022 at 11:15:09AM -0500, Mike Snitzer wrote:
> Round and round we go.. Pretty tired of this.
Same here.
> You are perfectly fine with incrementally compromising request-based
> DM's ability to evolve as block core does.
I would not word it that way, but I think we mean the same
On Tue, Jan 11, 2022 at 01:23:53PM -0500, Jeff Moyer wrote:
> Maybe I have bad taste, but the patches didn't look like cruft to me.
> :)
They do to me. The extend the corner case of request on request
stacking that already is a bit of mess even more by adding yet another
special case in the block
ahead
which never sets PF_MEMALLOC and thus doesn't need the retry loop
either.
Both cases will never have __GFP_HIGH set.
Signed-off-by: Christoph Hellwig
---
fs/mpage.c | 35 ++-
1 file changed, 6 insertions(+), 29 deletions(-)
diff --git a/fs/mpage.c b/
bio_alloc will never fail if it is allowed to sleep, so there is no
need for this loop. Also remove the __GFP_HIGH specifier as it doesn't
make sense here given that we'll always fall back to the mempool anyway.
Signed-off-by: Christoph Hellwig
---
fs/ntfs3/fsn
Hi Jens,
this series is posted early because it has wide-ranging changes and could use
some
early ACKs before -rc1.
It changes the interface to the bio allocators to always pass a block_device and
the operation, which is information needed for every bio submitted through
bio_submit. This means
Remove handling of NULL returns from sleeping bio_alloc calls given that
those can't fail.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm-crypt.c | 5 +
drivers/md/dm-log-writes.c | 18 --
drivers/md/dm-thin.c
Remove handling of NULL returns from sleeping bio_alloc calls given that
those can't fail.
Signed-off-by: Christoph Hellwig
---
drivers/block/drbd/drbd_receiver.c | 21 -
1 file changed, 4 insertions(+), 17 deletions(-)
diff --git a/drivers/block/drbd/drbd_receiver
bio_alloc will never fail when it can sleep. Remove the now simple
nilfs_alloc_seg_bio helper and open code it in the only caller.
Signed-off-by: Christoph Hellwig
---
fs/nilfs2/segbuf.c | 31 ---
1 file changed, 4 insertions(+), 27 deletions(-)
diff --git a/fs
bio_alloc will never fail when it can sleep. Remove the now simple
bl_alloc_init_bio helper and open code it in the only caller.
Signed-off-by: Christoph Hellwig
---
fs/nfs/blocklayout/blocklayout.c | 26 +-
1 file changed, 5 insertions(+), 21 deletions(-)
diff --git a
Just open code it next to the bio allocations, which saves a few lines
of code, prepares for future changes and allows to remove the duplicate
bi_opf assignment for the bio_clone_fast case in kcryptd_io_read.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm-crypt.c | 21
Use blkdev_issue_flush, which uses an on-stack bio instead of an
opencoded version with a bio embedded into struct pool.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm-thin.c | 11 +--
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/drivers/md/dm-thin.c b/drivers/md/dm
Keep blk_next_bio next to the core bio infrastructure.
Signed-off-by: Christoph Hellwig
---
block/bio.c | 13 +
block/blk-lib.c | 13 -
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/block/bio.c b/block/bio.c
index 0d400ba2dbd18..43fb28ac6b44e
Only the priv field of rnbd_dev_blk_io is used, so store the value of
that in bio->bi_private directly and remove the entire bio_set overhead.
Signed-off-by: Christoph Hellwig
---
drivers/block/rnbd/rnbd-srv-dev.c | 4 +---
drivers/block/rnbd/rnbd-srv-dev.h | 13 ++---
drivers/bl
Use blkdev_issue_flush, which uses an on-stack bio instead of an
opencoded version with a bio embedded into struct dm_snapshot.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm-snap.c | 21 +
1 file changed, 1 insertion(+), 20 deletions(-)
diff --git a/drivers/md/dm
The memory mapped in process_rdma is contiguous, so there is no need
to loop over bio_add_page. Remove rnbd_bio_map_kern and just open code
the bio allocation and mapping in the caller.
Signed-off-by: Christoph Hellwig
---
drivers/block/rnbd/rnbd-srv-dev.c | 57
All callers need to set the block_device and operation, so lift that into
the common code.
Signed-off-by: Christoph Hellwig
---
block/bio.c | 6 +-
block/blk-lib.c | 19 +--
block/blk-zoned.c | 9 +++--
block/blk.h | 2
for a much
more logical calling convention matching what most of the kernel does.
Signed-off-by: Christoph Hellwig
---
block/bio.c | 5 +
block/fops.c| 4 +---
drivers/block/drbd/drbd_receiver.c | 10 --
drivers/block/rnbd/rnbd-srv.c
Pass the block_device that we plan to use this bio for and the
operation to bio_reset to optimize the assigment. A NULL block_device
can be passed, both for the passthrough case on a raw request_queue and
to temporarily avoid refactoring some nasty code.
Signed-off-by: Christoph Hellwig
Remove handling of NULL returns from sleeping bio_alloc calls given that
those can't fail.
Signed-off-by: Christoph Hellwig
---
drivers/block/xen-blkback/blkback.c | 14 --
1 file changed, 14 deletions(-)
diff --git a/drivers/block/xen-blkback/blkback.c
b/drivers/block/xen-bl
Pass the block_device and operation that we plan to use this bio for to
bio_alloc_kiocb to optimize the assigment.
Signed-off-by: Christoph Hellwig
---
block/bio.c | 12
block/fops.c| 17 -
include/linux/bio.h | 4 ++--
3 files changed, 18
argument for a much
more logical calling convention matching what most of the kernel does.
Signed-off-by: Christoph Hellwig
---
block/bio.c | 29 +
block/bounce.c | 6 ++
drivers/block/drbd/drbd_actlog.c| 5
Pass the block_device that we plan to use this bio for and the
operation to bio_init to optimize the assigment. A NULL block_device
can be passed, both for the passthrough case on a raw request_queue and
to temporarily avoid refactoring some nasty code.
Signed-off-by: Christoph Hellwig
On Tue, Jan 18, 2022 at 08:30:16AM +0800, Ming Lei wrote:
> On Sun, Jan 16, 2022 at 11:51:17PM -0800, Christoph Hellwig wrote:
> > So I actually noticed this during code inspection a while ago, but I
> > think we need to use the actual underlying device instead of NULL here
> &
On Mon, Jan 17, 2022 at 04:00:59PM +0200, Israel Rukshin wrote:
> DM extension gives us several capabilities:
>
> 1. Use the Linux keyring and other key management tools.
>
> - I used "keyctl padd user test-key @u < /tmp/wrapped_dek" at my tests
Well, and kernel consumer can do that.
> 2. S
On Tue, Jan 18, 2022 at 11:38:29AM -0800, Eric Biggers wrote:
> I doubt that people would find Android's dm-default-key to be acceptable,
> given
> that it's a layering violation, and a similar approach was rejected in the
> past
> (https://lore.kernel.org/dm-devel/20170614234040.4326-1-mhalc...@
On Tue, Jan 18, 2022 at 12:27:33PM -0800, Eric Biggers wrote:
> * The block device for a partition doesn't have its own request_queue or
> queue_limits; those are properties of the disk, not the partition. But,
> setting an encryption key may require changes to the queue_limits. For
> examp
On Wed, Jan 19, 2022 at 01:20:54AM +0100, Jinpu Wang wrote:
> this changes lead to IO error all the time, because bio_add_page return len.
> We need if (bio_add_page(bio, virt_to_page(data), datalen,
> offset_in_page(data)) < datalen)
Does this version look good to you?
http
On Tue, Jan 18, 2022 at 10:11:06PM +, Chaitanya Kulkarni wrote:
> On 1/17/22 11:19 PM, Christoph Hellwig wrote:
> > All callers need to set the block_device and operation, so lift that into
> > the common code.
> >
> > Signed-off-by: Christoph Hellwig
> > --
On Tue, Jan 11, 2022 at 11:59:23AM -0700, Jane Chu wrote:
> In v3, dax recovery code path is independent of that of
> normal write. Competing dax recovery threads are serialized,
> racing read threads are guaranteed not overlapping with the
> recovery process.
>
> In this phase, the recovery granu
On Fri, Jan 21, 2022 at 01:33:40AM +, Jane Chu wrote:
> > What tree is this against? I can't apply it to either 5.16 or Linus'
> > current tree.
>
> It was based on your 'dax-block-cleanup' branch a while back.
Do you have a git tree with your patches included available somewhere?
Hi Jens,
this series is posted early because it has wide-ranging changes and could use
some
early ACKs before -rc1.
It changes the interface to the bio allocators to always pass a block_device and
the operation, which is information needed for every bio submitted through
bio_submit. This means
Remove handling of NULL returns from sleeping bio_alloc calls given that
those can't fail.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm-crypt.c | 5 +
drivers/md/dm-log-writes.c | 18 --
drivers/md/dm-thin.c
ahead
which never sets PF_MEMALLOC and thus doesn't need the retry loop
either.
Both cases will never have __GFP_HIGH set.
Signed-off-by: Christoph Hellwig
---
fs/mpage.c | 35 ++-
1 file changed, 6 insertions(+), 29 deletions(-)
diff --git a/fs/mpage.c b/
bio_alloc will never fail if it is allowed to sleep, so there is no
need for this loop. Also remove the __GFP_HIGH specifier as it doesn't
make sense here given that we'll always fall back to the mempool anyway.
Signed-off-by: Christoph Hellwig
---
fs/ntfs3/fsn
Remove handling of NULL returns from sleeping bio_alloc calls given that
those can't fail.
Signed-off-by: Christoph Hellwig
---
drivers/block/drbd/drbd_receiver.c | 22 --
1 file changed, 4 insertions(+), 18 deletions(-)
diff --git a/drivers/block/drbd/drbd_receiver
Use blkdev_issue_flush, which uses an on-stack bio instead of an
opencoded version with a bio embedded into struct pool.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm-thin.c | 11 +--
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/drivers/md/dm-thin.c b/drivers/md/dm
Use blkdev_issue_flush, which uses an on-stack bio instead of an
opencoded version with a bio embedded into struct dm_snapshot.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm-snap.c | 21 +
1 file changed, 1 insertion(+), 20 deletions(-)
diff --git a/drivers/md/dm
The memory mapped in process_rdma is contiguous, so there is no need
to loop over bio_add_page. Remove rnbd_bio_map_kern and just open code
the bio allocation and mapping in the caller.
Signed-off-by: Christoph Hellwig
Reviewed-by: Jack Wang
Tested-by: Jack Wang
---
drivers/block/rnbd/rnbd
From: Chaitanya Kulkarni
All callers need to set the block_device and operation, so lift that into
the common code.
Signed-off-by: Chaitanya Kulkarni
Signed-off-by: Christoph Hellwig
---
block/bio.c | 6 +-
block/blk-lib.c | 19 +--
block/blk
bio_alloc will never fail when it can sleep. Remove the now simple
bl_alloc_init_bio helper and open code it in the only caller.
Signed-off-by: Christoph Hellwig
---
fs/nfs/blocklayout/blocklayout.c | 26 +-
1 file changed, 5 insertions(+), 21 deletions(-)
diff --git a
1501 - 1600 of 2601 matches
Mail list logo