aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/xts.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2010-09-08 18:07:00 +0200
committerJens Axboe <jaxboe@fusionio.com>2010-09-10 12:35:38 +0200
commit6a8736d10cb413be95ea443ba40f25c93f4ef9b2 (patch)
tree0b0bb541cfe73fbbd25a1b39585a97fa923270d0 /crypto/xts.c
parent29e4013de7ad950280e4b220894986866697d419 (diff)
downloadkernel_samsung_smdk4412-6a8736d10cb413be95ea443ba40f25c93f4ef9b2.zip
kernel_samsung_smdk4412-6a8736d10cb413be95ea443ba40f25c93f4ef9b2.tar.gz
kernel_samsung_smdk4412-6a8736d10cb413be95ea443ba40f25c93f4ef9b2.tar.bz2
dm: relax ordering of bio-based flush implementation
Unlike REQ_HARDBARRIER, REQ_FLUSH/FUA doesn't mandate any ordering against other bio's. This patch relaxes ordering around flushes. * A flush bio is no longer deferred to workqueue directly. It's processed like other bio's but __split_and_process_bio() uses md->flush_bio as the clone source. md->flush_bio is initialized to empty flush during md initialization and shared for all flushes. * As a flush bio now travels through the same execution path as other bio's, there's no need for dedicated error handling path either. It can use the same error handling path in dec_pending(). Dedicated error handling removed along with md->flush_error. * When dec_pending() detects that a flush has completed, it checks whether the original bio has data. If so, the bio is queued to the deferred list w/ REQ_FLUSH cleared; otherwise, it's completed. * As flush sequencing is handled in the usual issue/completion path, dm_wq_work() no longer needs to handle flushes differently. Now its only responsibility is re-issuing deferred bio's the same way as _dm_request() would. REQ_FLUSH handling logic including process_flush() is dropped. * There's no reason for queue_io() and dm_wq_work() write lock dm->io_lock. queue_io() now only uses md->deferred_lock and dm_wq_work() read locks dm->io_lock. * bio's no longer need to be queued on the deferred list while a flush is in progress making DMF_QUEUE_IO_TO_THREAD unncessary. Drop it. This avoids stalling the device during flushes and simplifies the implementation. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'crypto/xts.c')
0 files changed, 0 insertions, 0 deletions