* GPL HEADER END
*/
/*
- * Copyright (c) 2014, 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
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);
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++;
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,
*
* \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
* \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,
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
}
if (args->ta_args != NULL)
- OBD_FREE(args->ta_args, sizeof(args->ta_args[0]) *
- args->ta_alloc_args);
+ OBD_FREE_PTR_ARRAY(args->ta_args, args->ta_alloc_args);
if (info->uti_tur.tur_update_records != NULL)
OBD_FREE_LARGE(info->uti_tur.tur_update_records,
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);