Whamcloud - gitweb
b=18801
authoranserper <anserper>
Sat, 5 Sep 2009 06:43:55 +0000 (06:43 +0000)
committeranserper <anserper>
Sat, 5 Sep 2009 06:43:55 +0000 (06:43 +0000)
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

lustre/ost/ost_handler.c

index f3dcf72..bb93ce9 100644 (file)
@@ -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;
 }