[PATCH] Assemble: update metadata information after updating

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

 



getinfo_super() is called before updating metadata with update_super().
Some information in content variable is not updated.

Currently there is no problem with it. But I think it could be problematic
at any moment.

Signed-off-by: Gioh Kim <gi-oh.kim@xxxxxxxxxxxxxxxx>
---
 Assemble.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Assemble.c b/Assemble.c
index fc0d464..9fdd4da 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -618,7 +618,6 @@ static int load_devices(struct devs *devices, char *devmap,
 				*stp = st;
 				return -1;
 			}
-			tst->ss->getinfo_super(tst, content, devmap + devcnt * content->array.raid_disks);
 
 			memcpy(content->uuid, ident->uuid, 16);
 			strcpy(content->name, ident->name);
@@ -675,6 +674,8 @@ static int load_devices(struct devs *devices, char *devmap,
 				else
 					bitmap_done = 1;
 			}
+
+			tst->ss->getinfo_super(tst, content, devmap + devcnt * content->array.raid_disks);
 		} else {
 			dfd = dev_open(devname,
 				       tmpdev->disposition == 'I'
-- 
2.14.1




[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