Whamcloud - gitweb
EX-7601 ofd: don't read for writes past eof
authorPatrick Farrell <pfarrell@whamcloud.com>
Tue, 12 Dec 2023 16:37:48 +0000 (11:37 -0500)
committerAndreas Dilger <adilger@whamcloud.com>
Sat, 6 Jan 2024 08:18:25 +0000 (08:18 +0000)
commitfb99cc3e212503c965f74c1d931f3c68e0ee8d4d
tree6f3e253ad4aa38866197a1a92934e8f6e7747055
parent50c7ad2e580d62e438136752defaa1408dfdffce
EX-7601 ofd: don't read for writes past eof

There's no data past EOF, so there's no need to do
read-modify-writes when the entire write is past the chunk
at EOF.  So in that case, don't read up data and don't
attempt decompression.

There's no explicit test for this, but this shows up
immediately in the random-offset copy tests, because they
seek and write various sizes to offsets past current EOF.

We also need this functionality for reads, because in some
cases the client will do reads past EOF (this is unusual,
but can still happen sometimes).  This is added in a
separate patch because it requires some code reorganization.

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: Ia2b598165d5645c5a44c3d58bea69c7e42f10e41
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/53425
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/obd.h
lustre/include/obd_class.h
lustre/ofd/ofd_internal.h
lustre/ofd/ofd_io.c