summaryrefslogtreecommitdiffstats
path: root/Assemble.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2008-12-18 16:56:13 +1100
committerNeilBrown <neilb@suse.de>2008-12-18 16:56:13 +1100
commit8a659c33212f85cc0dcecc759b7b36b0bb2b4fe4 (patch)
tree8c09f1ce1ab41c6218a0e4705e3227bc7b7c022b /Assemble.c
parentb06e30958b6ef4d26497894b2584757b40565d91 (diff)
parent3a56f223e94106102eed3fd2b08d3ecad353361b (diff)
downloadmdadm-8a659c33212f85cc0dcecc759b7b36b0bb2b4fe4.tar.gz
mdadm-8a659c33212f85cc0dcecc759b7b36b0bb2b4fe4.tar.xz
mdadm-8a659c33212f85cc0dcecc759b7b36b0bb2b4fe4.zip
Merge branch 'master' into devel-3.0
Conflicts: Assemble.c Incremental.c Kill.c ReadMe.c inventory mapfile.c mdadm.8 mdadm.spec mdassemble.8
Diffstat (limited to 'Assemble.c')
-rw-r--r--Assemble.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/Assemble.c b/Assemble.c
index cac273e..4933520 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -890,6 +890,8 @@ int Assemble(struct supertype *st, char *mddev,
continue;
devices[j].i.disk.state = desired_state;
+ if (!(devices[j].i.array.state & 1))
+ clean = 0;
if (st->ss->update_super(st, &devices[j].i, "assemble", NULL,
verbose, 0, NULL)) {
@@ -1088,6 +1090,20 @@ int Assemble(struct supertype *st, char *mddev,
fprintf(stderr, " and %d spare%s", sparecnt, sparecnt==1?"":"s");
fprintf(stderr, ".\n");
}
+ if (content->reshape_active &&
+ content->array.level >= 4 &&
+ content->array.level <= 6) {
+ /* might need to increase the size
+ * of the stripe cache - default is 256
+ */
+ if (256 < 4 * (content->array.chunk_size/4096)) {
+ struct mdinfo *sra = sysfs_read(mdfd, 0, 0);
+ if (sra)
+ sysfs_set_num(sra, NULL,
+ "stripe_cache_size",
+ (4 * content->array.chunk_size / 4096) + 1);
+ }
+ }
close(mdfd);
wait_for(mddev);
if (auto_assem) {