From 63e42d84b526602a7d8fa4d75c638dbefb66128b Mon Sep 17 00:00:00 2001 From: tappro Date: Thu, 5 Oct 2006 22:56:47 +0000 Subject: [PATCH] - fix issue with returning result of fs operation as rc with ptlrpc_error() as result. The error codes in mdt can be distinguished by ESERIOUS flag. It means serious error while processing request, otherwise the rc = 0 and rq_status contains result. this is possible fix for 11012. --- lustre/fid/fid_handler.c | 6 +-- lustre/fld/fld_handler.c | 10 ++-- lustre/include/lu_object.h | 20 ++++++++ lustre/mdt/mdt_handler.c | 118 +++++++++++++++++++++++++++------------------ lustre/mdt/mdt_open.c | 19 ++++---- lustre/mdt/mdt_reint.c | 8 +-- lustre/mdt/mdt_xattr.c | 14 +++--- 7 files changed, 120 insertions(+), 75 deletions(-) diff --git a/lustre/fid/fid_handler.c b/lustre/fid/fid_handler.c index c09adc5..391a7d1 100644 --- a/lustre/fid/fid_handler.c +++ b/lustre/fid/fid_handler.c @@ -326,7 +326,7 @@ static int seq_req_handle(struct ptlrpc_request *req, const struct lu_env *env, rc = req_capsule_pack(&info->sti_pill); if (rc) - RETURN(rc); + RETURN(err_serious(rc)); opc = req_capsule_client_get(&info->sti_pill, &RMF_SEQ_OPC); @@ -334,7 +334,7 @@ static int seq_req_handle(struct ptlrpc_request *req, const struct lu_env *env, out = req_capsule_server_get(&info->sti_pill, &RMF_SEQ_RANGE); if (out == NULL) - RETURN(-EPROTO); + RETURN(err_serious(-EPROTO)); if (lustre_msg_get_flags(req->rq_reqmsg) & MSG_REPLAY) { in = req_capsule_client_get(&info->sti_pill, @@ -345,7 +345,7 @@ static int seq_req_handle(struct ptlrpc_request *req, const struct lu_env *env, rc = seq_server_handle(site, env, *opc, in, out); } else - rc = -EPROTO; + rc = err_serious(-EPROTO); RETURN(rc); } diff --git a/lustre/fld/fld_handler.c b/lustre/fld/fld_handler.c index 02018a9..738289e 100644 --- a/lustre/fld/fld_handler.c +++ b/lustre/fld/fld_handler.c @@ -174,7 +174,7 @@ static int fld_req_handle(struct ptlrpc_request *req, struct lu_site *site; struct md_fld *in; struct md_fld *out; - int rc = -EPROTO; + int rc; __u32 *opc; ENTRY; @@ -182,23 +182,23 @@ static int fld_req_handle(struct ptlrpc_request *req, rc = req_capsule_pack(&info->fti_pill); if (rc) - RETURN(rc); + RETURN(err_serious(rc)); opc = req_capsule_client_get(&info->fti_pill, &RMF_FLD_OPC); if (opc != NULL) { in = req_capsule_client_get(&info->fti_pill, &RMF_FLD_MDFLD); if (in == NULL) - RETURN(-EPROTO); + RETURN(err_serious(-EPROTO)); out = req_capsule_server_get(&info->fti_pill, &RMF_FLD_MDFLD); if (out == NULL) - RETURN(-EPROTO); + RETURN(err_serious(-EPROTO)); *out = *in; rc = fld_server_handle(site->ls_server_fld, req->rq_svc_thread->t_env, *opc, out, info); } else - rc = -EPROTO; + rc = err_serious(-EPROTO); RETURN(rc); } diff --git a/lustre/include/lu_object.h b/lustre/include/lu_object.h index ca5e426..29e5838 100644 --- a/lustre/include/lu_object.h +++ b/lustre/include/lu_object.h @@ -31,6 +31,26 @@ #include #include +#define ESERIOUS 0x0001000 +static inline int err_serious(int rc) +{ + LASSERT(rc < 0); + LASSERT(-rc < ESERIOUS); + return -(-rc | ESERIOUS); +} + +static inline int clear_serious(int rc) +{ + if (rc < 0) + rc = -(-rc & ~ESERIOUS); + return rc; +} + +static inline int is_serious(int rc) +{ + return (rc < 0 && -rc & ESERIOUS); +} + /* * Layered objects support for CMD3/C5. */ diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index eaa427f..c37376f 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -163,7 +163,7 @@ static int mdt_getstatus(struct mdt_thread_info *info) ENTRY; if (MDT_FAIL_CHECK(OBD_FAIL_MDS_GETSTATUS_PACK)) - RETURN(-ENOMEM); + RETURN(err_serious(-ENOMEM)); body = req_capsule_server_get(&info->mti_pill, &RMF_MDT_BODY); rc = next->md_ops->mdo_root_get(info->mti_env, next, &body->fid1); @@ -206,7 +206,7 @@ static int mdt_statfs(struct mdt_thread_info *info) if (MDT_FAIL_CHECK(OBD_FAIL_MDS_STATFS_PACK)) { - rc = -ENOMEM; + rc = err_serious(-ENOMEM); } else { osfs = req_capsule_server_get(&info->mti_pill,&RMF_OBD_STATFS); /* XXX max_age optimisation is needed here. See mds_statfs */ @@ -214,7 +214,6 @@ static int mdt_statfs(struct mdt_thread_info *info) &info->mti_u.ksfs); statfs_pack(osfs, &info->mti_u.ksfs); } - RETURN(rc); } @@ -286,7 +285,7 @@ static int mdt_getattr_internal(struct mdt_thread_info *info, ENTRY; if (MDT_FAIL_CHECK(OBD_FAIL_MDS_GETATTR_PACK)) - RETURN(-ENOMEM); + RETURN(err_serious(-ENOMEM)); repbody = req_capsule_server_get(pill, &RMF_MDT_BODY); repbody->eadatasize = 0; @@ -546,7 +545,7 @@ static int mdt_getattr_name_lock(struct mdt_thread_info *info, LASSERT(info->mti_object != NULL); name = req_capsule_client_get(&info->mti_pill, &RMF_NAME); if (name == NULL) - RETURN(-EFAULT); + RETURN(err_serious(-EFAULT)); CDEBUG(D_INODE, "getattr with lock for "DFID"/%s, ldlm_rep = %p\n", PFID(mdt_object_fid(parent)), name, ldlm_rep); @@ -690,7 +689,7 @@ static int mdt_getattr_name(struct mdt_thread_info *info) reqbody = req_capsule_client_get(&info->mti_pill, &RMF_MDT_BODY); if (reqbody == NULL) - GOTO(out, rc = -EFAULT); + GOTO(out, rc = err_serious(-EFAULT)); rc = mdt_init_ucred(info, reqbody); if (rc) @@ -726,13 +725,19 @@ static int mdt_connect(struct mdt_thread_info *info) LASSERT(req->rq_export != NULL); info->mti_mdt = mdt_dev(req->rq_export->exp_obd->obd_lu_dev); rc = mdt_init_idmap(info); - } + } else + rc = err_serious(rc); return rc; } static int mdt_disconnect(struct mdt_thread_info *info) { - return target_handle_disconnect(mdt_info_req(info)); + int rc; + + rc = target_handle_disconnect(mdt_info_req(info)); + if (rc) + rc = err_serious(rc); + return rc; } static int mdt_sendpage(struct mdt_thread_info *info, @@ -867,11 +872,11 @@ static int mdt_writepage(struct mdt_thread_info *info) reqbody = req_capsule_client_get(&info->mti_pill, &RMF_MDT_BODY); if (reqbody == NULL) - RETURN(-EFAULT); + RETURN(err_serious(-EFAULT)); desc = ptlrpc_prep_bulk_exp (req, 1, BULK_GET_SINK, MDS_BULK_PORTAL); if (!desc) - RETURN(-ENOMEM); + RETURN(err_serious(-ENOMEM)); /* allocate the page for the desc */ page = alloc_pages(GFP_KERNEL, 0); @@ -946,12 +951,12 @@ static int mdt_readpage(struct mdt_thread_info *info) ENTRY; if (MDT_FAIL_CHECK(OBD_FAIL_MDS_READPAGE_PACK)) - RETURN(-ENOMEM); + RETURN(err_serious(-ENOMEM)); reqbody = req_capsule_client_get(&info->mti_pill, &RMF_MDT_BODY); repbody = req_capsule_server_get(&info->mti_pill, &RMF_MDT_BODY); if (reqbody == NULL || repbody == NULL) - RETURN(-EFAULT); + RETURN(err_serious(-EFAULT)); rc = mdt_init_ucred(info, reqbody); if (rc) @@ -1028,7 +1033,7 @@ static int mdt_reint_internal(struct mdt_thread_info *info, rc = req_capsule_pack(pill); if (rc != 0) { CERROR("Can't pack response, rc %d\n", rc); - RETURN(rc); + RETURN(err_serious(rc)); } /* @@ -1037,12 +1042,12 @@ static int mdt_reint_internal(struct mdt_thread_info *info, * and will get oops. */ if (MDT_FAIL_CHECK(OBD_FAIL_MDS_REINT_UNPACK)) - RETURN(-EFAULT); + RETURN(err_serious(-EFAULT)); rc = mdt_reint_unpack(info, op); if (rc != 0) { CERROR("Can't unpack reint, rc %d\n", rc); - RETURN(rc); + RETURN(err_serious(rc)); } rc = mdt_init_ucred_reint(info); @@ -1079,15 +1084,17 @@ static long mdt_reint_opcode(struct mdt_thread_info *info, __u32 *ptr; long opc; - opc = -EFAULT; + opc = err_serious(-EFAULT); ptr = req_capsule_client_get(&info->mti_pill, &RMF_REINT_OPC); if (ptr != NULL) { opc = *ptr; DEBUG_REQ(D_INODE, mdt_info_req(info), "reint opt = %ld", opc); if (opc < REINT_MAX && fmt[opc] != NULL) req_capsule_extend(&info->mti_pill, fmt[opc]); - else + else { CERROR("Unsupported opc: %ld\n", opc); + opc = err_serious(opc); + } } return opc; } @@ -1149,16 +1156,18 @@ static int mdt_sync(struct mdt_thread_info *info) body = req_capsule_client_get(pill, &RMF_MDT_BODY); if (body == NULL) - RETURN(-EINVAL); + RETURN(err_serious(-EINVAL)); if (MDT_FAIL_CHECK(OBD_FAIL_MDS_SYNC_PACK)) - RETURN(-ENOMEM); + RETURN(err_serious(-ENOMEM)); if (fid_seq(&body->fid1) == 0) { /* sync the whole device */ rc = req_capsule_pack(pill); if (rc == 0) rc = mdt_device_sync(info); + else + rc = err_serious(rc); } else { /* sync an object */ rc = mdt_unpack_req_pack_rep(info, HABEO_CORPUS|HABEO_REFERO); @@ -1181,19 +1190,20 @@ static int mdt_sync(struct mdt_thread_info *info) mdt_body_reverse_idmap(info, body); } } - } + } else + rc = err_serious(rc); } RETURN(rc); } static int mdt_quotacheck_handle(struct mdt_thread_info *info) { - return -EOPNOTSUPP; + return err_serious(-EOPNOTSUPP); } static int mdt_quotactl_handle(struct mdt_thread_info *info) { - return -EOPNOTSUPP; + return err_serious(-EOPNOTSUPP); } /* @@ -1204,17 +1214,19 @@ static int mdt_obd_ping(struct mdt_thread_info *info) int rc; ENTRY; rc = target_handle_ping(mdt_info_req(info)); + if (rc < 0) + rc = err_serious(rc); RETURN(rc); } static int mdt_obd_log_cancel(struct mdt_thread_info *info) { - return -EOPNOTSUPP; + return err_serious(-EOPNOTSUPP); } static int mdt_obd_qc_callback(struct mdt_thread_info *info) { - return -EOPNOTSUPP; + return err_serious(-EOPNOTSUPP); } @@ -1248,7 +1260,7 @@ static int mdt_enqueue(struct mdt_thread_info *info) rc = ldlm_handle_enqueue0(info->mti_mdt->mdt_namespace, req, info->mti_dlm_req, &cbs); info->mti_fail_id = OBD_FAIL_LDLM_REPLY; - return rc ? : req->rq_status; + return rc ? err_serious(rc) : req->rq_status; } static int mdt_convert(struct mdt_thread_info *info) @@ -1259,21 +1271,21 @@ static int mdt_convert(struct mdt_thread_info *info) LASSERT(info->mti_dlm_req); req = mdt_info_req(info); rc = ldlm_handle_convert0(req, info->mti_dlm_req); - return rc ? : req->rq_status; + return rc ? err_serious(rc) : req->rq_status; } static int mdt_bl_callback(struct mdt_thread_info *info) { CERROR("bl callbacks should not happen on MDS\n"); LBUG(); - return -EOPNOTSUPP; + return err_serious(-EOPNOTSUPP); } static int mdt_cp_callback(struct mdt_thread_info *info) { CERROR("cp callbacks should not happen on MDS\n"); LBUG(); - return -EOPNOTSUPP; + return err_serious(-EOPNOTSUPP); } /* @@ -1566,7 +1578,7 @@ static inline void mdt_finish_reply(struct mdt_thread_info *info, int rc) static int mdt_req_handle(struct mdt_thread_info *info, struct mdt_handler *h, struct ptlrpc_request *req) { - int rc; + int rc, serious = 0; __u32 flags; ENTRY; @@ -1605,6 +1617,7 @@ static int mdt_req_handle(struct mdt_thread_info *info, if (rc == 0 && flags & MUTABOR && req->rq_export->exp_connect_flags & OBD_CONNECT_RDONLY) + /* should it be rq_status? */ rc = -EROFS; if (rc == 0 && flags & HABEO_CLAVIS) { @@ -1624,23 +1637,27 @@ static int mdt_req_handle(struct mdt_thread_info *info, } } - if (rc == 0) + if (rc == 0) { /* - * Process request. + * Process request, there can be two types of rc: + * 1) errors with msg unpack/pack, other failures outside the + * operation itself. This is counted as serious errors; + * 2) errors during fs operation, should be placed in rq_status + * only */ rc = h->mh_act(info); + serious = is_serious(rc); + rc = clear_serious(rc); + } else + serious = 1; req->rq_status = rc; /* - * It is not correct to zero @rc out here unconditionally. First of all, - * for error cases, we do not need target_committed_to_req(req). Second - * reason is that, @rc is passed to target_send_reply() and used for - * figuring out what should be done about reply in capricular case. We - * only zero it out for ELDLM_* codes which > 0 because they do not - * support invariant of marking req as difficult only in case of error. + * ELDLM_* codes which > 0 should be in rq_status only as well as + * all non-serious errors. */ - if (rc > 0) + if (rc > 0 || !serious) rc = 0; LASSERT(current->journal_info == NULL); @@ -1655,7 +1672,7 @@ static int mdt_req_handle(struct mdt_thread_info *info, } /* If we're DISCONNECTing, the mdt_export_data is already freed */ - if (h->mh_opc != MDS_DISCONNECT) + if (rc == 0 && h->mh_opc != MDS_DISCONNECT) target_committed_to_req(req); RETURN(rc); @@ -1793,6 +1810,13 @@ static int mdt_reply(struct ptlrpc_request *req, int rc, struct mdt_thread_info *info) { ENTRY; + +#if 0 + if (req->rq_reply_state == NULL && rc == 0) { + req->rq_status = rc; + lustre_pack_reply(req, 1, NULL, NULL); + } +#endif target_send_reply(req, rc, info->mti_fail_id); RETURN(0); } @@ -1823,12 +1847,12 @@ static int mdt_handle0(struct ptlrpc_request *req, supported); if (h != NULL) { rc = mdt_req_handle(info, h, req); + rc = mdt_reply(req, rc, info); } else { req->rq_status = -ENOTSUPP; rc = ptlrpc_error(req); RETURN(rc); } - rc = mdt_reply(req, rc, info); } } else CERROR(LUSTRE_MDT_NAME" drops mal-formed request\n"); @@ -2157,7 +2181,7 @@ static int mdt_intent_getattr(enum mdt_it_code opcode, reqbody = req_capsule_client_get(&info->mti_pill, &RMF_MDT_BODY); if (reqbody == NULL) - GOTO(out, rc = -EFAULT); + GOTO(out, rc = err_serious(-EFAULT)); rc = mdt_init_ucred(info, reqbody); if (rc) @@ -2213,7 +2237,7 @@ static int mdt_intent_reint(enum mdt_it_code opcode, if (mdt_it_flavor[opcode].it_reint != opc) { CERROR("Reint code %ld doesn't match intent: %d\n", opc, opcode); - RETURN(-EPROTO); + RETURN(err_serious(-EPROTO)); } /* Get lock from request for possible resent case. */ @@ -2223,21 +2247,19 @@ static int mdt_intent_reint(enum mdt_it_code opcode, rep = req_capsule_server_get(&info->mti_pill, &RMF_DLM_REP); if (rep == NULL) - RETURN(-EFAULT); + RETURN(err_serious(-EFAULT)); /* MDC expects this in any case */ if (rc != 0) mdt_set_disposition(info, rep, DISP_LOOKUP_EXECD); - rep->lock_policy_res2 = rc; - /* cross-ref case, the lock should be returned to the client */ if (rc == -EREMOTE) { LASSERT(lustre_handle_is_used(&lhc->mlh_lh)); rep->lock_policy_res2 = 0; RETURN(mdt_intent_lock_replace(info, lockp, NULL, lhc, flags)); } - rep->lock_policy_res2 = rc; + rep->lock_policy_res2 = clear_serious(rc); RETURN(ELDLM_LOCK_ABORTED); } @@ -2348,11 +2370,13 @@ static int mdt_intent_policy(struct ldlm_namespace *ns, if (rc == 0) rc = ELDLM_OK; } else - rc = -EFAULT; + rc = err_serious(-EFAULT); } else { /* No intent was provided */ LASSERT(pill->rc_fmt == &RQF_LDLM_ENQUEUE); rc = req_capsule_pack(pill); + if (rc) + rc = err_serious(rc); } RETURN(rc); } diff --git a/lustre/mdt/mdt_open.c b/lustre/mdt/mdt_open.c index 5bd3caf..6e7d31c 100644 --- a/lustre/mdt/mdt_open.c +++ b/lustre/mdt/mdt_open.c @@ -620,7 +620,7 @@ static int mdt_open_by_fid(struct mdt_thread_info* info, int mdt_pin(struct mdt_thread_info* info) { ENTRY; - RETURN(-EOPNOTSUPP); + RETURN(err_serious(-EOPNOTSUPP)); } /* Cross-ref request. Currently it can only be a pure open (w/o create) */ @@ -696,7 +696,7 @@ int mdt_reint_open(struct mdt_thread_info *info, struct mdt_lock_handle *lhc) /* TODO: JOIN file */ if (create_flags & MDS_OPEN_JOIN_FILE) { CERROR("JOIN file will be supported soon\n"); - GOTO(out, result = -EOPNOTSUPP); + GOTO(out, result = err_serious(-EOPNOTSUPP)); } CDEBUG(D_INODE, "I am going to open "DFID"/("DFID":%s) " @@ -725,7 +725,7 @@ int mdt_reint_open(struct mdt_thread_info *info, struct mdt_lock_handle *lhc) } if (MDT_FAIL_CHECK(OBD_FAIL_MDS_OPEN_PACK)) - GOTO(out, result = -ENOMEM); + GOTO(out, result = err_serious(-ENOMEM)); mdt_set_disposition(info, ldlm_rep, (DISP_IT_EXECD | DISP_LOOKUP_EXECD)); @@ -957,7 +957,7 @@ int mdt_close(struct mdt_thread_info *info) /* Close may come with the Size-on-MDS update. Unpack it. */ rc = mdt_close_unpack(info); if (rc) - RETURN(rc); + RETURN(err_serious(rc)); LASSERT(info->mti_epoch); @@ -983,7 +983,8 @@ int mdt_close(struct mdt_thread_info *info) ma->ma_need = MA_INODE | MA_LOV | MA_COOKIE; repbody->eadatasize = 0; repbody->aclsize = 0; - } + } else + rc = err_serious(rc); med = &mdt_info_req(info)->rq_export->exp_mdt_data; @@ -994,7 +995,7 @@ int mdt_close(struct mdt_thread_info *info) CDEBUG(D_INODE, "no handle for file close: fid = "DFID ": cookie = "LPX64"\n", PFID(info->mti_rr.rr_fid1), info->mti_epoch->handle.cookie); - rc = -ESTALE; + rc = err_serious(-ESTALE); } else { class_handle_unhash(&mfd->mfd_handle); list_del_init(&mfd->mfd_list); @@ -1012,7 +1013,7 @@ int mdt_close(struct mdt_thread_info *info) mdt_shrink_reply(info, REPLY_REC_OFF + 1, 0, 0); if (MDT_FAIL_CHECK(OBD_FAIL_MDS_CLOSE_PACK)) - RETURN(-ENOMEM); + RETURN(err_serious(-ENOMEM)); RETURN(rc ? rc : ret); } @@ -1027,7 +1028,7 @@ int mdt_done_writing(struct mdt_thread_info *info) rc = req_capsule_pack(&info->mti_pill); if (rc) - RETURN(rc); + RETURN(err_serious(rc)); repbody = req_capsule_server_get(&info->mti_pill, &RMF_MDT_BODY); @@ -1037,7 +1038,7 @@ int mdt_done_writing(struct mdt_thread_info *info) /* Done Writing may come with the Size-on-MDS update. Unpack it. */ rc = mdt_close_unpack(info); if (rc) - RETURN(rc); + RETURN(err_serious(rc)); med = &mdt_info_req(info)->rq_export->exp_mdt_data; spin_lock(&med->med_open_lock); diff --git a/lustre/mdt/mdt_reint.c b/lustre/mdt/mdt_reint.c index eb40fe9..f7c7ae3 100644 --- a/lustre/mdt/mdt_reint.c +++ b/lustre/mdt/mdt_reint.c @@ -302,7 +302,7 @@ static int mdt_reint_create(struct mdt_thread_info *info, ENTRY; if (MDT_FAIL_CHECK(OBD_FAIL_MDS_REINT_CREATE)) - RETURN(-ESTALE); + RETURN(err_serious(-ESTALE)); switch (info->mti_attr.ma_attr.la_mode & S_IFMT) { case S_IFREG: @@ -323,7 +323,7 @@ static int mdt_reint_create(struct mdt_thread_info *info, break; } default: - rc = -EOPNOTSUPP; + rc = err_serious(-EOPNOTSUPP); } RETURN(rc); } @@ -347,7 +347,7 @@ static int mdt_reint_unlink(struct mdt_thread_info *info, rr->rr_name); if (MDT_FAIL_CHECK(OBD_FAIL_MDS_REINT_UNLINK)) - GOTO(out, rc = -ENOENT); + GOTO(out, rc = err_serious(-ENOENT)); /* step 1: lock the parent */ parent_lh = &info->mti_lh[MDT_LH_PARENT]; @@ -441,7 +441,7 @@ static int mdt_reint_link(struct mdt_thread_info *info, PFID(rr->rr_fid1), PFID(rr->rr_fid2), rr->rr_name); if (MDT_FAIL_CHECK(OBD_FAIL_MDS_REINT_LINK)) - RETURN(-ENOENT); + RETURN(err_serious(-ENOENT)); /* step 1: lock the source */ lhs = &info->mti_lh[MDT_LH_PARENT]; diff --git a/lustre/mdt/mdt_xattr.c b/lustre/mdt/mdt_xattr.c index 4c5107a..cf01193 100644 --- a/lustre/mdt/mdt_xattr.c +++ b/lustre/mdt/mdt_xattr.c @@ -144,11 +144,11 @@ int mdt_getxattr(struct mdt_thread_info *info) rc = mdt_getxattr_pack_reply(info); if (rc < 0) - RETURN(rc); + RETURN(err_serious(rc)); reqbody = req_capsule_client_get(&info->mti_pill, &RMF_MDT_BODY); if (reqbody == NULL) - RETURN(-EFAULT); + RETURN(err_serious(-EFAULT)); rc1 = mdt_init_ucred(info, reqbody); if (rc1) @@ -157,7 +157,7 @@ int mdt_getxattr(struct mdt_thread_info *info) repbody = req_capsule_server_get(&info->mti_pill, &RMF_MDT_BODY); /*No EA, just go back*/ if (rc == 0) - GOTO(no_xattr, rc); + GOTO(no_xattr, err_serious(rc)); buf = &info->mti_buf; buf->lb_buf = req_capsule_server_get(&info->mti_pill, &RMF_EADATA); @@ -272,15 +272,15 @@ int mdt_setxattr(struct mdt_thread_info *info) CDEBUG(D_INODE, "setxattr "DFID"\n", PFID(&body->fid1)); if (MDT_FAIL_CHECK(OBD_FAIL_MDS_SETXATTR)) - RETURN(-ENOMEM); + RETURN(err_serious(-ENOMEM)); rc = mdt_setxattr_pack_reply(info); if (rc < 0) - RETURN(rc); + RETURN(err_serious(rc)); reqbody = req_capsule_client_get(pill, &RMF_MDT_BODY); if (reqbody == NULL) - RETURN(-EFAULT); + RETURN(err_serious(-EFAULT)); rc = mdt_init_ucred(info, reqbody); if (rc) @@ -289,7 +289,7 @@ int mdt_setxattr(struct mdt_thread_info *info) /* various sanity check for xattr name */ xattr_name = req_capsule_client_get(pill, &RMF_NAME); if (!xattr_name) - GOTO(out, rc = -EFAULT); + GOTO(out, rc = err_serious(-EFAULT)); CDEBUG(D_INODE, "%s xattr %s\n", body->valid & OBD_MD_FLXATTR ? "set" : "remove", xattr_name); -- 1.8.3.1