Skip to content

Conversation

@blktests-ci
Copy link

@blktests-ci blktests-ci bot commented Jan 29, 2026

Pull request for series with
subject: ublk: misc improvement in driver and selftests
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1048345

axboe added 14 commits January 27, 2026 11:10
Called when copy_process() is called to copy state to a new child.
Right now this is just a stub, but will be used shortly to properly
handle fork'ing of task based io_uring restrictions.

Reviewed-by: Christian Brauner (Microsoft) <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Currently io_uring supports restricting operations on a per-ring basis.
To use those, the ring must be setup in a disabled state by setting
IORING_SETUP_R_DISABLED. Then restrictions can be set for the ring, and
the ring can then be enabled.

This commit adds support for IORING_REGISTER_RESTRICTIONS with ring_fd
== -1, like the other "blind" register opcodes which work on the task
rather than a specific ring. This allows registration of the same kind
of restrictions as can been done on a specific ring, but with the task
itself. Once done, any ring created will inherit these restrictions.

If a restriction filter is registered with a task, then it's inherited
on fork for its children. Children may only further restrict operations,
not extend them.

Inheriting restrictions include both the classic
IORING_REGISTER_RESTRICTIONS based restrictions, as well as the BPF
filters that have been registered with the task via
IORING_REGISTER_BPF_FILTER.

Signed-off-by: Jens Axboe <[email protected]>
* for-7.0/block: (108 commits)
  block: rnull: remove imports available via prelude
  block: remove bio_last_bvec_all
  md raid: fix hang when stopping arrays with metadata through dm-raid
  md-cluster: fix NULL pointer dereference in process_metadata_update
  md/bitmap: fix GPF in write_page caused by resize race
  md/md-llbitmap: fix percpu_ref not resurrected on suspend timeout
  md/raid5: fix IO hang with degraded array with llbitmap
  md: remove recovery_disabled
  md/raid10: cleanup skip handling in raid10_sync_request
  md/raid10: fix any_working flag handling in raid10_sync_request
  md: move finish_reshape to md_finish_sync()
  md: factor out sync completion update into helper
  md: remove MD_RECOVERY_ERROR handling and simplify resync_offset update
  md: update curr_resync_completed even when MD_RECOVERY_INTR is set
  md: mark rdev Faulty when badblocks setting fails
  md: break remaining operations on badblocks set failure in narrow_write_error
  md/raid1,raid10: support narrow_write_error when badblocks is disabled
  md: factor error handling out of md_done_sync into helper
  md/raid1: simplify uptodate handling in end_sync_write
  md/raid5: make sure max_sectors is not less than io_opt
  ...
* for-7.0/io_uring: (25 commits)
  io_uring/rsrc: use GFP_KERNEL_ACCOUNT consistently
  io_uring/futex: use GFP_KERNEL_ACCOUNT for futex data allocation
  io_uring/io-wq: handle !sysctl_hung_task_timeout_secs
  io_uring: fix bad indentation for setup flags if statement
  io_uring/rsrc: take unsigned index in io_rsrc_node_lookup()
  io_uring: introduce non-circular SQ
  io_uring: split out CQ waiting code into wait.c
  io_uring: split out task work code into tw.c
  io_uring/io-wq: don't trigger hung task for syzbot craziness
  io_uring: add IO_URING_EXIT_WAIT_MAX definition
  io_uring/sync: validate passed in offset
  io_uring/eventfd: remove unused ctx->evfd_last_cq_tail member
  io_uring/timeout: annotate data race in io_flush_timeouts()
  io_uring/uring_cmd: explicitly disallow cancelations for IOPOLL
  io_uring: fix IOPOLL with passthrough I/O
  io_uring: track restrictions separately for IORING_OP and IORING_REGISTER
  io_uring: move ctx->restricted check into io_check_restriction()
  io_uring/register: set ctx->restricted when restrictions are parsed
  io_uring/register: have io_parse_restrictions() set restrictions enabled
  io_uring/register: have io_parse_restrictions() return number of ops
  ...
* io_uring-bpf-restrictions.4:
  io_uring: allow registration of per-task restrictions
  io_uring: add task fork hook
  io_uring/bpf_filter: add ref counts to struct io_bpf_filter
  io_uring/bpf_filter: cache lookup table in ctx->bpf_filters
  io_uring/bpf_filter: allow filtering on contents of struct open_how
  io_uring/net: allow filtering on IORING_OP_SOCKET data
  io_uring: add support for BPF filtering for opcode restrictions
Not for upstream, just a merge to help figure out what is going on
with syzbot.

