On 2012-03-14 09:32 NeilBrown <neilb@xxxxxxx> Wrote: >On Thu, 8 Mar 2012 14:46:52 +0800 "majianpeng" <majianpeng@xxxxxxxxx> wrote: > >> >From 58d2ba381eee4b732fca99a7311b1dcf589f57c3 Mon Sep 17 00:00:00 2001 >> From: majianpeng <majianpeng@xxxxxxxxx> >> Date: Thu, 8 Mar 2012 14:37:00 +0800 >> Subject: [PATCH] md:Fix a bug in function badblocks_show(). >> >> If unack==0, it will show all bad blocks include unacknowledged-bad-blocks. > >Correct. It is meant to. >The "bad_blocks" file shows all bad blocks. >The "unacknowledged_bad_blocks" file show all unacknowledged bad blocks. > >Thanks, >NeilBrown > > >> >> Signed-off-by: majianpeng <majianpeng@xxxxxxxxx> >> --- >> drivers/md/md.c | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/drivers/md/md.c b/drivers/md/md.c >> index ce88755..3f1b6e5 100644 >> --- a/drivers/md/md.c >> +++ b/drivers/md/md.c >> @@ -8091,7 +8091,7 @@ retry: >> int ack = BB_ACK(p[i]); >> i++; >> >> - if (unack && ack) >> + if ((unack ^ ack) == 0) >> continue; >> >> len += snprintf(page+len, PAGE_SIZE-len, "%llu %u\n", > > Hi Neil: I found this bug in kernel-3.5-rc2.I deem you may lost to apply this patch. Thanks!?韬{.n?????%??檩??w?{.n???{炳盯w???塄}?财??j:+v??????2??璀??摺?囤??z夸z罐?+?????w棹f