Whamcloud - gitweb
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>