summaryrefslogtreecommitdiffstats
path: root/Detail.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2005-08-09 04:25:47 +0000
committerNeil Brown <neilb@suse.de>2005-08-09 04:25:47 +0000
commitdfd4d8ee426fb71a369f494f95fe95b114a33c7c (patch)
tree616d0864cc8cb08085cb72b6ad5ccc545cd8b6a5 /Detail.c
parent586ed40547a380b9f8bd58aa87c12fbaf6eabf65 (diff)
downloadmdadm-dfd4d8ee426fb71a369f494f95fe95b114a33c7c.tar.gz
mdadm-dfd4d8ee426fb71a369f494f95fe95b114a33c7c.tar.xz
mdadm-dfd4d8ee426fb71a369f494f95fe95b114a33c7c.zip
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 <neilb@cse.unsw.edu.au>
Diffstat (limited to 'Detail.c')
-rw-r--r--Detail.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Detail.c b/Detail.c
index 46b483c..4c93eff 100644
--- a/Detail.c
+++ b/Detail.c
@@ -216,6 +216,8 @@ int Detail(char *dev, int brief, int test)
for (d= 0; d < max_disks; d++) {
mdu_disk_info_t disk;
char *dv;
+ int wonly = disk.state & (1<<MD_DISK_WRITEMOSTLY);
+ disk.state &= ~(1<<MD_DISK_WRITEMOSTLY);
disk.number = d;
if (ioctl(fd, GET_DISK_INFO, &disk) < 0) {
if (d < array.raid_disks)
@@ -244,6 +246,7 @@ int Detail(char *dev, int brief, int test)
if (disk.state & (1<<MD_DISK_ACTIVE)) printf(" active");
if (disk.state & (1<<MD_DISK_SYNC)) printf(" sync");
if (disk.state & (1<<MD_DISK_REMOVED)) printf(" removed");
+ if (wonly) printf(" writeonly");
if (disk.state == 0) printf(" spare");
if (disk.state == 0) {
if (is_26) {