From e62f0a3c5b9db5e048de54454ccfded1c44963d8 Mon Sep 17 00:00:00 2001 From: Dmitry Zogin Date: Thu, 19 Aug 2010 18:53:31 +0400 Subject: [PATCH] b=21980 cache `ll_obdo_cache': Can't free all objects Always use OBDO_ALLOC/FREE for obdo allocations to prevent slab fragmentation. Also removing OBD_FL_TEMPORARY flag relicts. o=johann i=di.wang i=dmitry.zoguine --- lustre/include/lustre/lustre_idl.h | 2 -- lustre/osc/osc_request.c | 7 ++----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/lustre/include/lustre/lustre_idl.h b/lustre/include/lustre/lustre_idl.h index e8df3f5..6a2fd95 100644 --- a/lustre/include/lustre/lustre_idl.h +++ b/lustre/include/lustre/lustre_idl.h @@ -1188,8 +1188,6 @@ enum obdo_flags { /* mask for local-only flag, which won't be sent over network */ OBD_FL_LOCAL_MASK = 0xF0000000, - /* temporary OBDO used by osc_brw_async (see bug 18364) */ - OBD_FL_TEMPORARY = 0x10000000, }; #define LOV_MAGIC_V1 0x0BD10BD0 diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 2ba487b..76a046f 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -943,7 +943,7 @@ static int osc_shrink_grant_interpret(const struct lu_env *env, LASSERT(body); osc_update_grant(cli, body); out: - OBD_FREE_PTR(oa); + OBDO_FREE(oa); return rc; } @@ -2229,9 +2229,6 @@ static int brw_interpret(const struct lu_env *env, obd_count i; for (i = 0; i < aa->aa_page_count; i++) osc_release_write_grant(aa->aa_cli, aa->aa_ppga[i], 1); - - if (aa->aa_oa->o_flags & OBD_FL_TEMPORARY) - OBDO_FREE(aa->aa_oa); } osc_wake_cache_waiters(cli); osc_check_rpcs(env, cli); @@ -4089,7 +4086,7 @@ static int osc_set_info_async(struct obd_export *exp, obd_count keylen, CLASSERT(sizeof(*aa) <= sizeof(req->rq_async_args)); aa = ptlrpc_req_async_args(req); - OBD_ALLOC_PTR(oa); + OBDO_ALLOC(oa); if (!oa) { ptlrpc_req_finished(req); RETURN(-ENOMEM); -- 1.8.3.1