* GPL HEADER END
*/
/*
- * Copyright (c) 2014, 2015, Intel Corporation.
+ * Copyright (c) 2014, 2017, Intel Corporation.
*/
/*
* lustre/target/out_lib.c
[OUT_ATTR_GET] = "attr_get",
[OUT_XATTR_SET] = "xattr_set",
[OUT_XATTR_GET] = "xattr_get",
+ [OUT_XATTR_LIST] = "xattr_list",
[OUT_INDEX_LOOKUP] = "lookup",
[OUT_INDEX_INSERT] = "insert",
[OUT_INDEX_DELETE] = "delete",
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 */
obdo->o_valid = 0;
obdo_from_la(obdo, attr, attr->la_valid);
- lustre_set_wire_obdo(NULL, obdo, obdo);
if (parent_fid != NULL) {
struct lu_fid *tmp;
obdo->o_valid = 0;
obdo_from_la(obdo, attr, attr->la_valid);
- lustre_set_wire_obdo(NULL, obdo, obdo);
RETURN(0);
}
}
EXPORT_SYMBOL(out_index_delete_pack);
-int out_object_destroy_pack(const struct lu_env *env,
- struct object_update *update,
- size_t *max_update_size, const struct lu_fid *fid)
+int out_destroy_pack(const struct lu_env *env, struct object_update *update,
+ size_t *max_update_size, const struct lu_fid *fid)
{
return out_update_pack(env, update, max_update_size, OUT_DESTROY, fid,
0, NULL, NULL, 0);
}
-EXPORT_SYMBOL(out_object_destroy_pack);
+EXPORT_SYMBOL(out_destroy_pack);
int out_write_pack(const struct lu_env *env, struct object_update *update,
size_t *max_update_size, const struct lu_fid *fid,
}
EXPORT_SYMBOL(out_xattr_get_pack);
+int out_xattr_list_pack(const struct lu_env *env, struct object_update *update,
+ size_t *max_update_size, const struct lu_fid *fid,
+ const int bufsize)
+{
+ return out_update_pack(env, update, max_update_size, OUT_XATTR_LIST,
+ fid, 0, NULL, NULL, bufsize);
+}
+EXPORT_SYMBOL(out_xattr_list_pack);
+
int out_read_pack(const struct lu_env *env, struct object_update *update,
size_t *max_update_size, const struct lu_fid *fid,
size_t size, loff_t pos)
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))
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++;
}
return -ENOTDIR;
dt_write_lock(env, dt_obj, MOR_TGT_CHILD);
- rc = dt_insert(env, dt_obj, rec, key, th, 0);
+ rc = dt_insert(env, dt_obj, rec, key, th);
dt_write_unlock(env, dt_obj);
return rc;