[PATCH] fix mirror device creation with lvcreate failed

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

 



 On some devices, when create mirror device with lvcreate, it fails.
 device-mapper: reload ioctl on  failed: Invalid argument
 Failed to activate new LV.

 We can use read size 4096 since md always use 4096.

Signed-off-by: Liuhua Wang <lwang@xxxxxxxx>
---
 drivers/md/dm-raid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c
index 4880b69..621afbb 100644
--- a/drivers/md/dm-raid.c
+++ b/drivers/md/dm-raid.c
@@ -860,7 +860,7 @@ static int super_load(struct md_rdev *rdev, struct md_rdev *refdev)
 	rdev->sb_start = 0;
 	rdev->sb_size = sizeof(*sb);
 
-	ret = read_disk_sb(rdev, rdev->sb_size);
+	ret = read_disk_sb(rdev, 4096);
 	if (ret)
 		return ret;
 
-- 
1.9.0

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux