dm: refactor request based completion functions
authorKiyoshi Ueda <k-ueda@ct.jp.nec.com>
Thu, 10 Dec 2009 23:52:17 +0000 (23:52 +0000)
committerAlasdair G Kergon <agk@redhat.com>
Thu, 10 Dec 2009 23:52:17 +0000 (23:52 +0000)
commit11a68244e16b0c35e122dd55b4e7c595e0fb67a1
treeac982eb9abf6eca76ae35a9e0900323b54bb3ab9
parentb4324feeae304ae39e631a254d238a7d63be004b
dm: refactor request based completion functions

This patch factors out the clone completion code, dm_done(),
from dm_softirq_done() in preparation for a subsequent patch.
No functional change.

dm_done() will be used in barrier completion, which can't use and
doesn't need softirq.  The softirq_done callback needs to get a clone
from an original request but it can't in the case of barrier, where
an original request is shared by multiple clones.  On the other hand,
the completion of barrier clones doesn't involve re-submitting requests,
which was the primary reason of the need for softirq.

Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm.c