Whamcloud - gitweb
LU-13805 osc: Add debug 88/49988/22
authorPatrick Farrell <pfarrell@whamcloud.com>
Tue, 14 Feb 2023 18:24:15 +0000 (13:24 -0500)
committerOleg Drokin <green@whamcloud.com>
Wed, 28 Jun 2023 21:46:26 +0000 (21:46 +0000)
This adds some minor additional debug for unaligned IO.

The purpose here is just to shorten the length of the
main patch by pulling out supporting bits.

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: Ia1e749788b66f1d6d3440eb99ff3e86c893fd3f3
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49988
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
lustre/osc/osc_page.c
lustre/osc/osc_request.c

index 8be11a2..6e491d5 100644 (file)
@@ -204,6 +204,8 @@ static void osc_page_clip(const struct lu_env *env,
        struct osc_page       *opg = cl2osc_page(slice);
        struct osc_async_page *oap = &opg->ops_oap;
 
+       CDEBUG(D_CACHE, "from %d, to %d\n", from, to);
+
        opg->ops_from = from;
        /* argument @to is exclusive, but @ops_to is inclusive */
        opg->ops_to   = to - 1;
index ad3c4c6..c351d67 100644 (file)
@@ -2719,16 +2719,20 @@ int osc_build_rpc(const struct lu_env *env, struct client_obd *cli,
 
                        list_add_tail(&oap->oap_rpc_item, &rpc_list);
                        if (starting_offset == OBD_OBJECT_EOF ||
-                           starting_offset > oap->oap_obj_off)
+                           starting_offset > oap->oap_obj_off) {
                                starting_offset = oap->oap_obj_off;
-                       else
+                       } else {
+                               CDEBUG(D_CACHE, "page i:%d, oap->oap_obj_off %llu, oap->oap_page_off %u\n",
+                                      i, oap->oap_obj_off, oap->oap_page_off);
                                LASSERT(oap->oap_page_off == 0);
-                       if (ending_offset < oap->oap_obj_off + oap->oap_count)
+                       }
+                       if (ending_offset < oap->oap_obj_off + oap->oap_count) {
                                ending_offset = oap->oap_obj_off +
                                                oap->oap_count;
-                       else
+                       } else {
                                LASSERT(oap->oap_page_off + oap->oap_count ==
                                        PAGE_SIZE);
+                       }
                }
                if (ext->oe_ndelay)
                        ndelay = true;