summaryrefslogtreecommitdiffstats
path: root/super-ddf.c
diff options
context:
space:
mode:
authorArtur Paszkiewicz <artur.paszkiewicz@intel.com>2017-03-29 11:54:15 +0200
committerJes Sorensen <Jes.Sorensen@gmail.com>2017-03-29 17:32:15 +0200
commit5308f11727b889965efe5ac0e854d197c2b51f6d (patch)
tree9b35204d86ddc3bf3275c123b4a420dda57c02a8 /super-ddf.c
parentDetail: handle non-existent arrays better. (diff)
downloadmdadm-5308f11727b889965efe5ac0e854d197c2b51f6d.tar.xz
mdadm-5308f11727b889965efe5ac0e854d197c2b51f6d.zip
Generic support for --consistency-policy and PPL
Add a new parameter to mdadm: --consistency-policy=. It determines how the array maintains consistency in case of unexpected shutdown. This maps to the md sysfs attribute 'consistency_policy'. It can be used to create a raid5 array using PPL. Add the necessary plumbing to pass this option to metadata handlers. The write journal and bitmap functionalities are treated as different policies, which are implicitly selected when using --write-journal or --bitmap options. Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com>
Diffstat (limited to 'super-ddf.c')
-rw-r--r--super-ddf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/super-ddf.c b/super-ddf.c
index 1707ad1e..cdd16a47 100644
--- a/super-ddf.c
+++ b/super-ddf.c
@@ -2290,7 +2290,7 @@ static unsigned int find_vde_by_guid(const struct ddf_super *ddf,
static int init_super_ddf(struct supertype *st,
mdu_array_info_t *info,
- unsigned long long size, char *name, char *homehost,
+ struct shape *s, char *name, char *homehost,
int *uuid, unsigned long long data_offset)
{
/* This is primarily called by Create when creating a new array.
@@ -2328,7 +2328,7 @@ static int init_super_ddf(struct supertype *st,
struct virtual_disk *vd;
if (st->sb)
- return init_super_ddf_bvd(st, info, size, name, homehost, uuid,
+ return init_super_ddf_bvd(st, info, s->size, name, homehost, uuid,
data_offset);
if (posix_memalign((void**)&ddf, 512, sizeof(*ddf)) != 0) {
@@ -3347,7 +3347,7 @@ static int validate_geometry_ddf(struct supertype *st,
int *chunk, unsigned long long size,
unsigned long long data_offset,
char *dev, unsigned long long *freesize,
- int verbose)
+ int consistency_policy, int verbose)
{
int fd;
struct mdinfo *sra;