Whamcloud - gitweb
LU-10629 lod: Clear OST pool with setstripe
[fs/lustre-release.git] / lustre / target / out_lib.c
index c267ed2..d1fcffd 100644 (file)
@@ -20,7 +20,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright (c) 2014, 2015, Intel Corporation.
+ * Copyright (c) 2014, 2017, Intel Corporation.
  */
 /*
  * lustre/target/out_lib.c
@@ -102,7 +102,7 @@ int out_update_header_pack(const struct lu_env *env,
        unsigned int                    i;
        size_t                          update_size;
 
-       if (((reply_size + 7) >> 3) >= 1ULL << 16)
+       if (reply_size  >= LNET_MTU)
                return -EINVAL;
 
        /* Check whether the packing exceeding the maxima update length */
@@ -657,6 +657,10 @@ int out_attr_set_add_exec(const struct lu_env *env, struct dt_object *dt_obj,
        if (rc != 0)
                return rc;
 
+       if (attr->la_valid & LA_FLAGS &&
+           attr->la_flags & LUSTRE_SET_SYNC_FL)
+               th->th_sync |= 1;
+
        arg = tx_add_exec(ta, out_tx_attr_set_exec, out_tx_attr_set_undo,
                          file, line);
        if (IS_ERR(arg))
@@ -797,8 +801,7 @@ static int out_tx_xattr_set_exec(const struct lu_env *env,
 
                                lu_buf_free(&tbuf);
                                if (update) {
-                                       leh->leh_overflow_time =
-                                                       cfs_time_current_sec();
+                                       leh->leh_overflow_time = ktime_get_real_seconds();
                                        if (unlikely(!leh->leh_overflow_time))
                                                leh->leh_overflow_time++;
                                }