Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757731Ab3GVQOF (ORCPT ); Mon, 22 Jul 2013 12:14:05 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]:33469 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933085Ab3GVQNr (ORCPT ); Mon, 22 Jul 2013 12:13:47 -0400 From: Peng Tao To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, Bruno Faccini , Peng Tao , Andreas Dilger Subject: [PATCH 48/48] staging/lustre/mdc: Keep resend FLocks Date: Tue, 23 Jul 2013 00:07:09 +0800 Message-Id: <1374509230-3324-49-git-send-email-bergwolf@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1374509230-3324-1-git-send-email-bergwolf@gmail.com> References: <1374509230-3324-1-git-send-email-bergwolf@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1791 Lines: 44 From: Bruno Faccini FLocks requests (particulary F_UNLCKs) can't be trashed upon comm problems with Server/MDS nor upon kill/exit, thus we need to keep retry/send. Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2665 Lustre-change: http://review.whamcloud.com/6415 Signed-off-by: Bruno Faccini Reviewed-by: Bobi Jam Reviewed-by: Oleg Drokin Signed-off-by: Peng Tao Signed-off-by: Andreas Dilger --- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c index ab88a46..803c390 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c @@ -823,7 +823,13 @@ resend: /* For flock requests we immediatelly return without further delay and let caller deal with the rest, since rest of this function metadata processing makes no sense for flock - requests anyway */ + requests anyway. But in case of problem during comms with + Server (ETIMEDOUT) or any signal/kill attempt (EINTR), we + can not rely on caller and this mainly for F_UNLCKs + (explicits or automatically generated by Kernel to clean + current FLocks upon exit) that can't be trashed */ + if ((rc == -EINTR) || (rc == -ETIMEDOUT)) + goto resend; RETURN(rc); } -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/