Re: [PATCH] DM RAID: Ensure the bitmap region_size is a power of 2

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

 



On Tue, Dec 11, 2012 at 03:37:05PM -0600, Jon Brassow wrote:
>  		if (min_region_size > (1 << 13)) {
> +			/* region_size must be a power of 2 */
> +			for (i = 13; min_region_size > (1 << i); i++);
> +
> +			region_size = (1 << i);

Can the loop be replaced with a direct bit calculation, perhaps?

Alasdair

--
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