X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Finclude%2Flustre_update.h;h=78cd3d4bfdd5190667774d291a0b3d751ebfca84;hb=0c1ae1cb9c19f8a4f6c5a7ff6a1fd54807430795;hp=eb1f139026c53909d4e02920534f7b76408c9b1e;hpb=1f50b1e494ff1b4988508c6d6398ee6769467931;p=fs%2Flustre-release.git diff --git a/lustre/include/lustre_update.h b/lustre/include/lustre_update.h index eb1f139..78cd3d4 100644 --- a/lustre/include/lustre_update.h +++ b/lustre/include/lustre_update.h @@ -20,7 +20,7 @@ * GPL HEADER END */ /* - * Copyright (c) 2013, 2016, Intel Corporation. + * Copyright (c) 2013, 2017, Intel Corporation. */ /* * lustre/include/lustre_update.h @@ -241,20 +241,14 @@ object_update_result_insert(struct object_update_reply *reply, int rc) { struct object_update_result *update_result; - char *ptr; update_result = object_update_result_get(reply, index, NULL); LASSERT(update_result); update_result->our_rc = ptlrpc_status_hton(rc); if (rc >= 0) { - if (data_len > 0) { - LASSERT(data); - - ptr = (char *)update_result + - cfs_size_round(sizeof(struct object_update_reply)); - memcpy(ptr, data, data_len); - } + if (data_len > 0 && data) + memcpy(update_result->our_data, data, data_len); update_result->our_datalen = data_len; } @@ -460,6 +454,9 @@ int out_xattr_get_pack(const struct lu_env *env, struct object_update *update, size_t *max_update_size, const struct lu_fid *fid, const char *name, const int bufsize); +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); int out_read_pack(const struct lu_env *env, struct object_update *update, size_t *max_update_length, const struct lu_fid *fid, size_t size, loff_t pos);