Whamcloud - gitweb
b=21563 Metadata performance has degraded for some operations between 1.6.5 and 1.8.1
[fs/lustre-release.git] / lustre / cmm / mdc_device.c
index 51386de..339540b 100644 (file)
@@ -26,7 +26,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright  2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  */
 /*
@@ -151,7 +151,8 @@ static int mdc_obd_add(const struct lu_env *env,
                                          OBD_CONNECT_IBITS |
                                          OBD_CONNECT_MDS_MDS |
                                          OBD_CONNECT_FID |
-                                         OBD_CONNECT_AT;
+                                         OBD_CONNECT_AT |
+                                         OBD_CONNECT_FULL20;
                 rc = obd_connect(env, &desc->cl_exp, mdc, &mdc->obd_uuid, ocd, NULL);
                 OBD_FREE_PTR(ocd);
                 if (rc) {
@@ -286,7 +287,7 @@ static struct lu_device *mdc_device_alloc(const struct lu_env *env,
                 mc->mc_md_dev.md_ops = &mdc_md_ops;
                 ld = mdc2lu_dev(mc);
                 ld->ld_ops = &mdc_lu_ops;
-                sema_init(&mc->mc_fid_sem, 1);
+                cfs_sema_init(&mc->mc_fid_sem, 1);
         }
 
         RETURN (ld);
@@ -297,9 +298,9 @@ static struct lu_device *mdc_device_free(const struct lu_env *env,
 {
         struct mdc_device *mc = lu2mdc_dev(ld);
 
-        LASSERTF(atomic_read(&ld->ld_ref) == 0,
-                 "Refcount = %i\n", atomic_read(&ld->ld_ref));
-        LASSERT(list_empty(&mc->mc_linkage));
+        LASSERTF(cfs_atomic_read(&ld->ld_ref) == 0,
+                 "Refcount = %i\n", cfs_atomic_read(&ld->ld_ref));
+        LASSERT(cfs_list_empty(&mc->mc_linkage));
         md_device_fini(&mc->mc_md_dev);
         OBD_FREE_PTR(mc);
         return NULL;