Unverified Commit 8536c35b authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!1380 [sync] PR-1351: dm thin: fix deadlock when swapping to thin device

parents 3c4533bd f0727f67
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -3379,6 +3379,7 @@ static int pool_ctr(struct dm_target *ti, unsigned argc, char **argv)
	pt->low_water_blocks = low_water_blocks;
	pt->adjusted_pf = pt->requested_pf = pf;
	ti->num_flush_bios = 1;
	ti->limit_swap_bios = true;

	/*
	 * Only need to enable discards if the pool should pass
@@ -4256,6 +4257,7 @@ static int thin_ctr(struct dm_target *ti, unsigned argc, char **argv)
		goto bad;

	ti->num_flush_bios = 1;
	ti->limit_swap_bios = true;
	ti->flush_supported = true;
	ti->per_io_data_size = sizeof(struct dm_thin_endio_hook);