Whamcloud - gitweb
b=24267 wirecheck fix for OBD_FL_MMAP
[fs/lustre-release.git] / lustre / osc / osc_dev.c
index 8d63452..a0216e3 100644 (file)
@@ -26,7 +26,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  */
 /*
@@ -92,7 +92,7 @@ struct lu_kmem_descr osc_caches[] = {
         }
 };
 
-struct lock_class_key osc_ast_guard_class;
+cfs_lock_class_key_t osc_ast_guard_class;
 
 /*****************************************************************************
  *
@@ -182,6 +182,9 @@ static const struct cl_device_operations osc_cl_ops = {
 static int osc_device_init(const struct lu_env *env, struct lu_device *d,
                            const char *name, struct lu_device *next)
 {
+        struct osc_device *od = lu2osc_dev(d);
+
+        od->od_lockless_truncate = 1;
         RETURN(0);
 }