* io_uring-syzbot-cancel:
  io_uring: add debug dumping for when the ring can't exit
* for-7.0/io_uring-zcrx-large-buffers:
  io_uring/zcrx: implement large rx buffer support
  io_uring/zcrx: document area chunking parameter
  selftests: iou-zcrx: test large chunk sizes
  eth: bnxt: support qcfg provided rx page size
  eth: bnxt: adjust the fill level of agg queues with larger buffers
  eth: bnxt: store rx buffer size per queue
  net: pass queue rx page size from memory provider
  net: add bare bone queue configs
  net: reduce indent of struct netdev_queue_mgmt_ops members
  net: memzero mp params when closing a queue
* for-7.0/io_uring:
  io_uring/net: don't continue send bundle if poll was required for retry
* block-6.19:
  Revert "rnbd-clt: fix refcount underflow in device unmap path"
* for-7.0/block:
  rnbd-clt: fix refcount underflow in device unmap path
* for-7.0/block-stable-pages:
  xfs: use bounce buffering direct I/O when the device requires stable pages
  iomap: add a flag to bounce buffer direct I/O
  iomap: support ioends for direct reads
  iomap: rename IOMAP_DIO_DIRTY to IOMAP_DIO_USER_BACKED
  iomap: free the bio before completing the dio
  iomap: share code between iomap_dio_bio_end_io and iomap_finish_ioend_direct
  iomap: split out the per-bio logic from iomap_dio_bio_iter
  iomap: simplify iomap_dio_bio_iter
  iomap: fix submission side handling of completion side errors
  block: add helpers to bounce buffer an iov_iter into bios
  block: remove bio_release_page
  iov_iter: extract a iov_iter_extract_bvecs helper from bio code
  block: open code bio_add_page and fix handling of mismatching P2P ranges
  block: refactor get_contig_folio_len
  block: add a BIO_MAX_SIZE constant and use it
* for-7.0/block:
  block: Replace snprintf with strscpy in check_partition
* block-6.19:
  nvme-pci: DMA unmap the correct regions in nvme_free_sgls
  nvmet: fix race in nvmet_bio_done() leading to NULL pointer dereference
* block-6.19:
  bcache: fix I/O accounting leak in detached_dev_do_request
  bcache: remove dead code in detached_dev_do_request
@blktests-ci
Copy link
Author

blktests-ci bot commented Jan 29, 2026

Upstream branch: 4ded82c
series: https://patchwork.kernel.org/project/linux-block/list/?series=1048345
version: 1

@blktests-ci
Copy link
Author

blktests-ci bot commented Jan 29, 2026

Upstream branch: 4ded82c
series: https://patchwork.kernel.org/project/linux-block/list/?series=1048345
version: 1

@blktests-ci blktests-ci bot force-pushed the series/1048345=>for-next branch from eb8f589 to 7f19129 Compare January 29, 2026 04:52
@blktests-ci
Copy link
Author

blktests-ci bot commented Jan 29, 2026

Upstream branch: 1171e38
series: https://patchwork.kernel.org/project/linux-block/list/?series=1048345
version: 1

@blktests-ci blktests-ci bot force-pushed the series/1048345=>for-next branch from 7f19129 to 7dd6050 Compare January 29, 2026 09:13
* for-7.0/block:
  ublk: document IO reference counting design
@blktests-ci
Copy link
Author

blktests-ci bot commented Jan 29, 2026

Upstream branch: 1171e38
series: https://patchwork.kernel.org/project/linux-block/list/?series=1048606
version: 2

@blktests-ci blktests-ci bot added V2 and removed V1 labels Jan 29, 2026
@blktests-ci blktests-ci bot force-pushed the series/1048345=>for-next branch from 7dd6050 to 9743852 Compare January 29, 2026 16:26
axboe and others added 2 commits January 29, 2026 13:17
* for-7.0/block:
  block: introduce blk_queue_rot()
  block: cleanup queue limit features definition
Ming Lei and others added 9 commits January 30, 2026 05:22
Add !list_empty(&fcmd->node) check in ublk_batch_cancel_cmd() to ensure
the fcmd hasn't already been removed from the list. Once an fcmd is
removed from the list, it's considered claimed by whoever removed it
and will be freed by that path.

Meantime switch to list_del_init() for deleting it from list.

Signed-off-by: Ming Lei <[email protected]>
Add a new feature flag UBLK_F_NO_AUTO_PART_SCAN to allow users to suppress
automatic partition scanning when starting a ublk device.

This is useful for some cases in which user don't want to scan
partitions.

Users still can manually trigger partition scanning later when appropriate
using standard tools (e.g., partprobe, blockdev --rereadpt).

