diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2025-02-14 11:40:59 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2025-02-14 11:40:59 -0800 |
commit | 1b8c8cdad1749d68130147f187008a368d564933 (patch) | |
tree | 2607026dfd9039f59cae273a2dbdb8f04e4477d1 /include/linux | |
parent | ea717324741471665110b4475a52c08a56026a9e (diff) | |
parent | 80e648042e512d5a767da251d44132553fe04ae0 (diff) |
Merge tag 'block-6.14-20250214' of git://git.kernel.dk/linux
Pull block fixes from Jens Axboe:
- Fix for request rejection for batch addition
- Fix a few issues for bogus mac partition tables
* tag 'block-6.14-20250214' of git://git.kernel.dk/linux:
partitions: mac: fix handling of bogus partition table
block: cleanup and fix batch completion adding conditions
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/blk-mq.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index 9ebb53f031cd..fa2a76cc2f73 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h @@ -861,12 +861,22 @@ static inline bool blk_mq_add_to_batch(struct request *req, void (*complete)(struct io_comp_batch *)) { /* - * blk_mq_end_request_batch() can't end request allocated from - * sched tags + * Check various conditions that exclude batch processing: + * 1) No batch container + * 2) Has scheduler data attached + * 3) Not a passthrough request and end_io set + * 4) Not a passthrough request and an ioerror */ - if (!iob || (req->rq_flags & RQF_SCHED_TAGS) || ioerror || - (req->end_io && !blk_rq_is_passthrough(req))) + if (!iob) return false; + if (req->rq_flags & RQF_SCHED_TAGS) + return false; + if (!blk_rq_is_passthrough(req)) { + if (req->end_io) + return false; + if (ioerror < 0) + return false; + } if (!iob->complete) iob->complete = complete; |