[lustre-devel] [PATCH 18/21] lustre: osc: Add debug
James Simmons <[email protected]> Fri, 7 Feb 2025 19:30:24 -0500
| Newsgroups | org.lustre.lists.lustre-devel |
|---|---|
| Message-ID | <[email protected]> |
From: Patrick Farrell <[email protected]> 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. WC-bug-id: https://jira.whamcloud.com/browse/LU-13805 Lustre-commit: 6d1045d63a5bf33a1 ("LU-13805 osc: Add debug") Signed-off-by: Patrick Farrell <[email protected]> Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49988 Reviewed-by: Oleg Drokin <[email protected]> Reviewed-by: Andreas Dilger <[email protected]> Reviewed-by: Sebastien Buisson <[email protected]> Signed-off-by: James Simmons <[email protected]> --- fs/lustre/osc/osc_page.c | 2 ++ fs/lustre/osc/osc_request.c | 13 +++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/fs/lustre/osc/osc_page.c b/fs/lustre/osc/osc_page.c index d4b3baf227b6..c428c3626676 100644 --- a/fs/lustre/osc/osc_page.c +++ b/fs/lustre/osc/osc_page.c @@ -201,6 +201,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; diff --git a/fs/lustre/osc/osc_request.c b/fs/lustre/osc/osc_request.c index 3298a9923ea2..5c9f93b91609 100644 --- a/fs/lustre/osc/osc_request.c +++ b/fs/lustre/osc/osc_request.c @@ -2737,16 +2737,21 @@ 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); - 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; -- 2.39.3 _______________________________________________ lustre-devel mailing list [email protected] http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org