diff options
author | Alexei Naberezhnov <anaberezhnov@fb.com> | 2018-03-28 02:54:16 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-02-06 19:31:37 +0300 |
commit | fafc8e09d1e92351969ab6d2ad237f3c266fe2d8 (patch) | |
tree | 90db4ed86b2da689f45296fc8e5de98a84169d4f /fs/compat.c | |
parent | 4ebbe06b6a56e18054e533f59d56ad00142ab5f7 (diff) | |
download | linux-fafc8e09d1e92351969ab6d2ad237f3c266fe2d8.tar.xz |
md/raid5: fix 'out of memory' during raid cache recovery
commit 483cbbeddd5fe2c80fd4141ff0748fa06c4ff146 upstream.
This fixes the case when md array assembly fails because of raid cache recovery
unable to allocate a stripe, despite attempts to replay stripes and increase
cache size. This happens because stripes released by r5c_recovery_replay_stripes
and raid5_set_cache_size don't become available for allocation immediately.
Released stripes first are placed on conf->released_stripes list and require
md thread to merge them on conf->inactive_list before they can be allocated.
Patch allows final allocation attempt during cache recovery to wait for
new stripes to become availabe for allocation.
Cc: linux-raid@vger.kernel.org
Cc: Shaohua Li <shli@kernel.org>
Cc: linux-stable <stable@vger.kernel.org> # 4.10+
Fixes: b4c625c67362 ("md/r5cache: r5cache recovery: part 1")
Signed-off-by: Alexei Naberezhnov <anaberezhnov@fb.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/compat.c')
0 files changed, 0 insertions, 0 deletions