On 4/22/25 16:26, Christoph Hellwig wrote:
Split bio_map_kern into a simple version that can use bio_add_virt_nofail
for kernel direct mapping addresses and a more complex bio_map_vmalloc
with the logic to chunk up and map vmalloc ranges using the
bio_add_vmalloc helper.
Signed-off-by: Christoph
On 4/22/25 16:26, Christoph Hellwig wrote:
That way the bio can be allocated with the right operation already
set and there is no need to pass the separated 'reading' argument.
Signed-off-by: Christoph Hellwig
---
block/blk-map.c | 30 ++
1 file changed, 14 insert
On 4/22/25 16:26, Christoph Hellwig wrote:
Remove the q argument from blk_rq_map_kern and the internal helpers
called by it as the queue can trivially be derived from the request.
Signed-off-by: Christoph Hellwig
---
block/blk-map.c| 24 ++--
drivers/block/pkt
On 4/22/25 16:26, Christoph Hellwig wrote:
Add a helper to add a vmalloc region to a bio, abstracting away the
vmalloc addresses from the underlying pages. Also add a helper to
calculate how many segments need to be allocated for a vmalloc region.
Signed-off-by: Christoph Hellwig
---
block/b
On 4/22/25 16:26, Christoph Hellwig wrote:
Add a helper to perform synchronous I/O on a kernel direct map range.
Currently this is implemented in various places in usually not very
efficient ways, so provide a generic helper instead.
Signed-off-by: Christoph Hellwig
---
block/bio.c |
On 4/22/25 16:26, Christoph Hellwig wrote:
Add a helper to add a directly mapped kernel virtual address to a
bio so that callers don't have to convert to pages or folios.
For now only the _nofail variant is provided as that is what all the
obvious callers want.
Signed-off-by: Christoph Hellwig
On Tue, Apr 22, 2025 at 08:15:20PM -0400, Benjamin Marzinski wrote:
> On Tue, Apr 22, 2025 at 08:02:54PM -0400, Kent Overstreet wrote:
> > On Tue, Apr 22, 2025 at 07:47:34PM -0400, Benjamin Marzinski wrote:
> > > This patchset handles some dm-flakey issues reported by Kent Overstreet.
> > > It fixe
On Tue, Apr 22, 2025 at 08:02:54PM -0400, Kent Overstreet wrote:
> On Tue, Apr 22, 2025 at 07:47:34PM -0400, Benjamin Marzinski wrote:
> > This patchset handles some dm-flakey issues reported by Kent Overstreet.
> > It fixes some issues with dm-flakey's parsing and feature interactions
> > and make
A BUG was reported as below when CONFIG_DEBUG_ATOMIC_SLEEP and
try_verify_in_tasklet are enabled.
[ 129.444685][ T934] BUG: sleeping function called from invalid context at
drivers/md/dm-bufio.c:2421
[ 129.444723][ T934] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid:
934, name: kworke
On Tue, Apr 22, 2025 at 07:47:34PM -0400, Benjamin Marzinski wrote:
> This patchset handles some dm-flakey issues reported by Kent Overstreet.
> It fixes some issues with dm-flakey's parsing and feature interactions
> and makes corrupting read bios work.
>
> Benjamin Marzinski (4):
> dm-flakey:
dm-flakey would error all IOs if num_features was 0, but if it was
absent, dm-flakey would never error any IO. Fix this so that no
num_features works the same as num_features set to 0.
Fixes: aa7d7bc99fed7 ("dm flakey: add an "error_reads" option")
Reported-by: Kent Overstreet
Signed-off-by: Benj
If ERROR_READS is set, flakey_map returns DM_MAPIO_KILL for read
bios and flakey_end_io is never called, so there's no point in
checking it there. Also clean up an incorrect comment about when
read IOs are errored out.
Signed-off-by: Benjamin Marzinski
---
drivers/md/dm-flakey.c | 11 ++-
This patchset handles some dm-flakey issues reported by Kent Overstreet.
It fixes some issues with dm-flakey's parsing and feature interactions
and makes corrupting read bios work.
Benjamin Marzinski (4):
dm-flakey: Clean up parsing messages
dm-flakey: error all IOs when num_features is absent
dm-flakey corrupts the read bios in the endio function. However, the
corrupt_bio_* functions checked bio_has_data() to see if there was data
to corrupt. Since this was the endio function, there was no data left to
complete, so bio_has_data() was always false. Fix this by saving a copy
of the bio's
There were a number of cases where the error message for an invalid
table line did not match the actual problem. Fix these. Additionally,
error out when duplicate corrupt_bio_byte, random_read_corrupt, or
random_write_corrupt features are present. Also, error_reads is
incompatible with random_read_
On Wed, Apr 16, 2025 at 8:07 PM LongPing Wei wrote:
> diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c
> index 9c8ed65cd87e..3088f9f9169a 100644
> --- a/drivers/md/dm-bufio.c
> +++ b/drivers/md/dm-bufio.c
> @@ -2424,8 +2426,13 @@ static void __scan(struct dm_bufio_client *c)
>
>
From: Eric Biggers
Make the device-mapper layer pass through the derive_sw_secret,
import_key, generate_key, and prepare_key blk-crypto operations when all
underlying devices support hardware-wrapped inline crypto keys and are
passing through inline crypto support.
Commit ebc4176551cd ("blk-cryp
From: Eric Biggers
Export blk_crypto_derive_sw_secret(), blk_crypto_import_key(),
blk_crypto_generate_key(), and blk_crypto_prepare_key() so that they can
be used by device-mapper when passing through wrapped key support.
Signed-off-by: Eric Biggers
---
block/blk-crypto-profile.c | 4
1 f
This series makes the device-mapper layer pass through the blk-crypto
wrapped key operations when underlying devices support them.
Eric Biggers (2):
blk-crypto: export wrapped key functions
dm: pass through operations on wrapped inline crypto keys
block/blk-crypto-profile.c | 4 +
drivers/
From: Eric Biggers
Further limit verification in softirq (a.k.a. BH) context to cases where
rescheduling of the interrupted task is not pending.
This helps prevent the CPU from spending too long in softirq context.
Note that handle_softirqs() in kernel/softirq.c already stops running
softirqs i
From: Eric Biggers
Every 30 seconds, dm-bufio evicts all buffers that were not accessed
within the last max_age_seconds, except those pinned in memory via
retain_bytes. By default max_age_seconds is 300 (i.e. 5 minutes), and
retain_bytes is 262144 (i.e. 256 KiB) per dm-bufio client.
This evicti
A small code cleanup: use blk_queue_disable_discard and
blk_queue_disable_write_zeroes instead of disable_discard and
disable_write_zeroes.
Signed-off-by: Mikulas Patocka
---
drivers/md/dm-core.h |3 ---
drivers/md/dm-rq.c |4 ++--
drivers/md/dm.c | 20 ++--
3 f
If we use the 'B' mode and we have an invalit table line,
cancel_delayed_work_sync would trigger a warning. This commit avoids the
warning.
Signed-off-by: Mikulas Patocka
Cc: sta...@vger.kernel.org
---
drivers/md/dm-integrity.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: li
Lock queue limits when reading them, so that we don't read halfway
modified values.
Signed-off-by: Mikulas Patocka
Cc: sta...@vger.kernel.org
---
drivers/md/dm-table.c |8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
Index: linux-2.6/drivers/md/dm-table.c
===
On Tue, 22 Apr 2025, Damien Le Moal wrote:
> It is not because you do not see a clean solution that there is not one. So
> unless you have completely made up your mind already and are not willing to
I haven't made up my mind completely.
> I do not understand what you are talking about. A zone
On Tue, Apr 22, 2025 at 04:26:01PM +0200, Christoph Hellwig wrote:
> Hi all,
>
> this series adds more block layer helpers to remove boilerplate code when
> adding memory to a bio or to even do the entire synchronous I/O.
>
> The main aim is to avoid having to convert to a struct page in the call
Split hib_submit_io into a sync and async version. The sync version is
a small wrapper around bdev_rw_virt which implements all the logic to
add a kernel direct mapping range to a bio and synchronously submits it,
while the async version is slightly simplified using the
bio_add_virt_nofail for add
Replace the code building a bio from a kernel direct map address and
submitting it synchronously with the bdev_rw_virt helper.
Signed-off-by: Christoph Hellwig
---
fs/btrfs/scrub.c | 10 ++
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
Switch zonefs_read_super to allocate the superblock buffer using kmalloc
which falls back to the page allocator for PAGE_SIZE allocation but
gives us a kernel virtual address and then use bdev_rw_virt to perform
the synchronous read into it.
Signed-off-by: Christoph Hellwig
---
fs/zonefs/super.c
Switch gfs2_read_super to allocate the superblock buffer using kmalloc
which falls back to the page allocator for PAGE_SIZE allocation but
gives us a kernel virtual address and then use bdev_rw_virt to perform
the synchronous read into it.
Signed-off-by: Christoph Hellwig
---
fs/gfs2/ops_fstype.
Delegate to bdev_rw_virt when operating on non-vmalloc memory and use
bio_add_vmalloc to insulate xfs from the details of adding vmalloc memory
to a bio.
Signed-off-by: Christoph Hellwig
---
fs/xfs/xfs_bio_io.c | 30 --
1 file changed, 12 insertions(+), 18 deletions(-
Replace the code building a bio from a kernel direct map address and
submitting it synchronously with the bdev_rw_virt helper.
Signed-off-by: Christoph Hellwig
---
fs/hfsplus/wrapper.c | 46 +---
1 file changed, 9 insertions(+), 37 deletions(-)
diff --git
Convert the __bio_add_page(..., virt_to_page(), ...) pattern to the
bio_add_virt_nofail helper implementing it and use bio_add_vmalloc
to insulate xfs from the details of adding vmalloc memory to a bio.
Signed-off-by: Christoph Hellwig
---
fs/xfs/xfs_buf.c | 27 ---
1 fil
Use the bio_add_virt_nofail to add a single kernel virtual address
to a bio as that can't fail.
Signed-off-by: Christoph Hellwig
---
drivers/block/rnbd/rnbd-srv.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/block/rnbd/rnbd-srv.c b/drivers/block/rnbd/rnbd-srv
Convert the __bio_add_page(..., virt_to_page(), ...) pattern to the
bio_add_virt_nofail helper implementing it, and do the same for the
similar pattern using bio_add_page for adding the first segment after
a bio allocation as that can't fail either.
Signed-off-by: Christoph Hellwig
---
drivers/m
Convert the __bio_add_page(..., virt_to_page(), ...) pattern to the
bio_add_virt_nofail helper implementing it.
Signed-off-by: Christoph Hellwig
---
drivers/md/bcache/super.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super
Split bio_map_kern into a simple version that can use bio_add_virt_nofail
for kernel direct mapping addresses and a more complex bio_map_vmalloc
with the logic to chunk up and map vmalloc ranges using the
bio_add_vmalloc helper.
Signed-off-by: Christoph Hellwig
---
block/blk-map.c | 74 +
Convert the __bio_add_page(..., virt_to_page(), ...) pattern to the
bio_add_virt_nofail helper implementing it.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm-bufio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c
index 9c8ed
That way the bio can be allocated with the right operation already
set and there is no need to pass the separated 'reading' argument.
Signed-off-by: Christoph Hellwig
---
block/blk-map.c | 30 ++
1 file changed, 14 insertions(+), 16 deletions(-)
diff --git a/block/bl
Remove the q argument from blk_rq_map_kern and the internal helpers
called by it as the queue can trivially be derived from the request.
Signed-off-by: Christoph Hellwig
---
block/blk-map.c| 24 ++--
drivers/block/pktcdvd.c| 2 +-
drivers/block/ublk_drv.c |
Add a helper to add a vmalloc region to a bio, abstracting away the
vmalloc addresses from the underlying pages. Also add a helper to
calculate how many segments need to be allocated for a vmalloc region.
Signed-off-by: Christoph Hellwig
---
block/bio.c | 27 +++
Add a helper to perform synchronous I/O on a kernel direct map range.
Currently this is implemented in various places in usually not very
efficient ways, so provide a generic helper instead.
Signed-off-by: Christoph Hellwig
---
block/bio.c | 30 ++
include/lin
Add a helper to add a directly mapped kernel virtual address to a
bio so that callers don't have to convert to pages or folios.
For now only the _nofail variant is provided as that is what all the
obvious callers want.
Signed-off-by: Christoph Hellwig
---
include/linux/bio.h | 17 ++
Hi all,
this series adds more block layer helpers to remove boilerplate code when
adding memory to a bio or to even do the entire synchronous I/O.
The main aim is to avoid having to convert to a struct page in the caller
when adding kernel direct mapping or vmalloc memory.
Diffstat:
block/bio.c
On 2025/4/22 18:29, Mikulas Patocka wrote:
Hi
On Thu, 17 Apr 2025, Dongsheng Yang wrote:
+ccing md-devel
On 2025/4/16 23:10, Jens Axboe wrote:
On 4/16/25 12:08 AM, Dongsheng Yang wrote:
On 2025/4/16 9:04, Jens Axboe wrote:
On 4/15/25 12:00 PM, Dan Williams wrote:
Thanks for making the
On 4/22/25 20:27, Mikulas Patocka wrote:
>
>
> On Fri, 18 Apr 2025, Damien Le Moal wrote:
>
>>> It seems that you want to send many small overlapping write bios - the
>>> question is why? Why can't the application accumulate the content and send
>>> it as one big bio?
>>
>> That is the applica
On Thu, 17 Apr 2025, LongPing Wei wrote:
> On 2025/4/16 20:22, Mikulas Patocka wrote:
> >
> >
> > On Wed, 16 Apr 2025, LongPing Wei wrote:
> >
> > > A BUG was reported as below when CONFIG_DEBUG_ATOMIC_SLEEP and
> > > try_verify_in_tasklet are enabled.
> > >
> > > diff --git a/drivers/md/dm
On Fri, 18 Apr 2025, Damien Le Moal wrote:
> > It seems that you want to send many small overlapping write bios - the
> > question is why? Why can't the application accumulate the content and send
> > it as one big bio?
>
> That is the application problem. On HDDs at least, small IOs will hu
Thanks, I staged this patch for 6.15.
Mikulas
On Thu, 17 Apr 2025, LongPing Wei wrote:
> A BUG was reported as below when CONFIG_DEBUG_ATOMIC_SLEEP and
> try_verify_in_tasklet are enabled.
> [ 129.444685][ T934] BUG: sleeping function called from invalid context at
> drivers/md/dm-bufio.c:24
Hi
On Thu, 17 Apr 2025, Dongsheng Yang wrote:
> +ccing md-devel
>
> On 2025/4/16 23:10, Jens Axboe wrote:
> > On 4/16/25 12:08 AM, Dongsheng Yang wrote:
> > > On 2025/4/16 9:04, Jens Axboe wrote:
> > > > On 4/15/25 12:00 PM, Dan Williams wrote:
> > > > > Thanks for making the comparison chart.
50 matches
Mail list logo