]> git.baikalelectronics.ru Git - kernel.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)
commitdc83fcb88b4cfa84ee27dc37fc73b54221fb9f9e
treec64473286e7bba7634ad461c6f283d3e497e8dde
parent52b603c81c258b0e108a3314bf0c96215d0ef4e5
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