/* global variables */
extern atomic_t obd_memory;
extern int obd_memmax;
-extern unsigned long obd_fail_loc;
-extern unsigned long obd_timeout;
+extern unsigned int obd_fail_loc;
+extern unsigned int obd_timeout;
extern unsigned long obd_max_dirty_pages;
extern char obd_lustre_upcall[128];
-extern unsigned long obd_sync_filter;
+extern unsigned int obd_sync_filter;
#define OBD_FAIL_MDS 0x100
#define OBD_FAIL_MDS_HANDLE_UNPACK 0x101
int proc_version;
/* The following are visible and mutable through /proc/sys/lustre/. */
-unsigned long obd_fail_loc;
-unsigned long obd_timeout = 100;
-unsigned long obd_bulk_timeout = 1;
+unsigned int obd_fail_loc;
+unsigned int obd_timeout = 100;
char obd_lustre_upcall[128] = "/usr/lib/lustre/lustre_upcall";
-unsigned long obd_sync_filter; /* = 0, don't sync by default */
+unsigned int obd_sync_filter; /* = 0, don't sync by default */
#ifdef __KERNEL__
/* opening /dev/obd */
if (OBD_FAIL_CHECK(OBD_FAIL_OST_BRW_READ_BULK))
GOTO(out, rc = -EIO);
+ OBD_FAIL_TIMEOUT(OBD_FAIL_OST_BRW_PAUSE_BULK | OBD_FAIL_ONCE,
+ (obd_timeout + 1) / 4);
+
body = lustre_swab_reqbuf(req, 0, sizeof(*body), lustre_swab_ost_body);
if (body == NULL) {
CERROR("Missing/short ost_body\n");
if (rc == 0) {
rc = ptlrpc_bulk_put(desc);
if (rc == 0) {
- lwi = LWI_TIMEOUT(obd_timeout * HZ, ost_bulk_timeout,
- desc);
+ lwi = LWI_TIMEOUT(obd_timeout * HZ / 4,
+ ost_bulk_timeout, desc);
rc = l_wait_event(desc->bd_waitq,
ptlrpc_bulk_complete(desc), &lwi);
if (rc) {
LASSERT(rc == -ETIMEDOUT);
- CERROR ("timeout waiting for bulk PUT\n");
+ DEBUG_REQ(D_ERROR, req, "timeout on bulk PUT");
ptlrpc_abort_bulk(desc);
}
} else {
- CERROR("ptlrpc_bulk_put failed RC: %d\n", rc);
+ DEBUG_REQ(D_ERROR, req, "bulk PUT failed: rc %d\n", rc);
}
comms_error = rc != 0;
}
/* pause before transaction has been started */
OBD_FAIL_TIMEOUT(OBD_FAIL_OST_BRW_PAUSE_BULK | OBD_FAIL_ONCE,
- obd_timeout +1);
+ (obd_timeout + 1) / 4);
swab = lustre_msg_swabbed(req->rq_reqmsg);
body = lustre_swab_reqbuf(req, 0, sizeof(*body), lustre_swab_ost_body);
if (rc == 0) {
rc = ptlrpc_bulk_get(desc);
if (rc == 0) {
- lwi = LWI_TIMEOUT(obd_timeout * HZ, ost_bulk_timeout,
- desc);
+ lwi = LWI_TIMEOUT(obd_timeout * HZ / 4,
+ ost_bulk_timeout, desc);
rc = l_wait_event(desc->bd_waitq,
ptlrpc_bulk_complete(desc), &lwi);
if (rc) {
LASSERT(rc == -ETIMEDOUT);
- CERROR("timeout waiting for bulk GET\n");
+ DEBUG_REQ(D_ERROR, req, "timeout on bulk GET");
ptlrpc_abort_bulk(desc);
}
} else {
- CERROR("ptlrpc_bulk_get failed RC: %d\n", rc);
+ DEBUG_REQ(D_ERROR, req, "bulk GET failed: rc %d\n", rc);
}
comms_error = rc != 0;
}