block: optimise blk_may_split for normal rw
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 12 Dec 2022 23:35:54 +0000 (16:35 -0700)
committerJens Axboe <axboe@kernel.dk>
Sun, 18 Dec 2022 18:19:23 +0000 (11:19 -0700)
commit5ee31aca6d4f59b7506d994723b072e5fffcdcd9
tree9ea24c551fa0ca79964f7baee01436dc1996a36a
parentf9ff5644bcc04221bae56f922122f2b7f5d24d62
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