Whamcloud - gitweb
LU-1199 build: Assume that ldiskfs PDO is now standard
[fs/lustre-release.git] / lustre / osd-ldiskfs / osd_handler.c
index e2575f0..2622a35 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2011, 2012, Whamcloud, Inc.
+ * Copyright (c) 2011, 2012, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
 #include <md_object.h>
 #include <lustre_quota.h>
 
-#ifdef HAVE_LDISKFS_PDO
 int ldiskfs_pdo = 1;
 CFS_MODULE_PARM(ldiskfs_pdo, "i", int, 0644,
                 "ldiskfs with parallel directory operations");
-#else
-int ldiskfs_pdo = 0;
-#endif
 
 static const char dot[] = ".";
 static const char dotdot[] = "..";
@@ -533,8 +529,7 @@ static void osd_th_started(struct osd_thandle *oth)
 
 /**
  * Helper function to convert time interval to microseconds packed in
- * long int (default time units for the counter in "stats" initialized
- * by lu_time_init() )
+ * long int.
  */
 static long interval_to_usec(cfs_time_t start, cfs_time_t end)
 {
@@ -4461,7 +4456,7 @@ static struct lu_device *osd_device_fini(const struct lu_env *env,
 
        rc = osd_shutdown(env, osd_dev(d));
 
-        osd_compat_fini(osd_dev(d));
+       osd_obj_map_fini(osd_dev(d));
 
         shrink_dcache_sb(osd_sb(osd_dev(d)));
         osd_sync(env, lu2dt_dev(d));
@@ -4522,7 +4517,7 @@ static int osd_device_init0(const struct lu_env *env,
        strncpy(o->od_svname, lustre_cfg_string(cfg, 4),
                        sizeof(o->od_svname) - 1);
 
-       rc = osd_compat_init(o);
+       rc = osd_obj_map_init(o);
        if (rc != 0)
                GOTO(out_scrub, rc);
 
@@ -4559,7 +4554,7 @@ out_procfs:
 out_site:
        lu_site_fini(&o->od_site);
 out_compat:
-       osd_compat_fini(o);
+       osd_obj_map_fini(o);
 out_scrub:
        osd_scrub_cleanup(env, o);
 out_mnt:
@@ -4586,6 +4581,9 @@ static struct lu_device *osd_device_alloc(const struct lu_env *env,
 
        rc = dt_device_init(&o->od_dt_dev, t);
        if (rc == 0) {
+               /* Because the ctx might be revived in dt_device_init,
+                * refill the env here */
+               lu_env_refill((struct lu_env *)env);
                rc = osd_device_init0(env, o, cfg);
                if (rc)
                        dt_device_fini(&o->od_dt_dev);