Whamcloud - gitweb
EX-8189 osc: do not compress resends
authorPatrick Farrell <pfarrell@whamcloud.com>
Fri, 22 Sep 2023 22:33:14 +0000 (18:33 -0400)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 28 Sep 2023 08:44:30 +0000 (08:44 +0000)
There's some issue with doing compression on resent
requests, so this patch works around it with two things:
1. Use the uncompressed page array for resend
(this was always necessary unless we modified resend to
know it already had compressed pages as input)
2. Disable compression on resend (not clear why 1. wasn't
enough)

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I5fbbdc2771f8c2c7b5c28f0b70d89b8b6015147f
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/52484
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Artem Blagodarenko <ablagodarenko@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/osc/osc_request.c

index 1f20e23..c7b9d50 100644 (file)
@@ -1556,6 +1556,9 @@ osc_brw_prep_request(int cmd, struct client_obd *cli, struct obdo *oa,
                 * pages, so it is enough to check only one
                 */
                compressed = clpage->cp_comp_type != LL_COMPR_TYPE_NONE;
+
+               if (resend)
+                       compressed = false;
        }
        if (OBD_FAIL_CHECK(OBD_FAIL_OSC_BRW_PREP_REQ))
                RETURN(-ENOMEM); /* Recoverable */
@@ -2464,16 +2467,30 @@ static int osc_brw_redo_request(struct ptlrpc_request *request,
        struct ptlrpc_request *new_req;
        struct osc_brw_async_args *new_aa;
        struct osc_async_page *oap;
+       struct brw_page ***ppga;
+       u32 *page_count;
+
        ENTRY;
 
        /* The below message is checked in replay-ost-single.sh test_8ae*/
        DEBUG_REQ(rc == -EINPROGRESS ? D_RPCTRACE : D_ERROR, request,
                  "redo for recoverable error %d", rc);
 
+       /* if the request was compressed previously, we have to redo with the
+        * original arrays (ideally we'd reuse the compressed ones)
+        */
+       if (aa->aa_ncppga) {
+               ppga = &aa->aa_ncppga;
+               page_count = &aa->aa_ncpage_count;
+       } else {
+               ppga = &aa->aa_ppga;
+               page_count = &aa->aa_page_count;
+       }
+
        rc = osc_brw_prep_request(lustre_msg_get_opc(request->rq_reqmsg) ==
-                               OST_WRITE ? OBD_BRW_WRITE : OBD_BRW_READ,
-                                 aa->aa_cli, aa->aa_oa, &aa->aa_page_count,
-                                 &aa->aa_ppga, &new_req, 1);
+                                 OST_WRITE ? OBD_BRW_WRITE : OBD_BRW_READ,
+                                 aa->aa_cli, aa->aa_oa, page_count, ppga,
+                                 &new_req, 1);
         if (rc)
                 RETURN(rc);