Whamcloud - gitweb
EX-7601 llite: restrict overwrites during preview
authorPatrick Farrell <pfarrell@whamcloud.com>
Tue, 13 Jun 2023 17:26:09 +0000 (13:26 -0400)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 23 Jun 2023 23:36:50 +0000 (23:36 +0000)
commit9b20f97fcf3326395a8ff8b04d5d107c3cbd32e9
treefeb9abbd17c0c817e2d20f8e14082145d562f618
parent61b4a00ea826cf5215925673d7ea0e2d082b1c66
EX-7601 llite: restrict overwrites during preview

EX-7601 is an issue where when modifying a compressed file
we do not correctly read-up and re-write existing
compressed data.

To avoid this, we can only allow writes which are not
aligned to compression chunk size when they are not
overwriting existing data, ie, when they are extending the
file.

This returns EINVAL for all writes to compressed files
which are not either chunk aligned or extending the file.
This should prevent users from hitting the data corruption
issue but still allows some basic usage.  This is intended
just for the preview period.

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I0eea01e2249866a074afd0d0642fe6dce9a49664
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/51259
Tested-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/include/cl_object.h
lustre/llite/vvp_io.c
lustre/lov/lov_object.c
lustre/tests/sanity.sh