Whamcloud - gitweb
LU-12635 build: Support for gcc -Wimplicit-fallthrough
[fs/lustre-release.git] / lustre / target / update_records.c
index ab09e4f..5fb706c 100644 (file)
@@ -20,7 +20,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright (c) 2014, 2015, Intel Corporation.
+ * Copyright (c) 2015, 2017, Intel Corporation.
  */
 
 /*
 #define DEBUG_SUBSYSTEM S_CLASS
 
 #include <lu_target.h>
+#include <lustre_obdo.h>
 #include <lustre_update.h>
 #include <obd.h>
 #include <obd_class.h>
+
 #include "tgt_internal.h"
 
 #define UPDATE_RECORDS_BUFFER_SIZE     8192
@@ -66,7 +68,7 @@ void update_records_dump(const struct update_records *records,
        struct update_params    *params = NULL;
        unsigned int            i;
 
-       CDEBUG(mask, "master transno = "LPU64" batchid = "LPU64" flags = %x"
+       CDEBUG(mask, "master transno = %llu batchid = %llu flags = %x"
               " ops = %d params = %d\n", records->ur_master_transno,
               records->ur_batchid, records->ur_flags, records->ur_update_count,
               records->ur_param_count);
@@ -346,7 +348,6 @@ int update_records_create_pack(const struct lu_env *env,
                obdo = &update_env_info(env)->uti_obdo;
                obdo->o_valid = 0;
                obdo_from_la(obdo, attr, attr->la_valid);
-               lustre_set_wire_obdo(NULL, obdo, obdo);
                bufs[buf_count] = obdo;
                sizes[buf_count] = sizeof(*obdo);
                buf_count++;
@@ -420,7 +421,6 @@ int update_records_attr_set_pack(const struct lu_env *env,
 
        obdo->o_valid = 0;
        obdo_from_la(obdo, attr, attr->la_valid);
-       lustre_set_wire_obdo(NULL, obdo, obdo);
        return update_records_update_pack(env, fid, OUT_ATTR_SET, ops, op_count,
                                          max_ops_size, params, param_count,
                                          max_param_size, 1,
@@ -564,12 +564,12 @@ EXPORT_SYMBOL(update_records_ref_del_pack);
  *
  * \retval             size of object destroy update.
  */
-size_t update_records_object_destroy_size(const struct lu_env *env,
+size_t update_records_destroy_size(const struct lu_env *env,
                                          const struct lu_fid *fid)
 {
        return update_records_update_size(0, NULL);
 }
-EXPORT_SYMBOL(update_records_object_destroy_size);
+EXPORT_SYMBOL(update_records_destroy_size);
 
 /**
  * Pack object destroy update
@@ -588,7 +588,7 @@ EXPORT_SYMBOL(update_records_object_destroy_size);
  * \retval             0 if packing succeeds.
  * \retval             negative errno if packing fails.
  */
-int update_records_object_destroy_pack(const struct lu_env *env,
+int update_records_destroy_pack(const struct lu_env *env,
                                       struct update_ops *ops,
                                       unsigned int *op_count,
                                       size_t *max_ops_size,
@@ -601,7 +601,7 @@ int update_records_object_destroy_pack(const struct lu_env *env,
                                          max_ops_size, params, param_count,
                                          max_param_size, 0, NULL, NULL);
 }
-EXPORT_SYMBOL(update_records_object_destroy_pack);
+EXPORT_SYMBOL(update_records_destroy_pack);
 
 /**
  * Calculate index insert update size
@@ -1217,7 +1217,7 @@ static void update_key_fini(const struct lu_context *ctx,
 LU_KEY_INIT(update, struct update_thread_info);
 /* context key: update_thread_key */
 LU_CONTEXT_KEY_DEFINE(update, LCT_MD_THREAD | LCT_MG_THREAD |
-                             LCT_DT_THREAD | LCT_TX_HANDLE | LCT_LOCAL);
+                             LCT_DT_THREAD | LCT_LOCAL);
 EXPORT_SYMBOL(update_thread_key);
 LU_KEY_INIT_GENERIC(update);