From 254c271da0712ea8914f187588e0f81f7678ee2f Mon Sep 17 00:00:00 2001 From: Xiao Ni Date: Thu, 4 Feb 2021 15:50:47 +0800 Subject: md/raid10: improve discard request for far layout For far layout, the discard region is not continuous on disks. So it needs far copies r10bio to cover all regions. It needs a way to know all r10bios have finish or not. Similar with raid10_sync_request, only the first r10bio master_bio records the discard bio. Other r10bios master_bio record the first r10bio. The first r10bio can finish after other r10bios finish and then return the discard bio. Tested-by: Adrian Huang Signed-off-by: Xiao Ni Signed-off-by: Song Liu --- drivers/md/raid10.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/md/raid10.h') diff --git a/drivers/md/raid10.h b/drivers/md/raid10.h index 79cd2b7d3128..1461fd55311b 100644 --- a/drivers/md/raid10.h +++ b/drivers/md/raid10.h @@ -179,5 +179,6 @@ enum r10bio_state { R10BIO_Previous, /* failfast devices did receive failfast requests. */ R10BIO_FailFast, + R10BIO_Discard, }; #endif -- cgit v1.2.3