Whamcloud - gitweb
EX-7601 ofd: do not use page cache for compressed files
authorPatrick Farrell <pfarrell@whamcloud.com>
Wed, 6 Dec 2023 15:55:24 +0000 (10:55 -0500)
committerAndreas Dilger <adilger@whamcloud.com>
Tue, 12 Dec 2023 04:03:46 +0000 (04:03 +0000)
commit972e4333e4c1ca78b609a77fe9f9ade2db9f72af
tree2c9b7e02262e2f51a0e94272d5e9415396bc2ffc
parent6c852d0e8334b7a1085c37e731ec73e01d2d6d22
EX-7601 ofd: do not use page cache for compressed files

It is challenging for the server to safely use the page
cache with compressed files, because if data is
decompressed in to the page cache, the data in cache now
differs from the data on disk.

This is a problem if *part* of the page cache is ever
evicted, because we can end up with a situation where a read
will be partially satisfied from cache and partially from
disk, but the data on disk is compressed and the data in
cache is not.

It is possible to deal with this by carefully ensuring the
page cache is not used just for decompressed data, but this
makes getting the buffers/lnbs for compressed files fairly
complicated.  Instead, we can just entirely block using the
server page cache for compressed files.

This must be done for both read and write, and only works
for ldiskfs - ZFS cannot easily be forced to not use its
page cache.  But that's OK because we do not support CSDC
with ZFS.

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: Iee73abb29ad5631bb2203c2133756d7ebf5b686d
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/53348
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Artem Blagodarenko <ablagodarenko@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/include/dt_object.h
lustre/ofd/ofd_io.c
lustre/osd-ldiskfs/osd_io.c