From bc13a524eaf5c256651a85ab27e7356d1cb9920e Mon Sep 17 00:00:00 2001 From: adilger Date: Fri, 12 Jul 2002 20:43:44 +0000 Subject: [PATCH] Use unique OST fault-injection code instead of duplicate MDS code. --- lustre/include/linux/obd_support.h | 1 + lustre/ost/ost_handler.c | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lustre/include/linux/obd_support.h b/lustre/include/linux/obd_support.h index 1a63479..887cfb9 100644 --- a/lustre/include/linux/obd_support.h +++ b/lustre/include/linux/obd_support.h @@ -76,6 +76,7 @@ extern unsigned long obd_fail_loc; #define OBD_FAIL_OST_BRW_NET 0x20a #define OBD_FAIL_OST_PUNCH_NET 0x20b #define OBD_FAIL_OST_STATFS_NET 0x20c +#define OBD_FAIL_OST_HANDLE_UNPACK 0x20d #define OBB_FAIL_LDLM 0x300 #define OBD_FAIL_LDLM_NAMESPACE_NEW 0x301 diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c index 0bdb86c..ce36a73 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -415,7 +415,7 @@ static int ost_handle(struct ptlrpc_request *req) ENTRY; rc = lustre_unpack_msg(req->rq_reqmsg, req->rq_reqlen); - if (rc || OBD_FAIL_CHECK(OBD_FAIL_MDS_HANDLE_UNPACK)) { + if (rc || OBD_FAIL_CHECK(OBD_FAIL_OST_HANDLE_UNPACK)) { CERROR("lustre_ost: Invalid request\n"); GOTO(out, rc); } @@ -427,8 +427,11 @@ static int ost_handle(struct ptlrpc_request *req) } if (req->rq_reqmsg->opc != OST_CONNECT && - req->rq_export == NULL) + req->rq_export == NULL) { + CERROR("lustre_ost: operation %d on unconnected OST\n", + req->rq_reqmsg->opc); GOTO(out, rc = -ENOTCONN); + } if (strcmp(req->rq_obd->obd_type->typ_name, "ost") != 0) GOTO(out, rc = -EINVAL); -- 1.8.3.1