Whamcloud - gitweb
EX-7601 osc: apply compressed flag to dst page
authorPatrick Farrell <pfarrell@whamcloud.com>
Fri, 3 Nov 2023 18:11:46 +0000 (14:11 -0400)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 10 Nov 2023 09:34:12 +0000 (09:34 +0000)
commit3b3a8677d77d6db674a7ccf3805ba9b1e014e646
tree6781a5082406cd7047c62bcc17b50f6889f6e9f0
parent143caaa0ea9fd240de547184540032852f85b99e
EX-7601 osc: apply compressed flag to dst page

The existing code to apply brw flags to compressed pages
has two issues:
1. The dst_page is NOT an osc async page, it is a bare BRW
page.  This means the brw_page2oap macro isn't right,
because there is no oap page.
Because oap_brw_flags is actually oap_brw_page.flag, we
don't ever access the memory pointed at by OAP, just use it
to find an offset back in to the brw page.

This means the flags are set correctly, but we still
shouldn't use this macro.
2. However, the function then overwrites these flags by
copying from a page in the source, so OBD_BRW_COMPRESSED is
lost.

Add OBD_BRW_COMPRESSED when we set flags.  This ensures the
flag is actually sent to the server on compressed IO.

This was not causing any problems because the server does
not actually use the OBD_BRW_COMPRESSED flag yet.
(EX-7601 uses this flag)

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: Ia94cdc803868ce16a0b66fd58578ec8b2d00cbae
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/52979
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>
lustre/osc/osc_compress.c