Assemble: really ensure stripe_cache is bit enough to handle new chunk size

Earlier patch:
  56fcbcbb6f
calculated the proper chunk size - but didn't use it..

Let's actually use it this time.

Signed-off-by: NeilBrown <neilb@suse.com>
This commit is contained in:
NeilBrown 2015-07-17 13:10:25 +10:00
parent ad1a3c2f08
commit 29a312f2f3
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}
}