[PATCH 11/14] Add possibility to restart reshape for native metadata

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

 



When mdadm services native metadata, check-pointing functions
can lost file system context in the same way as for external metadata.

This patch adds native metadata continuation support.

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

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

diff --git a/Grow.c b/Grow.c
index da8b72d..fa22382 100644
--- a/Grow.c
+++ b/Grow.c
@@ -3646,6 +3646,7 @@ int Grow_continue_command(char *devname, int fd,
 	int ret_val = 0;
 	struct supertype *st = NULL;
 	struct mdinfo *content = NULL;
+	struct mdinfo array;
 	char *subarray = NULL;
 	struct mdinfo *cc = NULL;
 	struct mdstat_ent *mdstat = NULL;
@@ -3669,12 +3670,14 @@ int Grow_continue_command(char *devname, int fd,
 	dprintf("Grow continue is run for ");
 	if (st->ss->external == 0) {
 		dprintf("native array (%s)\n", devname);
-		/* FIXME : temporary just exit
-		 * for native metadata case
-		 */
-		st->ss->free_super(st);
-		free(subarray);
-		exit(0);
+		if (ioctl(fd, GET_ARRAY_INFO, &array) < 0) {
+			fprintf(stderr, Name ": %s is not an active md array -"
+				" aborting\n", devname);
+			ret_val = 1;
+			goto Grow_continue_command_exit;
+		}
+		content = &array;
+		sysfs_init(content, fd, st->devnum);
 	} else {
 		int container_dev;
 

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