Whamcloud - gitweb
LU-6158 mdt: always shrink_capsule in getxattr_all
[fs/lustre-release.git] / lustre / osp / osp_precreate.c
index a377c4d..cac5bf2 100644 (file)
@@ -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
@@ -206,7 +207,7 @@ static int osp_statfs_update(struct osp_device *d)
        d->opd_statfs_fresh_till = cfs_time_shift(obd_timeout * 1000);
        d->opd_statfs_update_in_progress = 1;
 
-       ptlrpcd_add_req(req, PDL_POLICY_ROUND, -1);
+       ptlrpcd_add_req(req);
 
        RETURN(0);
 }
@@ -216,7 +217,7 @@ static int osp_statfs_update(struct osp_device *d)
  *
  * If cached statfs data claim no free space, but OSP has got a request to
  * destroy an object (so release some space probably), then we may need to
- * refresh cached statfs data sooner then planned. The function checks there
+ * refresh cached statfs data sooner than planned. The function checks there
  * is no statfs update going and schedules immediate update if so.
  * XXX: there might be a case where removed object(s) do not add free space (empty
  * object). If the number of such deletions is high, then we can start to update
@@ -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