From: Patrick Farrell Date: Wed, 2 Mar 2022 00:14:03 +0000 (-0500) Subject: LU-15619 osc: Remove oap_magic X-Git-Tag: 2.15.53~187 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=721df28648c4b3faabce709abce7d55512edbeac;hp=e82836f56ee7a9337a86ad0a32f19751024c7ec6 LU-15619 osc: Remove oap_magic oap_magic exists only to debug init and allocation failures, but is allocated for every page of memory, which wastes a lot of memory for something we don't need dedicated debug for. Remove it. Signed-off-by: Patrick Farrell Change-Id: I360e09676f7ba8c3e5296bdf75a6e7f75e91eadb Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/46713 Reviewed-by: Zhenyu Xu Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Tested-by: jenkins Tested-by: Maloo --- diff --git a/lustre/include/lustre_osc.h b/lustre/include/lustre_osc.h index 4abb8d7..8b574b8 100644 --- a/lustre/include/lustre_osc.h +++ b/lustre/include/lustre_osc.h @@ -71,7 +71,6 @@ enum async_flags { }; struct osc_async_page { - int oap_magic; unsigned short oap_cmd; struct list_head oap_pending_item; diff --git a/lustre/osc/osc_cache.c b/lustre/osc/osc_cache.c index 3721849..fb9b003 100644 --- a/lustre/osc/osc_cache.c +++ b/lustre/osc/osc_cache.c @@ -2247,7 +2247,6 @@ int osc_prep_async_page(struct osc_object *osc, struct osc_page *ops, if (!page) return cfs_size_round(sizeof(*oap)); - oap->oap_magic = OAP_MAGIC; oap->oap_obj = osc; oap->oap_page = vmpage; @@ -2290,9 +2289,6 @@ int osc_queue_async_io(const struct lu_env *env, struct cl_io *io, int rc = 0; ENTRY; - if (oap->oap_magic != OAP_MAGIC) - RETURN(-EINVAL); - if (cli->cl_import == NULL || cli->cl_import->imp_invalid) RETURN(-EIO); @@ -2468,8 +2464,6 @@ int osc_teardown_async_page(const struct lu_env *env, int rc = 0; ENTRY; - LASSERT(oap->oap_magic == OAP_MAGIC); - CDEBUG(D_INFO, "teardown oap %p page %p at index %lu.\n", oap, ops, osc_index(oap2osc(oap))); diff --git a/lustre/osc/osc_page.c b/lustre/osc/osc_page.c index ecc71aa..40fcf4d 100644 --- a/lustre/osc/osc_page.c +++ b/lustre/osc/osc_page.c @@ -120,14 +120,14 @@ static int osc_page_print(const struct lu_env *env, struct client_obd *cli = &osc_export(obj)->exp_obd->u.cli; return (*printer)(env, cookie, LUSTRE_OSC_NAME"-page@%p %lu: " - "1< %#x %d %c %c > " + "1< %d %c %c > " "2< %lld %u %u %#x %#x | %p %p %p > " "3< %d %d > " "4< %d %d %d %lu %c | %c %c %c %c > " "5< %c %c %c %c | %d %c | %d %c %c>\n", opg, osc_index(opg), /* 1 */ - oap->oap_magic, oap->oap_cmd, + oap->oap_cmd, list_empty_marker(&oap->oap_pending_item), list_empty_marker(&oap->oap_rpc_item), /* 2 */ @@ -297,8 +297,6 @@ void osc_page_submit(const struct lu_env *env, struct osc_page *opg, struct osc_io *oio = osc_env_io(env); struct osc_async_page *oap = &opg->ops_oap; - LASSERTF(oap->oap_magic == OAP_MAGIC, "Bad oap magic: oap %p, " - "magic 0x%x\n", oap, oap->oap_magic); LASSERT(oap->oap_async_flags & ASYNC_READY); LASSERT(oap->oap_async_flags & ASYNC_COUNT_STABLE);