summaryrefslogtreecommitdiff
path: root/mdadm.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2012-12-05 12:56:31 +1100
committerNeilBrown <neilb@suse.de>2012-12-05 12:56:31 +1100
commit6d388a88163a8f532513e73dd035892ea8a8ead2 (patch)
treec1ad00cb9ba406ca509654ed9d2883d78c1b5528 /mdadm.c
parent8cf2eb96b2330b1507af2fa55d99f338eeff5ab5 (diff)
MISC: Add --examine-badblocks option
This will list the contents of the bad-blocks log, if one is present. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdadm.c')
-rw-r--r--mdadm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mdadm.c b/mdadm.c
index 11016e7b..26e8ceca 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -232,6 +232,7 @@ int main(int argc, char *argv[])
case 'E':
case 'X':
case 'Q':
+ case ExamineBB:
newmode = MISC;
break;
@@ -971,6 +972,7 @@ int main(int argc, char *argv[])
case O(MISC,'R'):
case O(MISC,'S'):
case O(MISC,'X'):
+ case O(MISC, ExamineBB):
case O(MISC,'o'):
case O(MISC,'w'):
case O(MISC,'W'):
@@ -1750,6 +1752,8 @@ static int misc_list(struct mddev_dev *devlist,
rv |= Query(dv->devname); continue;
case 'X':
rv |= ExamineBitmap(dv->devname, c->brief, ss); continue;
+ case ExamineBB:
+ rv |= ExamineBadblocks(dv->devname, c->brief, ss); continue;
case 'W':
case WaitOpt:
rv |= Wait(dv->devname); continue;