[PATCH 2/5] FIX: Pass container name to reshape array for external meta data

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

 



When calling reshape_array() for external metadata 'container name'
parameter have to be passed.
Find and pass container name in external metadata case.

Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx>
---

 Grow.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/Grow.c b/Grow.c
index e4fa196..cb52cc5 100644
--- a/Grow.c
+++ b/Grow.c
@@ -3323,10 +3323,18 @@ int Grow_restart(struct supertype *st, struct mdinfo *info, int *fdlist, int cnt
 int Grow_continue(int mdfd, struct supertype *st, struct mdinfo *info,
 		  char *backup_file)
 {
+	char buf[40];
+	char *container = NULL;
 	int err = sysfs_set_str(info, NULL, "array_state", "readonly");
 	if (err)
 		return err;
-	return reshape_array(NULL, mdfd, "array", st, info, 1, backup_file, 0, 0, 1);
+
+	if (st->ss->external) {
+		fmt_devname(buf, st->container_dev);
+		container = buf;
+	}
+	return reshape_array(container, mdfd, "array", st, info, 1,
+			     backup_file, 0, 0, 1);
 }
 
 

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