Whamcloud - gitweb
Branch: b_new_cmd
authorwangdi <wangdi>
Sat, 30 Sep 2006 10:04:42 +0000 (10:04 +0000)
committerwangdi <wangdi>
Sat, 30 Sep 2006 10:04:42 +0000 (10:04 +0000)
fixes for recovery-small 18.
1) we should use ldlm_lock_match in extent lock revokation, since it might
   happen when obd inactive. and the page should be truncated anyway, even
   lock match failed.
2) fix osc name of test 18 in recovery-small

lustre/llite/file.c
lustre/tests/recovery-small.sh

index 51e5b74..e042728 100644 (file)
@@ -839,10 +839,11 @@ void ll_pgcache_remove_extent(struct inode *inode, struct lov_stripe_md *lsm,
                 tmpex.l_extent.end = tmpex.l_extent.start + PAGE_CACHE_SIZE - 1;
                 l_flags = LDLM_FL_BLOCK_GRANTED | LDLM_FL_CBPENDING | LDLM_FL_TEST_LOCK;
                 /* check to see if another DLM lock covers this page b=2765 */
-                rc2 = obd_match(ll_s2dtexp(inode->i_sb), lsm, LDLM_EXTENT,
-                                &tmpex, LCK_PR | LCK_PW, &l_flags, inode,
-                                &lockh);
-                if (rc2 == 0 && page->mapping != NULL) {
+                rc2 = ldlm_lock_match(lock->l_resource->lr_namespace,
+                                      l_flags, &lock->l_resource->lr_name, 
+                                      LDLM_EXTENT, &tmpex, LCK_PR | LCK_PW, &lockh);
+                
+                if (rc2 <= 0 && page->mapping != NULL) {
                         struct ll_async_page *llap = llap_cast_private(page);
                         // checking again to account for writeback's lock_page()
                         LL_CDEBUG_PAGE(D_PAGE, page, "truncating\n");
index 30270ee..72510d0 100755 (executable)
@@ -238,7 +238,7 @@ test_18a() {
 
     do_facet client cp /etc/termcap $f
     sync
-    local osc2dev=`grep ${ost2_svc}-osc-MDT0000 $LPROC/devices | awk '{print $1}'`
+    local osc2dev=`grep ${ost2_svc}-osc- $LPROC/devices | egrep -v 'MDT' | awk '{print $1}'`
     $LCTL --device $osc2dev deactivate || return 3
     # my understanding is that there should be nothing in the page
     # cache after the client reconnects?