linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: majianpeng <majianpeng@gmail.com>
Cc: linux-raid <linux-raid@vger.kernel.org>
Subject: Re: md:Fix a bug in function badblocks_show().
Date: Wed, 14 Mar 2012 12:32:45 +1100	[thread overview]
Message-ID: <20120314123245.74feeab8@notabene.brown> (raw)
In-Reply-To: <201203081446488121330@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1057 bytes --]

On Thu, 8 Mar 2012 14:46:52 +0800 "majianpeng" <majianpeng@gmail.com> wrote:

> >From 58d2ba381eee4b732fca99a7311b1dcf589f57c3 Mon Sep 17 00:00:00 2001
> From: majianpeng <majianpeng@gmail.com>
> 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@gmail.com>
> ---
>  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",


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

  reply	other threads:[~2012-03-14  1:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-08  6:46 md:Fix a bug in function badblocks_show() majianpeng
2012-03-14  1:32 ` NeilBrown [this message]
2012-06-12  9:04   ` kedacomkernel
2012-06-27  3:01     ` NeilBrown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120314123245.74feeab8@notabene.brown \
    --to=neilb@suse.de \
    --cc=linux-raid@vger.kernel.org \
    --cc=majianpeng@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).