Re: mdadm 2.6.x regression, fails creation of raid1 w/ v1.0 sb and internal bitmap

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

 



On Monday October 22, snitzer@xxxxxxxxx wrote:
> 
> Hey Neil,
> 
> Your fix works for me too.  However, I'm wondering why you held back
> on fixing the same issue in the "bitmap runs into data" comparison
> that follows:

It isn't really needed here.  In this case bitmap->offset is positive,
so all the numbers are positive, so it doesn't matter if the
comparison is signed or not.

Thanks for mentioning it though.

NeilBrown


> 
> --- ./drivers/md/bitmap.c 2007-10-19 19:11:58.000000000 -0400
> +++ ./drivers/md/bitmap.c 2007-10-22 09:53:41.000000000 -0400
> @@ -286,7 +286,7 @@
>                                 /* METADATA BITMAP DATA */
>                                 if (rdev->sb_offset*2
>                                     + bitmap->offset
> -                                   + page->index*(PAGE_SIZE/512) + size/512
> +                                   +
> (long)(page->index*(PAGE_SIZE/512)) + size/512
>                                     > rdev->data_offset)
>                                         /* bitmap runs in to data */
>                                         return -EINVAL;
> 
> Thanks,
> Mike
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux