]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
dm thin: remove __bio_inc_remaining() and switch to using bio_inc_remaining()
authorMike Snitzer <snitzer@redhat.com>
Wed, 4 May 2016 19:05:44 +0000 (15:05 -0400)
committerMike Snitzer <snitzer@redhat.com>
Fri, 13 May 2016 13:03:52 +0000 (09:03 -0400)
commit13e4f8a695aa1dc7c94525047fc2ffb9abc8125e
treec64473286e7bba7634ad461c6f283d3e497e8dde
parent4c9971ca6a172e70f52a7f9b6796e843c3f70293
dm thin: remove __bio_inc_remaining() and switch to using bio_inc_remaining()

DM thinp's use of bio_inc_remaining() is critical to ensure the original
parent discard bio isn't completed before sub-discards have.  DM thinp
needs this due to the extra quiescing that occurs, via multiple DM thinp
mappings, while processing large discards.  As such DM thinp must build
the async discard bio chain after some delay -- so bio_inc_remaining()
is used to enable DM thinp to take a reference on the original parent
discard bio for each mapping.  This allows the immediate use of
bio_endio() on that discard bio; but with the understanding that the
actual completion won't occur until each of the sub-discards'
per-mapping references are dropped.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Acked-by: Joe Thornber <ejt@redhat.com>
drivers/md/dm-thin.c