Whamcloud - gitweb
LU-12635 build: Support for gcc -Wimplicit-fallthrough
[fs/lustre-release.git] / lustre / include / lustre_update.h
index bed00f9..78cd3d4 100644 (file)
@@ -20,7 +20,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright (c) 2013, 2016, Intel Corporation.
+ * Copyright (c) 2013, 2017, Intel Corporation.
  */
 /*
  * lustre/include/lustre_update.h
@@ -34,7 +34,6 @@
 #include <lustre_net.h>
 #include <obj_update.h>
 
-#define OUT_UPDATE_INIT_BUFFER_SIZE    4096
 #define OUT_UPDATE_REPLY_SIZE          4096
 #define OUT_BULK_BUFFER_SIZE           4096
 
@@ -242,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;
        }
 
@@ -461,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);