summaryrefslogtreecommitdiff
path: root/mdadm.h
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2013-05-16 15:07:16 +1000
committerNeilBrown <neilb@suse.de>2013-05-16 15:07:16 +1000
commit74db60b00a43a5ae636477c10c24e923e76049ce (patch)
tree168664568b7c8d27b12ef00ad0119ac29b2c1056 /mdadm.h
parentb31df43682216d1c65813eae49ebdd8253db8907 (diff)
Add --dump / --restore functionality.
This allows the metadata on a device to be saved and later restored. This can be useful before experimenting on an array that is misbehaving. Suggested-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdadm.h')
-rw-r--r--mdadm.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/mdadm.h b/mdadm.h
index 3139259d..3244c3da 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -339,6 +339,8 @@ enum special_options {
KillOpt,
DataOffset,
ExamineBB,
+ Dump,
+ Restore,
};
enum prefix_standard {
@@ -630,7 +632,7 @@ struct reshape {
/* A superswitch provides entry point the a metadata handler.
*
- * The super_switch primarily operates on some "metadata" that
+ * The superswitch primarily operates on some "metadata" that
* is accessed via the 'supertype'.
* This metadata has one of three possible sources.
* 1/ It is read from a single device. In this case it may not completely
@@ -665,6 +667,7 @@ extern struct superswitch {
void (*brief_examine_subarrays)(struct supertype *st, int verbose);
void (*export_examine_super)(struct supertype *st);
int (*examine_badblocks)(struct supertype *st, int fd, char *devname);
+ int (*copy_metadata)(struct supertype *st, int from, int to);
/* Used to report details of an active array.
* ->load_super was possibly given a 'component' string.
@@ -1177,6 +1180,10 @@ extern int ExamineBitmap(char *filename, int brief, struct supertype *st);
extern int Write_rules(char *rule_name);
extern int bitmap_update_uuid(int fd, int *uuid, int swap);
extern unsigned long bitmap_sectors(struct bitmap_super_s *bsb);
+extern int Dump_metadata(char *dev, char *dir, struct context *c,
+ struct supertype *st);
+extern int Restore_metadata(char *dev, char *dir, struct context *c,
+ struct supertype *st, int only);
extern int md_get_version(int fd);
extern int get_linux_version(void);