ioengines: add helper for trims with async ioengines
authorVincent Fu <vincent.fu@samsung.com>
Tue, 14 Jun 2022 15:58:29 +0000 (15:58 +0000)
committerJens Axboe <axboe@kernel.dk>
Wed, 15 Jun 2022 21:30:05 +0000 (15:30 -0600)
commitd46b4565dfdaddbfdd91976a57b2564aa7a52f62
tree906859d25bbee528f05716f822ab2170d24dc54f
parentb5f3adf9e1e40c7bdb76a9e433aa580f7eead740
ioengines: add helper for trims with async ioengines

Async ioengines support trim commands but trims are synchronous
operations. We need to provide special handling when measuring latency
for these commands. Create a helper function to help us identify when an
async ioengine is issuing a sync trim command. This makes the code more
readable.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Link: https://lore.kernel.org/r/20220614155822.307771-2-vincent.fu@samsung.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
ioengines.c