Whamcloud - gitweb
LU-13182 llite: Avoid eternel retry loops with MAP_POPULATE 21/40221/6
authorOleg Drokin <green@whamcloud.com>
Mon, 12 Oct 2020 20:10:15 +0000 (16:10 -0400)
committerOleg Drokin <green@whamcloud.com>
Tue, 3 Nov 2020 03:41:35 +0000 (03:41 +0000)
commitbb50c62c6f4cdd7a31145ab81e7c166e0760ed11
tree70bbe78507ea21dfbc41c830807c4e5e7642c8a4
parent9f1ef86ac3518dca6e567364e9a3b47fef3fada5
LU-13182 llite: Avoid eternel retry loops with MAP_POPULATE

Kernels 5.4+ have an infinite retry loop from MAP_POPULATE mmap
option. Use the FAULT_FLAG_RETRY_NOWAIT to instruct filemap_fault
to not drop the mmap_sem so if the call fails, we could use
the slow path and break the loop from forming.
(Idea by Neil Brown)

Test-Parameters: testlist=sanity-hsm env=ONLY=1 clientdistro=ubuntu2004
Change-Id: I320ab9ca447282aea15ef2030ef8671c4260d895
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/40221
Reviewed-by: Neil Brown <neilb@suse.de>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/llite/llite_mmap.c