Reported-by: Yoav Cohen <[email protected]>
Link: https://lore.kernel.org/linux-block/DM4PR12MB63280C5637917C071C2F0D65A9A8A@DM4PR12MB6328.namprd12.prod.outlook.com/
Signed-off-by: Ming Lei <[email protected]>
Add automatic TID derivation in test_common.sh based on the script
filename. The TID is extracted by stripping the "test_" prefix and
".sh" suffix from the script name (e.g., test_loop_01.sh -> loop_01).

This removes the need for each test script to manually define TID,
reducing boilerplate and preventing potential mismatches between
the script name and TID. Scripts can still override TID after
sourcing test_common.sh if needed.

Reviewed-by: Caleb Sander Mateos <[email protected]>
Signed-off-by: Ming Lei <[email protected]>
Add test_part_01.sh to test the UBLK_F_NO_AUTO_PART_SCAN feature
flag which allows suppressing automatic partition scanning during
device startup while still allowing manual partition probing.

The test verifies:
- Normal behavior: partitions are auto-detected without the flag
- With flag: partitions are not auto-detected during START_DEV
- Manual scan: blockdev --rereadpt works with the flag

Also update kublk tool to support --no_auto_part_scan option and
recognize the feature flag.

Signed-off-by: Ming Lei <[email protected]>
This test exercises partition scanning behavior, so move it to
the test_part_* group for consistency.

Signed-off-by: Ming Lei <[email protected]>
Encapsulate each test case in its own function that creates the
device, runs checks, and deletes only that device. This avoids
calling _cleanup_test multiple times.

Signed-off-by: Ming Lei <[email protected]>
The null target doesn't handle IO, so disable partition scan to avoid IO
failures caused by integrity verification during the kernel's partition
table read.

Signed-off-by: Ming Lei <[email protected]>
Log test start and end time in dmesg, so generated log messages
during the test run can be linked to specific test from the test
suite.

Signed-off-by: Alexander Atanasov <[email protected]>
(switch to `date +%F %T`)
Signed-off-by: Ming Lei <[email protected]>
Create and use a temporary directory for the files created during
test runs. If TMPDIR environment variable is set use it as a base
for the temporary directory path.
TMPDIR=/mnt/scratch make run_tests
and
TMPDIR=/mnt/scratch ./test_generic_01.sh
will place test directory under /mnt/scratch

Signed-off-by: Alexander Atanasov <[email protected]>
@blktests-ci
Copy link
Author

blktests-ci bot commented Jan 29, 2026

Upstream branch: d4b7351
series: https://patchwork.kernel.org/project/linux-block/list/?series=1048606
version: 2

@blktests-ci blktests-ci bot force-pushed the series/1048345=>for-next branch from 9743852 to 6df89e5 Compare January 29, 2026 20:22
@blktests-ci blktests-ci bot force-pushed the for-next_base branch 5 times, most recently from 485086f to 30053cb Compare February 8, 2026 02:55
@blktests-ci
Copy link
Author

blktests-ci bot commented Feb 8, 2026

Upstream branch: 8160585
series: https://patchwork.kernel.org/project/linux-block/list/?series=1048606
version: 2

Pull request is NOT updated. Failed to apply https://patchwork.kernel.org/project/linux-block/list/?series=1048606
error message:

Cmd('git') failed due to: exit code(128)
  cmdline: git am --3way
  stdout: 'Applying: ublk: check list membership before cancelling batch fetch command
