Whamcloud - gitweb
EX-7600 osc: save compressed object size
authorArtem Blagodarenko <ablagodarenko@ddn.com>
Wed, 11 Oct 2023 16:23:56 +0000 (12:23 -0400)
committerAndreas Dilger <adilger@whamcloud.com>
Sun, 5 Nov 2023 10:41:36 +0000 (10:41 +0000)
commitb489a2a39745eedb40261802b0f81b6ffa6495e4
treedc886469b640141e588c8ba6b7d75dabda20bb36
parent02242f6f1ba1867756ee5b91abd2207f646436cf
EX-7600 osc: save compressed object size

CSDC uses a sparse file feature. A client writes compressed data
chunks to the original offsets so the same data is expected to be
read from the same offsets.

There are no writes after the last compressed chunk, so no "hole"
after the last compressed chunk.

Compressed file size (based on OST objects size) is smaller than
the original on the "original last chunk size - compressed last
chunk size" delta.

Object size should be set to uncompressed size. This size is used to
calculate file size and to remove the workaround of not compressing
the last chunk in the file.

Fixes: caee1c5 ("EX-7818 osc: don't check for start inside the chunk)
Signed-off-by: Artem Blagodarenko <ablagodarenko@ddn.com>
Change-Id: I387c282e1cf788c3b8f6230ef555d73ffffe49c1
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/51595
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/osc/osc_compress.c
lustre/osc/osc_request.c
lustre/osd-ldiskfs/osd_io.c