X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmd%2Fmd.c;h=b12b3776c0c0c8ca46b998cac6df78845363f7ee;hb=8f3dda75cb942acc049adb2c95a6e5f4c3a8a410;hp=06ecea751a39b8ec53935bcdfb331453d2e01b19;hpb=1dfd7b494b3d8fb1e8a7383a8095f77eb058cd83;p=pandora-kernel.git diff --git a/drivers/md/md.c b/drivers/md/md.c index 06ecea751a39..b12b3776c0c0 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -1777,12 +1777,6 @@ int md_integrity_register(mddev_t *mddev) continue; if (rdev->raid_disk < 0) continue; - /* - * If at least one rdev is not integrity capable, we can not - * enable data integrity for the md device. - */ - if (!bdev_get_integrity(rdev->bdev)) - return -EINVAL; if (!reference) { /* Use the first rdev as the reference */ reference = rdev; @@ -1793,6 +1787,8 @@ int md_integrity_register(mddev_t *mddev) rdev->bdev->bd_disk) < 0) return -EINVAL; } + if (!reference || !bdev_get_integrity(reference->bdev)) + return 0; /* * All component devices are integrity capable and have matching * profiles, register the common profile for the md device. @@ -6270,7 +6266,7 @@ static void status_resync(struct seq_file *seq, mddev_t * mddev) * rt is a sector_t, so could be 32bit or 64bit. * So we divide before multiply in case it is 32bit and close * to the limit. - * We scale the divisor (db) by 32 to avoid loosing precision + * We scale the divisor (db) by 32 to avoid losing precision * near the end of resync when the number of remaining sectors * is close to 'db'. * We then divide rt by 32 after multiplying by db to compensate.