Whamcloud - gitweb
LU-13476 llite: Fix lock ordering in pagevec_dirty 17/38317/5
authorShaun Tancheff <shaun.tancheff@hpe.com>
Wed, 6 May 2020 08:19:48 +0000 (03:19 -0500)
committerOleg Drokin <green@whamcloud.com>
Sat, 4 Jul 2020 03:04:10 +0000 (03:04 +0000)
commitc4ed9b0fb10132a9683362ae90caf4c64a29062c
treeb75359f92cb97236983e91798cae7a346a58ba9d
parent9821754235e2417868dbaeb987b33e22c517346f
LU-13476 llite: Fix lock ordering in pagevec_dirty

In vvp_set_pagevec_dirty lock order between i_pages and
lock_page_memcg was inverted with the expectation that
no other users would conflict.

However in vvp_page_completion_write the call to
test_clear_page_writeback does expect to be able
to lock_page_memcg then lock i_pages which appears
to conflict with the original analysis.

The reported case shows as RCU stalls with
vvp_set_pagevec_dirty blocked attempting to lock i_pages.

Fixes: a7299cb012f ("LU-9920 vvp: dirty pages with pagevec")
HPE-bug-id: LUS-8798
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I47c2107ddbef4a76325928e982abfc0ea666f39b
Reviewed-on: https://review.whamcloud.com/38317
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Patrick Farrell <farr0186@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/vvp_io.c