Using index info to reconstruct a base tree...
M	drivers/block/ublk_drv.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/block/ublk_drv.c
No changes -- Patch already applied.
Applying: ublk: add UBLK_F_NO_AUTO_PART_SCAN feature flag
Using index info to reconstruct a base tree...
M	drivers/block/ublk_drv.c
M	include/uapi/linux/ublk_cmd.h
Falling back to patching base and 3-way merge...
Auto-merging drivers/block/ublk_drv.c
No changes -- Patch already applied.
Applying: selftests: ublk: derive TID automatically from script name
Using index info to reconstruct a base tree...
M	tools/testing/selftests/ublk/test_batch_01.sh
M	tools/testing/selftests/ublk/test_batch_02.sh
M	tools/testing/selftests/ublk/test_batch_03.sh
M	tools/testing/selftests/ublk/test_common.sh
A	tools/testing/selftests/ublk/test_generic_01.sh
M	tools/testing/selftests/ublk/test_generic_02.sh
M	tools/testing/selftests/ublk/test_generic_03.sh
A	tools/testing/selftests/ublk/test_generic_04.sh
A	tools/testing/selftests/ublk/test_generic_05.sh
M	tools/testing/selftests/ublk/test_generic_06.sh
M	tools/testing/selftests/ublk/test_generic_07.sh
M	tools/testing/selftests/ublk/test_generic_08.sh
M	tools/testing/selftests/ublk/test_generic_09.sh
M	tools/testing/selftests/ublk/test_generic_10.sh
A	tools/testing/selftests/ublk/test_generic_11.sh
M	tools/testing/selftests/ublk/test_generic_12.sh
M	tools/testing/selftests/ublk/test_generic_13.sh
A	tools/testing/selftests/ublk/test_generic_14.sh
A	tools/testing/selftests/ublk/test_generic_15.sh
M	tools/testing/selftests/ublk/test_generic_16.sh
M	tools/testing/selftests/ublk/test_loop_01.sh
M	tools/testing/selftests/ublk/test_loop_02.sh
M	tools/testing/selftests/ublk/test_loop_03.sh
M	tools/testing/selftests/ublk/test_loop_04.sh
M	tools/testing/selftests/ublk/test_loop_05.sh
M	tools/testing/selftests/ublk/test_loop_06.sh
M	tools/testing/selftests/ublk/test_loop_07.sh
A	tools/testing/selftests/ublk/test_loop_08.sh
M	tools/testing/selftests/ublk/test_null_01.sh
M	tools/testing/selftests/ublk/test_null_02.sh
M	tools/testing/selftests/ublk/test_null_03.sh
A	tools/testing/selftests/ublk/test_null_04.sh
M	tools/testing/selftests/ublk/test_stress_01.sh
M	tools/testing/selftests/ublk/test_stress_02.sh
M	tools/testing/selftests/ublk/test_stress_03.sh
M	tools/testing/selftests/ublk/test_stress_04.sh
M	tools/testing/selftests/ublk/test_stress_05.sh
M	tools/testing/selftests/ublk/test_stress_06.sh
M	tools/testing/selftests/ublk/test_stress_07.sh
M	tools/testing/selftests/ublk/test_stress_08.sh
M	tools/testing/selftests/ublk/test_stress_09.sh
M	tools/testing/selftests/ublk/test_stripe_01.sh
M	tools/testing/selftests/ublk/test_stripe_02.sh
M	tools/testing/selftests/ublk/test_stripe_03.sh
M	tools/testing/selftests/ublk/test_stripe_04.sh
M	tools/testing/selftests/ublk/test_stripe_05.sh
M	tools/testing/selftests/ublk/test_stripe_06.sh
Falling back to patching base and 3-way merge...
Auto-merging tools/testing/selftests/ublk/test_recover_04.sh
Auto-merging tools/testing/selftests/ublk/test_recover_03.sh
Auto-merging tools/testing/selftests/ublk/test_recover_02.sh
Auto-merging tools/testing/selftests/ublk/test_recover_01.sh
Auto-merging tools/testing/selftests/ublk/test_part_02.sh
CONFLICT (modify/delete): tools/testing/selftests/ublk/test_null_04.sh deleted in HEAD and modified in selftests: ublk: derive TID automatically from script name. Version selftests: ublk: derive TID automatically from script name of tools/testing/selftests/ublk/test_null_04.sh left in tree.
CONFLICT (modify/delete): tools/testing/selftests/ublk/test_loop_08.sh deleted in HEAD and modified in selftests: ublk: derive TID automatically from script name. Version selftests: ublk: derive TID automatically from script name of tools/testing/selftests/ublk/test_loop_08.sh left in tree.
Auto-merging tools/testing/selftests/ublk/test_generic_16.sh
Auto-merging tools/testing/selftests/ublk/test_generic_02.sh
CONFLICT (modify/delete): tools/testing/selftests/ublk/test_generic_01.sh deleted in HEAD and modified in selftests: ublk: derive TID automatically from script name. Version selftests: ublk: derive TID automatically from script name of tools/testing/selftests/ublk/test_generic_01.sh left in tree.
Auto-merging tools/testing/selftests/ublk/test_common.sh
Patch failed at 0003 selftests: ublk: derive TID automatically from script name'
  stderr: 'error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"'

conflict:

* Unmerged path tools/testing/selftests/ublk/test_generic_01.sh
* Unmerged path tools/testing/selftests/ublk/test_loop_08.sh
* Unmerged path tools/testing/selftests/ublk/test_null_04.sh

@blktests-ci blktests-ci bot force-pushed the for-next_base branch 2 times, most recently from 1e4b86e to 6fe22ad Compare February 12, 2026 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants