Whamcloud - gitweb
LU-13124 scrub: check for multiple linked file
[fs/lustre-release.git] / lustre / include / lustre_update.h
index eb1f139..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
@@ -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);