dm: fix clone_bio() to trigger blk_recount_segments()
authorMike Snitzer <snitzer@redhat.com>
Wed, 16 Jan 2019 23:53:26 +0000 (18:53 -0500)
committerMike Snitzer <snitzer@redhat.com>
Mon, 21 Jan 2019 16:29:18 +0000 (11:29 -0500)
commit57c36519e4b949f89381053f7283f5d605595b42
treee2422cb8eae102acf99b4a0460e716bb6bcf002e
parentd445bd9cec1a850c2100fcf53684c13b3fd934f2
dm: fix clone_bio() to trigger blk_recount_segments()

DM's clone_bio() now benefits from using bio_trim() by fixing the fact
that clone_bio() wasn't clearing BIO_SEG_VALID like bio_trim() does;
which triggers blk_recount_segments() via bio_phys_segments().

Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm.c