Whamcloud - gitweb
Default to an rq_level of LUSTRE_CONN_FULL.
authorshaver <shaver>
Mon, 8 Jul 2002 19:23:02 +0000 (19:23 +0000)
committershaver <shaver>
Mon, 8 Jul 2002 19:23:02 +0000 (19:23 +0000)
Use l_killable_pending in place of explicit lists of tests.

lustre/mdc/mdc_request.c
lustre/ptlrpc/client.c

index 9fb9fca..d15c4a9 100644 (file)
@@ -107,7 +107,6 @@ int mdc_getattr(struct lustre_handle *conn,
                 size[1] = ea_size;
         }
         req->rq_replen = lustre_msg_size(bufcount, size);
-        req->rq_level = LUSTRE_CONN_FULL;
 
         rc = ptlrpc_queue_wait(req);
         rc = ptlrpc_check_status(req, rc);
@@ -376,7 +375,6 @@ int mdc_open(struct lustre_handle *conn, obd_id ino, int type, int flags,
                 GOTO(out, rc = -ENOMEM);
 
         req->rq_flags |= PTL_RPC_FL_REPLAY;
-        req->rq_level = LUSTRE_CONN_FULL;
         body = lustre_msg_buf(req->rq_reqmsg, 0);
 
         ll_ino2fid(&body->fid1, ino, 0, type);
@@ -420,7 +418,6 @@ int mdc_close(struct lustre_handle *conn,
         ll_ino2fid(&body->fid1, ino, 0, type);
         body->extra = fh;
 
-        req->rq_level = LUSTRE_CONN_FULL;
         req->rq_replen = lustre_msg_size(0, NULL);
 
         rc = ptlrpc_queue_wait(req);
@@ -472,7 +469,6 @@ int mdc_readpage(struct lustre_handle *conn, obd_id ino, int type, __u64 offset,
         body->size = offset;
 
         req->rq_replen = lustre_msg_size(1, &size);
-        req->rq_level = LUSTRE_CONN_FULL;
         rc = ptlrpc_queue_wait(req);
         rc = ptlrpc_check_status(req, rc);
         if (rc) {
@@ -505,7 +501,6 @@ int mdc_statfs(struct lustre_handle *conn, struct statfs *sfs,
         if (!req)
                 GOTO(out, rc = -ENOMEM);
         req->rq_replen = lustre_msg_size(1, &size);
-        req->rq_level = LUSTRE_CONN_FULL;
 
         rc = ptlrpc_queue_wait(req);
         rc = ptlrpc_check_status(req, rc);
index 48cd95f..ce69521 100644 (file)
@@ -176,6 +176,7 @@ struct ptlrpc_request *ptlrpc_prep_req(struct ptlrpc_client *cl,
                 RETURN(NULL);
         }
 
+        request->rq_level = LUSTRE_CONN_FULL;
         request->rq_type = PTL_RPC_TYPE_REQUEST;
         request->rq_client = cl;
         request->rq_connection = ptlrpc_connection_addref(conn);
@@ -289,9 +290,7 @@ static int ptlrpc_check_reply(struct ptlrpc_request *req)
                 schedule_timeout(req->rq_timeout * HZ);
         }
 
-        if (sigismember(&(current->pending.signal), SIGKILL) ||
-            sigismember(&(current->pending.signal), SIGTERM) ||
-            sigismember(&(current->pending.signal), SIGINT)) {
+        if (l_killable_pending(current)) {
                 req->rq_flags |= PTL_RPC_FL_INTR;
                 GOTO(out, rc = 1);
         }