The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: NeilBrown <neilb@suse.de>
Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 001 of 3] md: Don't clear bits in bitmap when writing to one device fails during recovery.
Date: Wed, 29 Mar 2006 22:12:09 -0800	[thread overview]
Message-ID: <20060329221209.20e7fd00.akpm@osdl.org> (raw)
In-Reply-To: <1060330055237.25270@suse.de>

NeilBrown <neilb@suse.de> wrote:
>
> +	if (!uptodate) {
>  +		int sync_blocks = 0;
>  +		sector_t s = r1_bio->sector;
>  +		long sectors_to_go = r1_bio->sectors;
>  +		/* make sure these bits doesn't get cleared. */
>  +		do {
>  +			bitmap_end_sync(mddev->bitmap, r1_bio->sector,
>  +					&sync_blocks, 1);
>  +			s += sync_blocks;
>  +			sectors_to_go -= sync_blocks;
>  +		} while (sectors_to_go > 0);
>   		md_error(mddev, conf->mirrors[mirror].rdev);
>  +	}

Can mddev->bitmap be NULL?

If so, will the above loop do the right thing when this:

void bitmap_end_sync(struct bitmap *bitmap, sector_t offset, int *blocks, int aborted)
{
	bitmap_counter_t *bmc;
	unsigned long flags;
/*
	if (offset == 0) printk("bitmap_end_sync 0 (%d)\n", aborted);
*/	if (bitmap == NULL) {
		*blocks = 1024;
		return;
	}

triggers?

  reply	other threads:[~2006-03-30  6:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-30  5:52 [PATCH 000 of 3] md: Introduction - assorted fixed for 2.6.16 NeilBrown
2006-03-30  5:52 ` [PATCH 001 of 3] md: Don't clear bits in bitmap when writing to one device fails during recovery NeilBrown
2006-03-30  6:12   ` Andrew Morton [this message]
2006-03-30  6:48     ` Neil Brown
2006-03-30  5:52 ` [PATCH 002 of 3] md: Remove some code that can sleep from under a spinlock NeilBrown
2006-03-30  5:52 ` [PATCH 003 of 3] md: Raid-6 did not create sysfs entries for stripe cache 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=20060329221209.20e7fd00.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.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