Whamcloud - gitweb
LU-13182 llite: Avoid eternel retry loops with MAP_POPULATE 58/43958/4
authorOleg Drokin <green@whamcloud.com>
Wed, 9 Jun 2021 16:30:12 +0000 (09:30 -0700)
committerOleg Drokin <green@whamcloud.com>
Tue, 15 Jun 2021 16:23:00 +0000 (16:23 +0000)
commit21dc165991f9038aefe679cc58fdfc30d65dbaed
tree4063509e5ee11bf1f4b4db2d343bdee72bce9c84
parent13e11cf70cc8102d006a681276094517c22e4a47
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)

Lustre-change: https://review.whamcloud.com/40221
Lustre-commit: bb50c62c6f4cdd7a31145ab81e7c166e0760ed11

Test-Parameters: trivial testlist=sanity-hsm env=ONLY=1 clientdistro=ubuntu2004

Change-Id: I320ab9ca447282aea15ef2030ef8671c4260d895
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/43958
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/llite/llite_mmap.c