ioengines: have ioengines with commit do own io accounting for trims
authorVincent Fu <vincent.fu@wdc.com>
Wed, 25 Jul 2018 19:37:06 +0000 (12:37 -0700)
committerVincent Fu <vincent.fu@wdc.com>
Thu, 26 Jul 2018 15:10:37 +0000 (08:10 -0700)
commitc0681c9d734a4d25162d1868cc3c61e9d5978c0a
treead8e9119beb6a30f2f699d356749730bd7f2c5fb
parentcfe1ed39102ad9711728a86eeec69c4206745036
ioengines: have ioengines with commit do own io accounting for trims

ioengines.c:td_io_queue has a special case where it calls
io_u_mark_submit() and io_u_mark_complete() when the io_u
is a trim operation or when the ioengine does not have a
commit function. This patch makes these two calls the
responsibility of the ioengine for trim io_u's when the
ioengine does have a commit function.

This only applies to libaio because it is the only ioengine
supporting trims with a commit function. All other ioengines that
support trim operations do not have a commit function. These
ioengines are: falloc, glusterfs_async, mmap, mtd, posixaio,
rados, rbd, splice, sync, psync, pvsync, pvsync2.
engines/libaio.c
ioengines.c