Re: [PATCH 001 of 3] md: Don't clear bits in bitmap when writing to one device fails during recovery.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



NeilBrown <[email protected]> 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?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux