Whamcloud - gitweb
EX-7601 ofd: create read mapping for read-modify-write
When we need to do a read-modify-write for unaligned writes
to a compressed file, it's important we read only the
portion of the file which is receiving unaligned IO.
This patch identifies these chunks in preprw_write and
creates a read lnb mapping from a subset of the pages for
write. These pages we read up are then decompressed.
Note one issue this patch does not address is reading of
data past EOF. If the final chunk is unaligned, we will
round the write to cover it. This results in extending the
file inappropriately, writing zeroes where they aren't
needed. The read side gives us the info to address this,
which we will do in a future patch.
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: Iede43f12127cbb93e73c22a915192aa2f814a927
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/52997
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Artem Blagodarenko <ablagodarenko@ddn.com>