block: optimise blk_may_split for normal rw
authorPavel Begunkov <asml.silence@gmail.com>
Sun, 27 Mar 2022 21:14:07 +0000 (15:14 -0600)
committerJens Axboe <axboe@kernel.dk>
Sun, 27 Mar 2022 21:14:07 +0000 (15:14 -0600)
commite95cc7ac24cddafc9ee45beb56928faa2936ce08
tree92f973e11ce89902cc95536228aff34336387e6a
parent88b3be5c6391a5b4be1dcdc4bb8dca8438105438
block: optimise blk_may_split for normal rw

Read/write/flush are the most common operations, optimise switch in
blk_may_split() for these cases. All three added conditions are compiled
into a single comparison as the corresponding REQ_OP_* take 0-2.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/9ded7cf6a3af7e6e577d12a835a385657da4a69e.1634676157.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk.h