summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2015-07-17 13:10:25 +1000
committerNeilBrown <neilb@suse.de>2015-07-17 13:10:25 +1000
commit29a312f2f39afeb9e01a27e77655dda8de4cd7e3 (patch)
tree56d02268b6349730170e62d5d4e690bff4bb991d
parentad1a3c2f082d90ff050fd089496732f1371900ab (diff)
downloadmdadm-29a312f2f39afeb9e01a27e77655dda8de4cd7e3.tar.gz
Assemble: really ensure stripe_cache is bit enough to handle new chunk size
Earlier patch: 56fcbcbb6f17df0e5dedf59744deee037c5d5fbd calculated the proper chunk size - but didn't use it.. Let's actually use it this time. Signed-off-by: NeilBrown <neilb@suse.com>
-rw-r--r--Assemble.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Assemble.c b/Assemble.c
index f5c8dcd..1960927 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -1113,12 +1113,12 @@ static int start_array(int mdfd,
if (content->reshape_active &&
content->new_chunk > chunk_size)
chunk_size = content->new_chunk;
- if (256 < 4 * ((content->array.chunk_size+4065)/4096)) {
+ if (256 < 4 * ((chunk_size+4065)/4096)) {
struct mdinfo *sra = sysfs_read(mdfd, NULL, 0);
if (sra)
sysfs_set_num(sra, NULL,
"stripe_cache_size",
- (4 * content->array.chunk_size / 4096) + 1);
+ (4 * chunk_size / 4096) + 1);
sysfs_free(sra);
}
}