From dfd4d8ee426fb71a369f494f95fe95b114a33c7c Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Tue, 9 Aug 2005 04:25:47 +0000 Subject: Add write-behind support Currently this includes --write-behind to set level of write-behind supported --write-mostly to flag devices as write-mostly. Signed-off-by: Neil Brown --- Build.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Build.c') diff --git a/Build.c b/Build.c index 5537b46d..6489d845 100644 --- a/Build.c +++ b/Build.c @@ -36,7 +36,7 @@ int Build(char *mddev, int mdfd, int chunk, int level, int layout, int raiddisks, mddev_dev_t devlist, int assume_clean, - char *bitmap_file, int bitmap_chunk, int delay) + char *bitmap_file, int bitmap_chunk, int write_behind, int delay) { /* Build a linear or raid0 arrays without superblocks * We cannot really do any checks, we just do it. @@ -164,7 +164,9 @@ int Build(char *mddev, int mdfd, int chunk, int level, int layout, mdu_disk_info_t disk; disk.number = i; disk.raid_disk = i; - disk.state = 6; + disk.state = (1<writemostly) + disk.state |= 1<