[PATCH 12/14] Early reshape backup verification

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

 



Ever reshape needs to backup its critical section. For this purposes
backup file or external metadata mechanisms can be used.

Add verification if backup file or metadata mechanisms can have chance
to restore data form backup.
For native metadata existence of passed (from command line) backup file
is checked. For external metadta manage_reshape() and recover_backup()
are tested for this purposes.

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

 Grow.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/Grow.c b/Grow.c
index fa22382..d54b8a8 100644
--- a/Grow.c
+++ b/Grow.c
@@ -3667,6 +3667,18 @@ int Grow_continue_command(char *devname, int fd,
 			devname);
 		return 1;
 	}
+
+	/* request backup file
+	 * when no metadta specific backup action is defined
+	 */
+	if ((backup_file == NULL) &&
+	    ((st->ss->manage_reshape == NULL) ||
+	     (st->ss->recover_backup == NULL))) {
+		fprintf(stderr, Name ": Please provide backup file "
+			"for reshape continuation.\n");
+		return 1;
+	}
+
 	dprintf("Grow continue is run for ");
 	if (st->ss->external == 0) {
 		dprintf("native array (%s)\n", devname);

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