#include <obd_cksum.h>
#include <md_object.h>
#include <lustre_lfsck.h>
+#include <lustre_nodemap.h>
#include "tgt_internal.h"
struct ost_body *body;
struct req_capsule *pill = tsi->tsi_pill;
struct lustre_capa *capa;
+ struct lu_nodemap *nodemap;
int rc;
ENTRY;
if (rc)
RETURN(rc);
+ nodemap = tsi->tsi_exp->exp_target_data.ted_nodemap;
+
+ body->oa.o_uid = nodemap_map_id(nodemap, NODEMAP_UID,
+ NODEMAP_CLIENT_TO_FS,
+ body->oa.o_uid);
+ body->oa.o_gid = nodemap_map_id(nodemap, NODEMAP_GID,
+ NODEMAP_CLIENT_TO_FS,
+ body->oa.o_gid);
+
if (body->oa.o_valid & OBD_MD_FLOSSCAPA) {
capa = req_capsule_client_get(pill, &RMF_CAPA1);
if (capa == NULL) {
case OUT_UPDATE:
case SEQ_QUERY:
case FLD_QUERY:
+ case FLD_READ:
case LDLM_ENQUEUE:
case OST_CREATE:
case OST_DESTROY:
* -ve: abort immediately with the given error code;
* 0: send reply with error code in req->rq_status;
*/
-int tgt_handle_recovery(struct ptlrpc_request *req, int reply_fail_id)
+static int tgt_handle_recovery(struct ptlrpc_request *req, int reply_fail_id)
{
ENTRY;
/*
* OBD_IDX_READ handler
*/
-int tgt_obd_idx_read(struct tgt_session_info *tsi)
+static int tgt_obd_idx_read(struct tgt_session_info *tsi)
{
struct tgt_thread_info *tti = tgt_th_info(tsi->tsi_env);
struct lu_rdpg *rdpg = &tti->tti_u.rdpg.tti_rdpg;
/* Ensure that data and metadata are synced to the disk when lock is cancelled
* (if requested) */
-int tgt_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc,
- void *data, int flag)
+static int tgt_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc,
+ void *data, int flag)
{
struct lu_env env;
struct lu_target *tgt;
RETURN(rc);
}
-struct ldlm_callback_suite tgt_dlm_cbs = {
+static struct ldlm_callback_suite tgt_dlm_cbs = {
.lcs_completion = ldlm_server_completion_ast,
.lcs_blocking = tgt_blocking_ast,
.lcs_glimpse = ldlm_server_glimpse_ast
* sec context handlers
*/
/* XXX: Implement based on mdt_sec_ctx_handle()? */
-int tgt_sec_ctx_handle(struct tgt_session_info *tsi)
+static int tgt_sec_ctx_handle(struct tgt_session_info *tsi)
{
return 0;
}
int (*tgt_lfsck_in_notify)(const struct lu_env *env,
struct dt_device *key,
- struct lfsck_request *lr) = NULL;
+ struct lfsck_request *lr,
+ struct thandle *th) = NULL;
void tgt_register_lfsck_in_notify(int (*notify)(const struct lu_env *,
struct dt_device *,
- struct lfsck_request *))
+ struct lfsck_request *,
+ struct thandle *))
{
tgt_lfsck_in_notify = notify;
}
if (lr == NULL)
RETURN(-EPROTO);
- rc = tgt_lfsck_in_notify(env, key, lr);
+ rc = tgt_lfsck_in_notify(env, key, lr, NULL);
RETURN(rc);
}