From: anserper Date: Sat, 5 Sep 2009 06:43:55 +0000 (+0000) Subject: b=18801 X-Git-Tag: v1_8_2_01~1^2~134 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=f9416bd57eaf11e07782ea8ef721982ec542fdd6;p=fs%2Flustre-release.git b=18801 i=Oleg Drokin i=Johann Lombardi lockless write adjusting object's size might not update lvb which might lead to stale stats returned by ll_glimpse_size --- diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c index f3dcf72..bb93ce9 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -481,8 +481,12 @@ static void ost_brw_lock_put(int mode, LASSERT(mode == LCK_PR || mode == LCK_PW); LASSERT((obj->ioo_bufcnt > 0 && (niob[0].flags & OBD_BRW_SRVLOCK)) == lustre_handle_is_used(lh)); - if (lustre_handle_is_used(lh)) + if (lustre_handle_is_used(lh)) { + struct ldlm_lock *lock = ldlm_handle2lock(lh); + ldlm_res_lvbo_update(lock->l_resource, NULL, 0, 1); + LDLM_LOCK_PUT(lock); ldlm_lock_decref(lh, mode); + } EXIT; }