All of lore.kernel.org
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: George Duffield <forumscollective@gmail.com>
Cc: "linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>
Subject: Re: Understanding raid array status: Active vs Clean
Date: Sat, 28 Jun 2014 15:29:39 +1000	[thread overview]
Message-ID: <20140628152939.367e4b2d@notabene.brown> (raw)
In-Reply-To: <CAG__1a7T2atsQ1eQMhR1Wp6xd72fNdyf5XX+kbihRbY1Urd0Ww@mail.gmail.com>

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

On Sat, 28 Jun 2014 05:01:00 +0200 George Duffield
<forumscollective@gmail.com> wrote:

> >> > changing the value to 0.500:
> >> > # echo 0.503 > /sys/block/md0/md/safe_mode_delay
> >> >
> >> > makes no difference to the array state.
> >
> > What if you write a smaller number?  e.g. 0.1
> 
> No change to array state.
> 
> > What does /sys/block/md0/md/array_state show?
> 
> Funnily enough, it shows Clean


Ahh - I found it.
In get_array_info() in drivers/md/md.c:

	if (mddev->in_sync)
		info.state = (1<<MD_SB_CLEAN);
	if (mddev->bitmap && mddev->bitmap_info.offset)
		info.state = (1<<MD_SB_BITMAP_PRESENT);


that last line should be "|=".

Because you have a bitmap, the 'clean' state is being hidden.

Though if you have a bitmap, the 'clean' state isn't really important because
the bitmap knows which regions are 'clean' and which are not.

But it should be fixed.  I'll send a patch next week.

Thanks for persisting.

NeilBrown

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

      reply	other threads:[~2014-06-28  5:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-26 20:08 Understanding raid array status: Active vs Clean George Duffield
2014-05-28 18:05 ` George Duffield
2014-05-29  5:16 ` NeilBrown
2014-05-29  5:52   ` forumscollective
2014-05-29  6:06     ` NeilBrown
2014-06-17 14:31       ` George Duffield
2014-06-18 13:25         ` George Duffield
2014-06-18 14:31           ` George Duffield
2014-06-18 15:03           ` Robin Hill
2014-06-18 15:57             ` George Duffield
2014-06-18 16:04               ` George Duffield
2014-06-22 14:32                 ` George Duffield
2014-06-23  2:01                   ` NeilBrown
2014-06-28  3:01                     ` George Duffield
2014-06-28  5:29                       ` NeilBrown [this message]

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=20140628152939.367e4b2d@notabene.brown \
    --to=neilb@suse.de \
    --cc=forumscollective@gmail.com \
    --cc=linux-raid@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.