File: 18_pdc_raid10_failure..patch

package info (click to toggle)
dmraid 1.0.0.rc16-12
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 4,512 kB
  • sloc: ansic: 16,997; sh: 2,996; makefile: 265
file content (14 lines) | stat: -rw-r--r-- 453 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
fix pdc metadata format handler to report the proper number of devices in a subset
--- a/1.0.0.rc16/lib/format/ataraid/pdc.c
+++ b/1.0.0.rc16/lib/format/ataraid/pdc.c
@@ -490,7 +490,9 @@ devices(struct raid_dev *rd, void *conte
 	if (context && pdc->raid.type != PDC_T_SPAN)
 		*((uint64_t *) context) += rd->sectors;
 
-	return pdc->raid.total_disks;
+	return is_raid10(pdc) ? 
+		pdc->raid.total_disks / 2 :
+		pdc->raid.total_disks;
 }
 
 static int