aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strncpy-src.c
diff options
context:
space:
mode:
authorMing Lei <[email protected]>2024-06-20 11:06:31 +0800
committerJens Axboe <[email protected]>2024-06-28 10:31:34 -0600
commit0676c434a99be42f3bacca4adfd27df65edbf903 (patch)
tree2a17e8190ca8331e70c332abf7d1ba972ea1b876 /lib/test_fortify/write_overflow-strncpy-src.c
parentaa6ff4eb7c10d9a6532db3ea9e78124bf14e70ae (diff)
block: check bio alignment in blk_mq_submit_bio
IO logical block size is one fundamental queue limit, and every IO has to be aligned with logical block size because our bio split can't deal with unaligned bio. The check has to be done with queue usage counter grabbed because device reconfiguration may change logical block size, and we can prevent the reconfiguration from happening by holding queue usage counter. logical_block_size stays in the 1st cache line of queue_limits, and this cache line is always fetched in fast path via bio_may_exceed_limits(), so IO perf won't be affected by this check. Cc: Yi Zhang <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Ye Bin <[email protected]> Cc: [email protected] Signed-off-by: Ming Lei <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions