mirror-linux/drivers/target
Ming Lei 5e2fde1a94 block: pass io_comp_batch to rq_end_io_fn callback
Add a third parameter 'const struct io_comp_batch *' to the rq_end_io_fn
callback signature. This allows end_io handlers to access the completion
batch context when requests are completed via blk_mq_end_request_batch().

The io_comp_batch is passed from blk_mq_end_request_batch(), while NULL
is passed from __blk_mq_end_request() and blk_mq_put_rq_ref() which don't
have batch context.

This infrastructure change enables drivers to detect whether they're
being called from a batched completion path (like iopoll) and access
additional context stored in the io_comp_batch.

Update all rq_end_io_fn implementations:
- block/blk-mq.c: blk_end_sync_rq
- block/blk-flush.c: flush_end_io, mq_flush_data_end_io
- drivers/nvme/host/ioctl.c: nvme_uring_cmd_end_io
- drivers/nvme/host/core.c: nvme_keep_alive_end_io
- drivers/nvme/host/pci.c: abort_endio, nvme_del_queue_end, nvme_del_cq_end
- drivers/nvme/target/passthru.c: nvmet_passthru_req_done
- drivers/scsi/scsi_error.c: eh_lock_door_done
- drivers/scsi/sg.c: sg_rq_end_io
- drivers/scsi/st.c: st_scsi_execute_end
- drivers/target/target_core_pscsi.c: pscsi_req_done
- drivers/md/dm-rq.c: end_clone_request

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Kanchan Joshi <joshi.k@samsung.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-01-20 10:12:54 -07:00
..
iscsi net: Convert proto_ops bind() callbacks to use sockaddr_unsized 2025-11-04 19:10:32 -08:00
loopback scsi: target: tcm_loop: Fix segfault in tcm_loop_tpg_address_show() 2025-11-08 12:30:02 -05:00
sbp scsi: target: sbp: Remove KMSG_COMPONENT macro 2025-11-29 15:27:33 -05:00
tcm_fc scsi: target: Add WQ_PERCPU to alloc_workqueue() users 2025-11-12 21:28:27 -05:00
tcm_remote
Kconfig
Makefile
target_core_alua.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
target_core_alua.h
target_core_configfs.c SCSI misc on 20251204 2025-12-05 19:56:50 -08:00
target_core_device.c Merge patch series "target: RW/num_cmds stats improvements" 2025-11-02 22:07:27 -05:00
target_core_fabric_configfs.c scsi: target: Move LUN stats to per-CPU 2025-11-02 22:06:12 -05:00
target_core_fabric_lib.c scsi: target: core: Generate correct identifiers for PR OUT transport IDs 2025-07-24 21:57:00 -04:00
target_core_file.c scsi: target: Rename target_configure_unmap_from_queue() 2025-11-02 21:40:01 -05:00
target_core_file.h
target_core_hba.c
target_core_iblock.c scsi: target: Add atomic support to target_core_iblock 2025-11-02 21:40:02 -05:00
target_core_iblock.h scsi: target: iblock: Allow iblock devices to be shared 2025-07-24 21:39:01 -04:00
target_core_internal.h scsi: target: Move LUN stats to per-CPU 2025-11-02 22:06:12 -05:00
target_core_pr.c SCSI misc on 20250806 2025-08-06 15:44:25 +03:00
target_core_pr.h
target_core_pscsi.c block: pass io_comp_batch to rq_end_io_fn callback 2026-01-20 10:12:54 -07:00
target_core_pscsi.h
target_core_rd.c
target_core_rd.h
target_core_sbc.c scsi: target: Add WRITE_ATOMIC_16 handler 2025-11-02 21:40:02 -05:00
target_core_spc.c scsi: target: Add WRITE_ATOMIC_16 support to RSOC 2025-11-02 21:40:02 -05:00
target_core_stat.c scsi: target: Move LUN stats to per-CPU 2025-11-02 22:06:12 -05:00
target_core_tmr.c
target_core_tpg.c scsi: target: Move LUN stats to per-CPU 2025-11-02 22:06:12 -05:00
target_core_transport.c scsi: target: Reset t_task_cdb pointer in error case 2025-11-29 15:06:12 -05:00
target_core_ua.c
target_core_ua.h
target_core_user.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
target_core_xcopy.c scsi: target: Add WQ_PERCPU to alloc_workqueue() users 2025-11-12 21:28:27 -05:00
target_core_xcopy.h