• Mike Snitzer's avatar
    dm thin: remove __bio_inc_remaining() and switch to using bio_inc_remaining() · 13e4f8a6
    Mike Snitzer authored
    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: default avatarMike Snitzer <snitzer@redhat.com>
    Acked-by: default avatarJoe Thornber <ejt@redhat.com>
dm-thin.c 107 KB