Whamcloud - gitweb
LU-10026 csdc: reserve OBD_BRW_SPECULATIVE_COMPR flag 04/55104/5
authorArtem Blagodarenko <ablagodarenko@ddn.com>
Tue, 14 May 2024 12:25:19 +0000 (08:25 -0400)
committerOleg Drokin <green@whamcloud.com>
Wed, 19 Jun 2024 01:11:37 +0000 (01:11 +0000)
commitb78e84580a2d46ce674d48cb01774d95a5cc5464
tree0e49cc5a2ba6c364d6714c3d6376186f57d39c74
parente27b5f1c31c2eccb6fc87c9eab8c95497e3814c8
LU-10026 csdc: reserve OBD_BRW_SPECULATIVE_COMPR flag

DIO does not set KMS like buffered IO, and the KMS it sets
is not safe.  So this requires special handling for last
chunk compression.

Since we can't know when we're doing the last chunk with
DIO, the solution is as follows:
If a DIO write is chunk aligned at the start but not a full
chunk, we compress it but mark it 'speculative'.  Then the
server double checks that the write is beyond current file
size, and if it's not, it will ask the client to do a
resend, and the client will send the data back
uncompressed.

This makes it reasonable to fully enable DIO to compressed
files - previously we converted unaligned DIO to buffered
IO.

This patch reserves OBD_BRW_SPECULATIVE_COMPR flag.

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Signed-off-by: Artem Blagodarenko <ablagodarenko@ddn.com>
Change-Id: I679bc103bd2862115d94286e7c2ed43e1580b29e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55104
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Patrick Farrell <patrick.farrell@oracle.com>
lustre/include/uapi/linux/lustre/lustre_idl.h
lustre/ptlrpc/wiretest.c
lustre/utils/wirecheck.c
lustre/utils/wiretest.c