Whamcloud - gitweb
LU-15220 llite: Compat for set_pagevec_dirty
authorPatrick Farrell <pfarrell@whamcloud.com>
Fri, 21 Jan 2022 02:20:29 +0000 (18:20 -0800)
committerAndreas Dilger <adilger@whamcloud.com>
Mon, 24 Jan 2022 05:39:49 +0000 (05:39 +0000)
commit37e95986fe154c68e5ab295bad10a635664c330d
treea03020ef7021f68e16c79a6f9f44cb426679543f
parentb36a677a7bd0de26fb272be3040f5348a459b02e
LU-15220 llite: Compat for set_pagevec_dirty

If we can't access account_page_dirtied either via export
or via kallsyms lookup, the benefit of vvp_set_pagevec_dirty
is mostly lost, since we have to take the xarray lock
repeatedly to handle accounting dirty pages.

Replace the more complicated compat code by just falling
back to __set_page_dirty_nobuffers in a loop, since this
has the same effect and is much simpler.

This also resolves 5.14 compatibility, as __set_page_dirty
is no longer exported there.

Lustre-change: https://review.whamcloud.com/45927
Lustre-commit: 8fdef1381ea07657d6689818b2897d69cb7e9c83

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I3feb526b8eaaec3811c689a895875b409204a159
Reviewed-by: Yingjin Qian <qian@ddn.com>
Reviewed-on: https://review.whamcloud.com/46249
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/include/lustre_compat.h
lustre/llite/vvp_dev.c
lustre/llite/vvp_io.c