X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fptlrpc%2Fclient.c;h=e9979df9ec97d223eb98f7d0cb9a7161cb84352e;hp=483ca5d107b6293853e1e6271d9e87d5a5f2e897;hb=fd79a11a9f4c9526af33a68c77a28437b3c29dfa;hpb=71350744808a2791d6b623bfb24623052322380d diff --git a/lustre/ptlrpc/client.c b/lustre/ptlrpc/client.c index 483ca5d..e9979df 100644 --- a/lustre/ptlrpc/client.c +++ b/lustre/ptlrpc/client.c @@ -1907,7 +1907,7 @@ void ptlrpc_interrupted_set(void *data) cfs_list_t *tmp; LASSERT(set != NULL); - CERROR("INTERRUPTED SET %p\n", set); + CDEBUG(D_RPCTRACE, "INTERRUPTED SET %p\n", set); cfs_list_for_each(tmp, &set->set_requests) { struct ptlrpc_request *req = @@ -2024,6 +2024,23 @@ int ptlrpc_set_wait(struct ptlrpc_request_set *set) rc = l_wait_event(set->set_waitq, ptlrpc_check_set(NULL, set), &lwi); + /* LU-769 - if we ignored the signal because it was already + * pending when we started, we need to handle it now or we risk + * it being ignored forever */ + if (rc == -ETIMEDOUT && !lwi.lwi_allow_intr && + cfs_signal_pending()) { + cfs_sigset_t blocked_sigs = + cfs_block_sigsinv(LUSTRE_FATAL_SIGS); + + /* In fact we only interrupt for the "fatal" signals + * like SIGINT or SIGKILL. We still ignore less + * important signals since ptlrpc set is not easily + * reentrant from userspace again */ + if (cfs_signal_pending()) + ptlrpc_interrupted_set(set); + cfs_block_sigs(blocked_sigs); + } + LASSERT(rc == 0 || rc == -EINTR || rc == -ETIMEDOUT); /* -EINTR => all requests have been flagged rq_intr so next