linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: NeilBrown <neilb@suse.de>
Cc: linux-raid@vger.kernel.org
Subject: Re: [PATCH md 004 of 5] Allow a manual resync with md
Date: Tue, 11 Oct 2005 16:56:07 -0700	[thread overview]
Message-ID: <20051011165607.43fc05bf.akpm@osdl.org> (raw)
In-Reply-To: <1051004052347.28827@suse.de>

NeilBrown <neilb@suse.de> wrote:
>
> static ssize_t
> +md_show_scan(mddev_t *mddev, char *page)
> +{
> +	char *type = "none";
> +	if (mddev->recovery &
> +	    ((1<<MD_RECOVERY_RUNNING) || (1<<MD_RECOVERY_NEEDED))) {

Shouldn't this be a bitwise OR?

> +		if (mddev->recovery & (1<<MD_RECOVERY_SYNC)) {
> +			if (!test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery))
> +				type = "resync";
> +			else if (test_bit(MD_RECOVERY_CHECK, &mddev->recovery))
> +				type = "check";
> +			else
> +				type = "repair";
> +		} else
> +			type = "recover";
> +	}
> +	return sprintf(page, "%s\n", type);
> +}
> +
> +static ssize_t
> +md_store_scan(mddev_t *mddev, const char *page, size_t len)
> +{
> +	int canscan=0;
> +	if (mddev->recovery &
> +	    ((1<<MD_RECOVERY_RUNNING) || (1<<MD_RECOVERY_NEEDED)))

And this?

> +		return -EBUSY;

  reply	other threads:[~2005-10-11 23:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-04  5:23 [PATCH md 000 of 5] Introduction NeilBrown
2005-10-04  5:23 ` [PATCH md 001 of 5] Initial sysfs support for md NeilBrown
2005-10-04  5:23 ` [PATCH md 002 of 5] Extend md sysfs support to component devices NeilBrown
2005-10-11 23:51   ` Andrew Morton
2005-10-04  5:23 ` [PATCH md 003 of 5] Add kobject/sysfs support to raid5 NeilBrown
2005-10-11 23:54   ` Andrew Morton
2005-10-13  5:24     ` Neil Brown
2005-10-04  5:23 ` [PATCH md 004 of 5] Allow a manual resync with md NeilBrown
2005-10-11 23:56   ` Andrew Morton [this message]
2005-10-13  5:18     ` Neil Brown
2005-10-11 23:57   ` Andrew Morton
2005-10-04  5:23 ` [PATCH md 005 of 5] Teach raid5 the difference between 'check' and 'repair' 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=20051011165607.43fc05bf.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    /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).