diff options
author | NeilBrown <neilb@suse.de> | 2008-12-18 16:56:13 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2008-12-18 16:56:13 +1100 |
commit | 8a659c33212f85cc0dcecc759b7b36b0bb2b4fe4 (patch) | |
tree | 8c09f1ce1ab41c6218a0e4705e3227bc7b7c022b /Assemble.c | |
parent | b06e30958b6ef4d26497894b2584757b40565d91 (diff) | |
parent | 3a56f223e94106102eed3fd2b08d3ecad353361b (diff) | |
download | mdadm-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.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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) { |