diff options
| author | 2026-03-31 23:31:53 +0800 | |
|---|---|---|
| committer | 2026-04-07 07:38:36 -0600 | |
| commit | 4d4a512a1f87b156f694d25c800e3d525aa56e8a (patch) | |
| tree | 6bca1b099bb2abdf1cad3541f6ac705a9ce9e076 /include/linux/soc/apple/git:/git.zx2c4.com/ssh:/git@git.zx2c4.com | |
| parent | ublk: add UBLK_U_CMD_REG_BUF/UNREG_BUF control commands (diff) | |
ublk: add PFN-based buffer matching in I/O path
Add ublk_try_buf_match() which walks a request's bio_vecs, looks up
each page's PFN in the per-device maple tree, and verifies all pages
belong to the same registered buffer at contiguous offsets.
Add ublk_iod_is_shmem_zc() inline helper for checking whether a
request uses the shmem zero-copy path.
Integrate into the I/O path:
- ublk_setup_iod(): if pages match a registered buffer, set
UBLK_IO_F_SHMEM_ZC and encode buffer index + offset in addr
- ublk_start_io(): skip ublk_map_io() for zero-copy requests
- __ublk_complete_rq(): skip ublk_unmap_io() for zero-copy requests
The feature remains disabled (ublk_support_shmem_zc() returns false)
until the UBLK_F_SHMEM_ZC flag is enabled in the next patch.
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://patch.msgid.link/20260331153207.3635125-3-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/soc/apple/git:/git.zx2c4.com/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions
