From a86e5f768057f2a62c266113a120746832562d64 Mon Sep 17 00:00:00 2001 From: shadow Date: Mon, 19 Jan 2009 21:19:04 +0000 Subject: [PATCH] release lock refernce only after add page to pages list. Branch b1_8 b=17972 i=shadow i=johann --- lustre/ChangeLog | 21 +++++++++++++++------ lustre/osc/cache.c | 7 +++++-- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index f722a0c..1d3c058 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -31,12 +31,6 @@ tbd Sun Microsystems, Inc. of Lustre filesystem with 4K stack may cause a stack overflow. For more information, please refer to bugzilla 17630. -Severity : normal -Frequency : always with long access acl -Bugzilla : 17636 -Descriptoin: mds can't pack reply with long acl. -Details : mds don't control size of acl but they limited by reint/getattr - reply buffer. Severity : enhancement Bugzilla : 18061 @@ -123,6 +117,21 @@ Details : Page index integer overflow in ll_read_ahead_page Lustre filesystem with 4K stack may cause a stack overflow. For more information, please refer to bugzilla 17630. +Severity : normal +Frequency : rarw +Bugzilla : 17972 +Descriptoin: stuck in cache_remove_extent() or panic with accessing to already + freed look. +Details : release lock refernce only after add page to pages list. + +Severity : normal +Frequency : always with long access acl +Bugzilla : 17636 +Descriptoin: mds can't pack reply with long acl. +Details : mds don't control size of acl but they limited by reint/getattr + reply buffer. + + Severity : major Frequency : on remount Bugzilla : 18018 diff --git a/lustre/osc/cache.c b/lustre/osc/cache.c index 1f7f64f..f0a8bce 100644 --- a/lustre/osc/cache.c +++ b/lustre/osc/cache.c @@ -86,6 +86,7 @@ int cache_add_extent(struct lustre_cache *cache, struct ldlm_res_id *res, struct lustre_handle tmplockh; ldlm_policy_data_t tmpex; struct ldlm_lock *lock = NULL; + int mode = 0; ENTRY; /* Don't add anything second time */ @@ -108,7 +109,6 @@ int cache_add_extent(struct lustre_cache *cache, struct ldlm_res_id *res, lock->l_policy_data.l_extent.start, lock->l_policy_data.l_extent.end, extent->oap_obj_off); } else { - int mode; /* Real extent width calculation here once we have real * extents */ @@ -138,13 +138,16 @@ int cache_add_extent(struct lustre_cache *cache, struct ldlm_res_id *res, "under us\n"); RETURN(-ENOLCK); } - ldlm_lock_decref(&tmplockh, mode); } spin_lock(&lock->l_extents_list_lock); list_add_tail(&extent->oap_page_list, &lock->l_extents_list); spin_unlock(&lock->l_extents_list_lock); extent->oap_ldlm_lock = lock; + LASSERTF(!(lock->l_flags & LDLM_FL_CANCEL), "Adding a page to already " + "cancelled lock %p", lock); + if (mode) + ldlm_lock_decref(&tmplockh, mode); LDLM_LOCK_PUT(lock); RETURN(0); -- 1.8.3.1