X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fmdadm.git;a=blobdiff_plain;f=mdadm.h;h=5e2cfe41c1fc3eeb493c7c65c642dba000f5a3fe;hp=08b78689b1c410120e3bde3427f09b2669b20cd6;hb=edd8d13c0247b8df5876a94c2d61d74d2cf62c7e;hpb=bfa44e2e7afb88a9f2d6083f8ff31c2d50cc78dc diff --git a/mdadm.h b/mdadm.h index 08b78689..5e2cfe41 100644 --- a/mdadm.h +++ b/mdadm.h @@ -542,6 +542,8 @@ extern struct superswitch { void (*sync_metadata)(struct supertype *st); void (*process_update)(struct supertype *st, struct metadata_update *update); + void (*prepare_update)(struct supertype *st, + struct metadata_update *update); /* activate_spare will check if the array is degraded and, if it * is, try to find some spare space in the container. @@ -559,6 +561,13 @@ extern struct superswitch { extern struct superswitch super_imsm; +struct metadata_update { + int len; + char *buf; + void *space; /* allocated space that monitor will use */ + struct metadata_update *next; +}; + /* A supertype holds a particular collection of metadata. * It identifies the metadata type by the superswitch, and the particular * sub-version of that metadata type. @@ -579,6 +588,9 @@ struct supertype { void *sb; void *info; + struct metadata_update *updates; + struct metadata_update **update_tail; + /* extra stuff used by mdmon */ struct active_array *arrays; int sock; /* listen to external programs */ @@ -738,6 +750,8 @@ extern unsigned long long get_component_size(int fd); extern void remove_partitions(int fd); extern unsigned long long calc_array_size(int level, int raid_disks, int layout, int chunksize, unsigned long long devsize); +extern int flush_metadata_updates(struct supertype *st); +extern void append_metadata_update(struct supertype *st, void *buf, int len); extern char *human_size(long long bytes);