[PATCH 05/10] mdadm: add backup methods to superswitch

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

 



From: Maciej Trela <maciej.trela@xxxxxxxxx>

Add new methods to the superswitch for external metadata supporting
its own critical reshape data backup mechanism.

The new methods are:
save_backup - save critical data to backup area
discard_backup - critical data was successfully migrated, so
	       the current backup may be discarded
recover_backup - recover critical data after reshape crashed
	       during array assembly

Signed-off-by: Maciej Trela <maciej.trela@xxxxxxxxx>
---
 mdadm.h |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/mdadm.h b/mdadm.h
index e5e56fe..baee86c 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -671,6 +671,15 @@ extern struct superswitch {
 
 	int (*grow_array)(struct active_array *a, int new_raid_disks);
 
+	/* for external backup area
+	 *
+	 */
+	int (*save_backup)(struct supertype *st, struct mdinfo *info,
+			    void *buf, unsigned long write_offset, int length);
+	void (*discard_backup)(struct supertype *st, struct mdinfo *info);
+	int (*recover_backup)(struct supertype *st, struct mdinfo *info,
+			      void *ptr, int length);
+
 	int swapuuid; /* true if uuid is bigending rather than hostendian */
 	int external;
 	const char *name; /* canonical metadata name */

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