Whamcloud - gitweb
LU-14541 llite: Check vmpage in releasepage 62/47262/12
authorPatrick Farrell <pfarrell@whamcloud.com>
Thu, 12 May 2022 18:53:08 +0000 (14:53 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 20 May 2022 03:02:50 +0000 (03:02 +0000)
commitc524079f4f59a39b99467d9868ee4aafdcf033e9
tree5a13100f03313a28852b83ce067bdc5d5f70d67d
parent99e6bc29a437cac43fee499d6f9a2c17854468ee
LU-14541 llite: Check vmpage in releasepage

We cannot release a page if the vmpage reference count is
>1, otherwise we will detach a vmpage from Lustre when the
page is still referenced in the VM.

This creates a situation where page discard for lock
cancellation will not find the page, so we can get stale
data reads.

This re-introduces the LU-12587 issue where direct I/O on
a client falls back to buffered I/O if there are pages in
cache, since it cannot flush them.  This is annoying but
not a huge problem.

Fixes: e59f0c9a245f ("LU-12587 llite: don't check vmpage refcount in ll_releasepage()")
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I3aa1cd7330f5e7d1ba2ddb0c12779aa22f3d70b7
Reviewed-on: https://review.whamcloud.com/47262
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
lustre/include/cl_object.h
lustre/llite/rw26.c
lustre/osc/osc_page.c
lustre/tests/sanity.sh
lustre/tests/sanityn.sh