Whamcloud - gitweb
LU-6215 llite: cleanup inode_dio_XXX functions
[fs/lustre-release.git] / lustre / osp / osp_precreate.c
index 18a9d07..ec64dae 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) 2012, 2013, Intel Corporation.
+ * Copyright (c) 2012, 2014, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -44,6 +44,7 @@
 
 #define DEBUG_SUBSYSTEM S_MDS
 
+#include <linux/kthread.h>
 #include "osp_internal.h"
 
 /*
@@ -103,7 +104,7 @@ static void osp_statfs_timer_cb(unsigned long _d)
  *
  * An interpretation callback called by ptlrpc for OST_STATFS RPC when it is
  * replied by the target. It's used to maintain statfs cache for the target.
- * The function fills data from the reply if succesfull and schedules another
+ * The function fills data from the reply if successful and schedules another
  * update.
  *
  * \param[in] env      LU environment provided by the caller
@@ -354,16 +355,15 @@ int osp_write_last_oid_seq_files(struct lu_env *env, struct osp_device *osp,
        int                   rc;
        ENTRY;
 
-       /* Note: through f_oid is only 32bits, it will also write
-        * 64 bits for oid to keep compatiblity with the previous
-        * version. */
+       /* Note: through f_oid is only 32 bits, it will also write 64 bits
+        * for oid to keep compatibility with the previous version. */
        lb_oid->lb_buf = &fid->f_oid;
-       lb_oid->lb_len = sizeof(obd_id);
-       oid_off = sizeof(obd_id) * osp->opd_index;
+       lb_oid->lb_len = sizeof(u64);
+       oid_off = sizeof(u64) * osp->opd_index;
 
        lb_oseq->lb_buf = &fid->f_seq;
-       lb_oseq->lb_len = sizeof(obd_id);
-       oseq_off = sizeof(obd_id) * osp->opd_index;
+       lb_oseq->lb_len = sizeof(u64);
+       oseq_off = sizeof(u64) * osp->opd_index;
 
        th = dt_trans_create(env, osp->opd_storage);
        if (IS_ERR(th))
@@ -1433,7 +1433,7 @@ int osp_precreate_get_fid(const struct lu_env *env, struct osp_device *d,
 }
 
 /*
- * Set size regular attribute on a object
+ * Set size regular attribute on an object
  *
  * When a striping is created late, it's possible that size is already
  * initialized on the file. Then the new striping should inherit size