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
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
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
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
Reviewed-by: Chaitanya Kulkarni
---
block/bio.c | 12
block/fops.c| 17 -
include/linux/bio.h | 4
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
Keep blk_next_bio next to the core bio infrastructure.
Signed-off-by: Christoph Hellwig
Reviewed-by: Chaitanya Kulkarni
---
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
argument for a much
more logical calling convention matching what most of the kernel does.
Signed-off-by: Christoph Hellwig
Reviewed-by: Chaitanya Kulkarni
---
block/bio.c | 30 +
block/bounce.c | 6 ++
drivers/block
Pass the block_device that we plan to use this bio for and the
operation to bio_init to optimize the assignment. 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
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
argument for a much
more logical calling convention matching what most of the kernel does.
Signed-off-by: Christoph Hellwig
Reviewed-by: Chaitanya Kulkarni
---
block/bio.c | 5 +
block/fops.c| 4 +---
drivers/block/drbd/drbd_receiver.c | 10
the other callers also don't need to handle failure, as the
integrity and crypto clones are based on mempool allocations that won't
fail for sleeping allocations.
Signed-off-by: Christoph Hellwig
---
block/bio-integrity.c | 1 -
block/bio.c
Make sure the newly allocated bio has the correct bi_bdev set from the
start.
Signed-off-by: Christoph Hellwig
---
drivers/block/drbd/drbd_req.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index
Fold __send_duplicate_bios into its only caller to prepare for
refactoring.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm.c | 27 +++
1 file changed, 11 insertions(+), 16 deletions(-)
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index e1356a4ce0393..b3b60918206b5
Replace an open coded bio_clone_fast with the actual helper.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 5978cb87e9372..984ccafb11ea8 100644
--- a/drivers/md/dm.c
+++ b
Return the clone bio embedded into the tio as that is what the callers
actually want. Similar for the free side.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm.c | 39 +++
1 file changed, 19 insertions(+), 20 deletions(-)
diff --git a/drivers/md/dm.c b
This simplifies the callers a bit.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index f00c0582a2460..7cc477b2b77e9 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
Add a helper to stop open coding the container_of operations to get
from the clone bio to the tio structure.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm.c | 34 +++---
1 file changed, 15 insertions(+), 19 deletions(-)
diff --git a/drivers/md/dm.c b/drivers/md
Move the call to __bio_clone_fast and the assignment of ->len_ptr from
the callers into alloc_tio to prepare for changes to the bio clone API.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm.c | 22 ++
1 file changed, 10 insertions(+), 12 deletions(-)
diff --gi
Pass a block_device to bio_clone_fast and __bio_clone_fast and give
the functions more suitable names.
Signed-off-by: Christoph Hellwig
---
Documentation/block/biodoc.rst | 5 -
block/bio.c | 31 +
block/blk-mq.c | 4
Fold clone_bio into its only caller to prepare for refactoring.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm.c | 43 +--
1 file changed, 17 insertions(+), 26 deletions(-)
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 692a06156c927
All callers of __bio_clone_fast initialize the bio first. Move that
initialization into __bio_clone_fast instead.
Signed-off-by: Christoph Hellwig
---
block/bio.c | 75 -
drivers/md/bcache/request.c | 1 -
drivers/md/dm.c | 5
Fold __remap_to_origin_clear_discard into the two callers to prepare
for bio cloning refactoring.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm-cache-target.c | 24
1 file changed, 8 insertions(+), 16 deletions(-)
diff --git a/drivers/md/dm-cache-target.c b
Hi Jens,
this series changes the bio cloning interface to match the rest changes
to the bio allocation interface and passes the block_device and operation
to the cloning helpers. In addition it renames the cloning helpers to
be more descriptive.
To get there it requires a bit of refactoring in t
The bio in the tio embedded into the clone_info structure is never
initialized. This is harmless as bio_init only zeroes the structure
and assigns the vectors, but add the initialization to prepare for
refactoring the bio cloning logic.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm.c | 1
Most targets just need a single flush bio. Open code that case in
__send_duplicate_bios without the need to add the bio to a list.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm.c | 26 ++
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/drivers/md
On Thu, Jan 27, 2022 at 11:52:51AM -0500, Mike Snitzer wrote:
> I'd like to take a closer look, do you happen to have this series
> available in a git branch?
git://git.infradead.org/users/hch/block.git bio_alloc-cleanup-part2
>
> The changes generally look fine. Any chance you could forecast w
> -static unsigned long __part_start_io_acct(struct block_device *part,
> - unsigned int sectors, unsigned int op)
> +static void __part_start_io_acct(struct block_device *part, unsigned int
> sectors,
> + unsigned int op, unsigned
p(bio));
> + return __part_start_io_acct(bio->bi_bdev, bio_sectors(bio),
> + bio_op(bio), jiffies);
Is droppingthe READ_ONCE safe here? This is a honest question as these
helpers still confuse me.
The rest looks good:
Reviewed-by: Christoph Hel
dividual IO stats in response to a bio_split() that follows bio
> submission.
Looks good:
Reviewed-by: Christoph Hellwig
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
> +static inline int set_mce_nospec(unsigned long pfn)
> {
> unsigned long decoy_addr;
> int rc;
> @@ -117,10 +113,7 @@ static inline int set_mce_nospec(unsigned long pfn, bool
> unmap)
>*/
> decoy_addr = (pfn << PAGE_SHIFT) + (PAGE_OFFSET ^ BIT(63));
>
> - if (unm
On Fri, Jan 28, 2022 at 02:31:45PM -0700, Jane Chu wrote:
> +int dax_prep_recovery(struct dax_device *dax_dev, void **kaddr)
> +{
> + if (dax_recovery_capable(dax_dev)) {
> + set_bit(DAXDEV_RECOVERY, (unsigned long *)kaddr);
> + return 0;
> + }
> + return -EINVAL
On Fri, Jan 28, 2022 at 02:31:50PM -0700, Jane Chu wrote:
> + if (!bad_pmem) {
> write_pmem(pmem_addr, page, page_off, len);
> + } else {
> + rc = pmem_clear_poison(pmem, pmem_off, len);
> + if (rc == BLK_STS_OK)
> + write_pmem(pmem_
On Fri, Jan 28, 2022 at 02:31:47PM -0700, Jane Chu wrote:
> dax_recovery_write() dax op is only required for DAX device that
> export DAXDEV_RECOVERY indicating its capability to recover from
> poisons.
>
> DM may be nested, if part of the base dax devices forming a DM
> device support dax recover
> @@ -257,10 +263,15 @@ static int pmem_rw_page(struct block_device *bdev,
> sector_t sector,
> __weak long __pmem_direct_access(struct pmem_device *pmem, pgoff_t pgoff,
> long nr_pages, void **kaddr, pfn_t *pfn)
> {
> + bool bad_pmem;
> + bool do_recovery = false;
>
On Fri, Jan 28, 2022 at 02:31:49PM -0700, Jane Chu wrote:
> +typedef size_t (*iter_func_t)(struct dax_device *dax_dev, pgoff_t pgoff,
> + void *addr, size_t bytes, struct iov_iter *i);
> static loff_t dax_iomap_iter(const struct iomap_iter *iomi,
> struct iov_iter *iter)
Withmy block hat on: nak to this. No block driver has any business at
all rejecting "too many openers". In fact any opener but the first of
a partition is already not counted as an opener, and I plan to complete
hide the open count from the device driver.
--
dm-devel mailing list
dm-devel@redhat
Make sure the newly allocated bio has the correct bi_bdev set from the
start.
Signed-off-by: Christoph Hellwig
---
drivers/block/drbd/drbd_req.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index
Hi Jens,
this series changes the bio cloning interface to match the rest changes
to the bio allocation interface and passes the block_device and operation
to the cloning helpers. In addition it renames the cloning helpers to
be more descriptive.
To get there it requires a bit of refactoring in t
Fold __send_duplicate_bios into its only caller to prepare for
refactoring.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm.c | 27 +++
1 file changed, 11 insertions(+), 16 deletions(-)
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 9384d250a3e4e..2527b287ead0f
Add a helper to stop open coding the container_of operations to get
from the clone bio to the tio structure.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm.c | 34 +++---
1 file changed, 15 insertions(+), 19 deletions(-)
diff --git a/drivers/md/dm.c b/drivers/md
Fold clone_bio into its only caller to prepare for refactoring.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm.c | 43 +--
1 file changed, 17 insertions(+), 26 deletions(-)
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 5543e18f3c3bc
Move the call to __bio_clone_fast and the assignment of ->len_ptr from
the callers into alloc_tio to prepare for changes to the bio clone API.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm.c | 22 ++
1 file changed, 10 insertions(+), 12 deletions(-)
diff --gi
Most targets just need a single flush bio. Open code that case in
__send_duplicate_bios without the need to add the bio to a list.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm.c | 26 ++
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/drivers/md
All callers of __bio_clone_fast initialize the bio first. Move that
initialization into __bio_clone_fast instead.
Signed-off-by: Christoph Hellwig
---
block/bio.c | 75 -
drivers/md/bcache/request.c | 1 -
drivers/md/md-multipath.c | 1
all callers except for the above mentioned one also don't need
to handle failure at all, given that the integrity and crypto clones are
based on mempool allocations that won't fail for sleeping allocations.
Signed-off-by: Christoph Hellwig
---
block/bio-integrity.c | 1 -
b
Replace open coded bio_clone_fast implementations with the actual helper.
Note that the bio allocated as part of the dm_io structure in alloc_io
will only actually be used later in alloc_tio, making this earlier
cloning of the information safe.
Signed-off-by: Christoph Hellwig
---
drivers/md
Fold __remap_to_origin_clear_discard into the two callers to prepare
for bio cloning refactoring.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm-cache-target.c | 24
1 file changed, 8 insertions(+), 16 deletions(-)
diff --git a/drivers/md/dm-cache-target.c b
Return the clone bio embedded into the tio as that is what the callers
actually want. Similar for the free side.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm.c | 39 +++
1 file changed, 19 insertions(+), 20 deletions(-)
diff --git a/drivers/md/dm.c b
Pass a block_device to bio_clone_fast and __bio_clone_fast and give
the functions more suitable names.
Signed-off-by: Christoph Hellwig
---
Documentation/block/biodoc.rst | 5 -
block/bio.c | 31 +
block/blk-mq.c | 4
This simplifies the callers a bit.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 90341b7fa5809..a43d280e9bc54 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
On Wed, Feb 02, 2022 at 11:07:37PM +, Jane Chu wrote:
> On 2/2/2022 1:20 PM, Jane Chu wrote:
> >> Wouldn't it make more sense to move these helpers out of line rather
> >> than exporting _set_memory_present?
> >
> > Do you mean to move
> > return change_page_attr_set(&addr, numpages, __pgp
On Wed, Feb 02, 2022 at 09:27:42PM +, Jane Chu wrote:
> Yeah, I see. Would you suggest a way to pass the indication from
> dax_iomap_iter to dax_direct_access that the caller intends the
> callee to ignore poison in the range because the caller intends
> to do recovery_write? We tried adding a
On Thu, Feb 03, 2022 at 08:06:33AM -0800, Luis Chamberlain wrote:
> On Wed, Feb 02, 2022 at 06:01:13AM +, Adam Manzanares wrote:
> > BTW I think having the target code be able to implement simple copy without
> > moving data over the fabric would be a great way of showing off the command.
>
>
On Fri, Feb 04, 2022 at 03:15:02PM +0100, Hannes Reinecke wrote:
>> ZNS kernel code testing is also done on QEMU, I've also fixed
>> bugs in the ZNS kernel code which are discovered on QEMU and I've not
>> seen any issues with that. Given that simple copy feature is way smaller
>> than ZNS it will
REQ_OP_WRITE_SAME was only ever submitted by the legacy Linux zeroing
code, which has switched to use REQ_OP_WRITE_ZEROES long ago.
Signed-off-by: Christoph Hellwig
---
drivers/block/drbd/drbd_main.c | 31 ++---
drivers/block/drbd/drbd_nl.c | 72
No more users of REQ_OP_WRITE_SAME or drivers implementing it are left,
so remove the infrastructure.
Signed-off-by: Christoph Hellwig
---
block/blk-core.c | 13 +-
block/blk-lib.c | 91 ---
block/blk-merge.c | 40
There are no more end-users of REQ_OP_WRITE_SAME left, so we can start
deleting it.
Signed-off-by: Christoph Hellwig
---
drivers/md/md-linear.c| 1 -
drivers/md/md-multipath.c | 1 -
drivers/md/md.h | 7 ---
drivers/md/raid0.c| 2 --
drivers/md/raid1.c| 4
There are no more end-users of REQ_OP_WRITE_SAME left, so we can start
deleting it.
Signed-off-by: Christoph Hellwig
---
drivers/scsi/sd.c | 75 ---
drivers/scsi/sd_zbc.c | 2 --
2 files changed, 7 insertions(+), 70 deletions(-)
diff --git a/drivers
The write_same and write_zeroes limits for SCSI are effectively the
same, so the current code works just fine. But we plan to remove
REQ_OP_WRITE_SAME support, so switch to quering the write zeroes
limit for a zeroing WRITE SAME operation.
Signed-off-by: Christoph Hellwig
---
drivers/scsi
Now that we are using REQ_OP_WRITE_ZEROES for all zeroing needs in the
kernel there is very little use left for REQ_OP_WRITE_SAME. We only
have two callers left, and both just export optional protocol features
to remote systems: DRBD and the target code.
For the target code the only real use case
There are no more end-users of REQ_OP_WRITE_SAME left, so we can start
deleting it.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm-core.h | 1 -
drivers/md/dm-crypt.c | 1 -
drivers/md/dm-ebs-target.c| 1 -
drivers/md/dm-io.c| 22
REQ_OP_WRITE_SAME was only ever submitted by the legacy Linux zeroing
code, which has switched to use REQ_OP_WRITE_ZEROES long before rnbd was
even merged.
Signed-off-by: Christoph Hellwig
---
drivers/block/rnbd/rnbd-clt.c | 7 ++-
drivers/block/rnbd/rnbd-clt.h | 1 -
drivers/block/rnbd
On Wed, Feb 09, 2022 at 11:16:13AM +0100, Jinpu Wang wrote:
> Hi Christoph,
>
>
> On Wed, Feb 9, 2022 at 9:28 AM Christoph Hellwig wrote:
> >
> > REQ_OP_WRITE_SAME was only ever submitted by the legacy Linux zeroing
> > code, which has switched to use REQ_OP_WRI
c_io_complete() as the notify.fn and explicitly
> calls wait_for_completion_io() to sync. The comment isn't valid
> any more.
Looks good:
Reviewed-by: Christoph Hellwig
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
On Wed, Feb 09, 2022 at 01:00:26PM -0500, Martin K. Petersen wrote:
>
> Christoph,
>
> > Now that we are using REQ_OP_WRITE_ZEROES for all zeroing needs in the
> > kernel there is very little use left for REQ_OP_WRITE_SAME. We only
> > have two callers left, and both just export optional protoco
GFP_NOIO, &md->queue->bio_split);
bio_chain(ci.io->orig_bio, bio);
trace_block_split(ci.io->orig_bio, bio->bi_iter.bi_sector);
submit_bio_noacct(bio);
and remove another layer of indentation uing the existing label?
Otherwise looks good:
Revi
On Thu, Feb 10, 2022 at 05:38:24PM -0500, Mike Snitzer wrote:
> Signed-off-by: Mike Snitzer
Looks good,
Reviewed-by: Christoph Hellwig
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
t; len = min_t(sector_t, max_io_len(ti, ci->sector), ci->sector_count);
>
> clone = alloc_tio(ci, ti, 0, &len, GFP_NOIO);
> - bio_advance(clone, to_bytes(ci->sector - clone->bi_iter.bi_sector));
> clone->bi_iter.bi_size = to_bytes(len);
Maybe move the
On Thu, Feb 10, 2022 at 05:38:20PM -0500, Mike Snitzer wrote:
> Fold __clone_and_map_data_bio into its only caller.
Looks good,
Reviewed-by: Christoph Hellwig
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
On Thu, Feb 10, 2022 at 05:38:22PM -0500, Mike Snitzer wrote:
> Error path code (for handling DM_MAPIO_REQUEUE and DM_MAPIO_KILL) is
> effectively identical.
Looks good,
Reviewed-by: Christoph Hellwig
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listi
On Thu, Feb 10, 2022 at 05:38:26PM -0500, Mike Snitzer wrote:
> Prep for being able to defer trace_block_bio_remap() until when the
> bio is remapped and submitted by the DM target.
Looks good,
Reviewed-by: Christoph Hellwig
--
dm-devel mailing list
dm-devel@redhat.com
On Thu, Feb 10, 2022 at 05:38:23PM -0500, Mike Snitzer wrote:
> The flush_bio in question was just initialized to be empty, so there
> is no way bio_has_data() will retrun true. So remove stale BUG_ON().
s/retrun/return/
Otherwise looks good:
Reviewed-by: Christoph Hellwig
--
dm
good,
Reviewed-by: Christoph Hellwig
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
On Thu, Feb 10, 2022 at 05:38:27PM -0500, Mike Snitzer wrote:
> Rename dm_io struct's 'endio_lock' member to 'lock' to reuse spinlock
> to protect new member used to flag if IO accounting has been started.
>
> Also move kicking of the suspend queue out to dm_io_dec_pending (the
> only caller) sinc
On Thu, Feb 10, 2022 at 05:38:32PM -0500, Mike Snitzer wrote:
> DM needs the ability to account a clone bio's IO to the original
> block_device. So add @orig_bdev argument to bio_start_io_acct_time.
> Rename bio_start_io_acct_time to bio_start_io_acct_remapped.
> Also, follow bio_end_io_acct and bi
Looks good,
Reviewed-by: Christoph Hellwig
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
follow bio_end_io_acct and bio_end_io_acct_remapped pattern by
> moving bio_start_io_acct to blkdev.h and have it call
> bio_start_io_acct_remapped.
Looks good:
Reviewed-by: Christoph Hellwig
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
Fold dm_dispatch_clone_request into it's only caller, and use a switch
statement to single dispatch for the handling of the different return
values from blk_insert_cloned_request.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm-rq.c | 22 +-
1 file changed, 9 inser
Hi Jens,
this series requires an explicit select to use the blk-mq stacking
interfaces. This means they don't get build without dm support, and
thus the buildbot should catch abuses like the one we had in the ufs
driver more easily. And while I touched this code I also ended up
cleaning up vario
effects is that kernel builds without
device mapper shrink a little bit as well.
Signed-off-by: Christoph Hellwig
---
block/Kconfig | 3 +++
block/blk-mq.c | 2 ++
drivers/md/Kconfig | 1 +
3 files changed, 6 insertions(+)
diff --git a/block/Kconfig b/block/Kconfig
index 205f8d01c6952
Both ->start_time_ns and the RQF_IO_STAT are set when the request is
allocated using blk_mq_alloc_request by dm-mpath in blk_mq_rq_ctx_init.
The block layer also ensures ->start_time_ns is only set when actually
needed.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm-rq.c | 4
The request must be submitted to the queue it was allocated for, so
remove the extra request_queue argument.
Signed-off-by: Christoph Hellwig
---
block/blk-mq.c | 9 -
drivers/md/dm-rq.c | 2 +-
include/linux/blk-mq.h | 3 +--
3 files changed, 6 insertions(+), 8 deletions
Fold blk_cloned_rq_check_limits into its only caller.
Signed-off-by: Christoph Hellwig
---
block/blk-mq.c | 38 +-
1 file changed, 5 insertions(+), 33 deletions(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index db62d34afb637..fc132933397fb 100644
--- a
On Wed, Feb 16, 2022 at 08:07:56PM -0700, Jens Axboe wrote:
> Let's just use the SCSI tree - I didn't check if it throws any conflicts
> right now, so probably something to check upfront...
There is a minor conflict because the __blkdev_issue_write_same
function removed by this series is affected
ng)q->limits.max_write_same_sectors << 9);
> > -}
> > -
>
> This tripped one of my test scripts. We should probably return 0 here
> like we did for discard_zeroes_data and leave the sysfs entry in place.
The maybe fold this in?
---
>From eae8e9b8cff5ee8522b00430a4aabd01ebc7c55a Mon Sep
Remove pscsi_get_bio and simplify the code flow in the only caller.
Signed-off-by: Christoph Hellwig
---
drivers/target/target_core_pscsi.c | 28 ++--
1 file changed, 2 insertions(+), 26 deletions(-)
diff --git a/drivers/target/target_core_pscsi.c
b/drivers/target
Use and embedded bios that is initialized when used instead of
bio_kmalloc plus bio_reset.
Signed-off-by: Christoph Hellwig
---
fs/btrfs/disk-io.c | 8 +---
fs/btrfs/volumes.c | 11 ---
fs/btrfs/volumes.h | 2 +-
3 files changed, 6 insertions(+), 15 deletions(-)
diff --git a/fs
Just initialize the bios on-demand.
Signed-off-by: Christoph Hellwig
---
drivers/block/pktcdvd.c | 25 +
1 file changed, 9 insertions(+), 16 deletions(-)
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index 6aec11ed185d8..e4ee7856483cf 100644
--- a
Hi Jens,
this series finishes off the bio allocation interface cleanups by dealing
with the weirdest member of the famility. bio_kmalloc combines a kmalloc
for the bio and bio_vecs with a hidden bio_init call and magic cleanup
semantics.
This series moves a few callers away from bio_kmalloc and
Remove the magic autofree semantics and require the callers to explicitly
call bio_init to initialize the bio.
This allows bio_free to catch accidental bio_put calls on bio_init()ed
bios as well.
Signed-off-by: Christoph Hellwig
---
block/bio.c| 47
If a plain kmalloc that is not backed by a mempool is safe here for a
large read (and the actual page allocations), it must also be for a
small one, so simplify the code a bit.
Signed-off-by: Christoph Hellwig
---
fs/squashfs/block.c | 11 +++
1 file changed, 3 insertions(+), 8
Just use the %pg format specifier instead.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm-cache-target.c | 10 --
drivers/md/dm-clone-target.c | 10 --
drivers/md/dm-mpath.c| 6 ++
drivers/md/dm-table.c| 30 ++
drivers/md/dm
Just use the %pg format specifier to print the block device name
directly.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm-zoned-metadata.c | 4 ++--
drivers/md/dm-zoned-target.c | 1 -
drivers/md/dm-zoned.h | 9 -
3 files changed, 6 insertions(+), 8 deletions(-)
diff
Use the %pg format specifier to save on stack consuption and code size.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm-crypt.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
index a5006cb6ee8ad..e2b0af4a2ee84
Use the %pg format specifier to save on stack consuption and code size.
Signed-off-by: Christoph Hellwig
---
fs/ext4/page-io.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c
index 1253982268730..18373fa529225 100644
--- a/fs/ext4
->queuedata is set up in pkt_init_queue, so it can't be NULL here.
Signed-off-by: Christoph Hellwig
---
drivers/block/pktcdvd.c | 9 +
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index 623df4141ff3f..a52bbedd2f33
Don't use a WARN_ON when printing a potentially user triggered
condition. Also don't print the partno when the block device name
already includes it, and use the %pg specifier to simplify printing
the block device name.
Signed-off-by: Christoph Hellwig
---
block/blk-core.c | 8 ++
All callers are gone, so remove this wrapper.
Signed-off-by: Christoph Hellwig
---
block/bio.c | 6 --
include/linux/bio.h | 2 --
2 files changed, 8 deletions(-)
diff --git a/block/bio.c b/block/bio.c
index b15f5466ce084..151cace2dbe16 100644
--- a/block/bio.c
+++ b/block/bio.c
Hi Jens,
this series removes the bio_devname helper and just switches all users
to use the %pg format string directly.
Diffstat
block/bio.c |6 --
block/blk-core.c | 25 +++--
drivers/block/pktcdvd.c |9 +
drivers/md/dm-crypt.c
Use the %pg format specifier instead of the stack hungry bdevname
function, and remove handle_bad_sector given that it is not pointless.
Signed-off-by: Christoph Hellwig
---
block/blk-core.c | 17 +
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/block/blk-core.c
1601 - 1700 of 2601 matches
Mail list logo