Whamcloud - gitweb
EX-7601 ofd: improve decompress_rnb debug
authorPatrick Farrell <pfarrell@whamcloud.com>
Mon, 11 Dec 2023 15:49:19 +0000 (10:49 -0500)
committerAndreas Dilger <adilger@whamcloud.com>
Tue, 12 Dec 2023 05:31:54 +0000 (05:31 +0000)
Since we're very close on landing the unaligned read
patches, this minor debug improvement is being placed later
in the series.

Test-Parameters: trivial
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I36ad243bd1f7025e358f9593f1008f0b851cc1bb
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/53411
Reviewed-by: Artem Blagodarenko <ablagodarenko@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/ofd/ofd_compress.c

index 0ead012..c1e019e 100644 (file)
@@ -145,8 +145,9 @@ int decompress_rnb(const char *obd_name, struct niobuf_local *lnbs,
        LASSERT(*lnb_start < lnb_npages);
 
        CDEBUG(D_SEC,
-              "rnb_start %llu, rnb_end %llu, lnb_start %d, chunk_size %d\n",
-              rnb_start, rnb_end, *lnb_start, chunk_size);
+              "rnb_start %llu, rnb_end %llu, lnb_start %d (at offset %llu), chunk_size %d\n",
+              rnb_start, rnb_end, *lnb_start, lnbs[*lnb_start].lnb_file_offset,
+              chunk_size);
 
        /* if the start of the read is not chunk aligned, we find the start of
         * the lnbs for that chunk and decompress it
@@ -164,9 +165,9 @@ int decompress_rnb(const char *obd_name, struct niobuf_local *lnbs,
                }
 
                CDEBUG(D_SEC,
-                      "leading chunk lnb %d lnb file offset %llu, chunk start %llu, chunk end %llu\n",
-                      i, lnb ? lnb->lnb_file_offset : 0, chunk_start,
-                      chunk_end);
+                      "leading chunk%s lnb %d lnb file offset %llu, chunk start %llu, chunk end %llu\n",
+                      chunk_found ? "" : "not found", i,
+                      lnb ? lnb->lnb_file_offset : 0, chunk_start, chunk_end);
 
                if (!chunk_found)
                        RETURN(-EINVAL);
@@ -204,9 +205,9 @@ int decompress_rnb(const char *obd_name, struct niobuf_local *lnbs,
                }
 
                CDEBUG(D_SEC,
-                      "trailing chunk lnb %d lnb file offset %llu, chunk start %llu, chunk end %llu\n",
-                      i, lnb ? lnb->lnb_file_offset : 0, chunk_start,
-                      chunk_end);
+                      "trailing chunk%s lnb %d lnb file offset %llu, chunk start %llu, chunk end %llu\n",
+                      chunk_found ? "" : "not found", i,
+                      lnb ? lnb->lnb_file_offset : 0, chunk_start, chunk_end);
 
                if (!chunk_found)
                        RETURN(-EINVAL);