summaryrefslogtreecommitdiff
path: root/Incremental.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2012-07-09 17:14:16 +1000
committerNeilBrown <neilb@suse.de>2012-07-09 17:14:16 +1000
commit0ea8f5b167d3e98fa09d392079fc5e269b5a0395 (patch)
treebf4dd70cb9ad5da5f78fc45d616570e34e17aab0 /Incremental.c
parent503975b9d5f0696b5d2ee20ea903b859e3f60662 (diff)
Assemble: allow arrays to be assembled read-only.
The option was there, but never used. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Incremental.c')
-rw-r--r--Incremental.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/Incremental.c b/Incremental.c
index 44d5c7c2..009d88c1 100644
--- a/Incremental.c
+++ b/Incremental.c
@@ -44,7 +44,8 @@ static int try_spare(char *devname, int *dfdp, struct dev_policy *pol,
static int Incremental_container(struct supertype *st, char *devname,
char *homehost,
- int verbose, int runstop, int autof,
+ int verbose, int runstop,
+ int readonly, int autof,
int freeze_reshape);
int Incremental(char *devname, int verbose, int runstop,
@@ -139,7 +140,8 @@ int Incremental(char *devname, int verbose, int runstop,
pr_err("failed to get "
"exclusive lock on mapfile\n");
rv = Incremental_container(st, devname, homehost,
- verbose, runstop, autof,
+ verbose, runstop,
+ 0, autof,
freeze_reshape);
map_unlock(&map);
return rv;
@@ -451,7 +453,7 @@ int Incremental(char *devname, int verbose, int runstop,
sysfs_free(sra);
if (!rv)
rv = Incremental_container(st, chosen_name, homehost,
- verbose, runstop, autof,
+ verbose, runstop, 0, autof,
freeze_reshape);
map_unlock(&map);
if (rv == 1)
@@ -1335,7 +1337,8 @@ static char *container2devname(char *devname)
static int Incremental_container(struct supertype *st, char *devname,
char *homehost, int verbose,
- int runstop, int autof, int freeze_reshape)
+ int runstop, int readonly,
+ int autof, int freeze_reshape)
{
/* Collect the contents of this container and for each
* array, choose a device name and assemble the array.
@@ -1470,7 +1473,7 @@ static int Incremental_container(struct supertype *st, char *devname,
return 2;
}
- assemble_container_content(st, mdfd, ra, runstop,
+ assemble_container_content(st, mdfd, ra, runstop, readonly,
chosen_name, verbose, NULL,
freeze_reshape);
close(mdfd);