Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752167AbcKGB4n (ORCPT ); Sun, 6 Nov 2016 20:56:43 -0500 Received: from casper.infradead.org ([85.118.1.10]:56740 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752096AbcKGB43 (ORCPT ); Sun, 6 Nov 2016 20:56:29 -0500 Date: Mon, 7 Nov 2016 01:56:28 +0000 (GMT) From: James Simmons To: Oleg Drokin cc: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger , Linux Kernel Mailing List , Lustre Development List Subject: Re: [PATCH 14/14] staging/lustre: Get rid of LIBLUSTRE_CLIENT and its users In-Reply-To: <1478136304-867780-15-git-send-email-green@linuxhacker.ru> Message-ID: References: <1478136304-867780-1-git-send-email-green@linuxhacker.ru> <1478136304-867780-15-git-send-email-green@linuxhacker.ru> User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161107_015628_276607_C2C507FA X-CRM114-Status: GOOD ( 13.37 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on casper.infradead.org summary: Content analysis details: (-1.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 NO_RELAYS Informational: message was not relayed via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2297 Lines: 61 > This define only made sense in a userspace library client, not in the kernel. Reviewed-by: James Simmons > Signed-off-by: Oleg Drokin > --- > drivers/staging/lustre/lustre/include/lustre_lib.h | 2 -- > drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 15 +-------------- > 2 files changed, 1 insertion(+), 16 deletions(-) > > diff --git a/drivers/staging/lustre/lustre/include/lustre_lib.h b/drivers/staging/lustre/lustre/include/lustre_lib.h > index 6b23191..27f3148 100644 > --- a/drivers/staging/lustre/lustre/include/lustre_lib.h > +++ b/drivers/staging/lustre/lustre/include/lustre_lib.h > @@ -350,8 +350,6 @@ do { \ > l_wait_event_exclusive_head(wq, condition, &lwi); \ > }) > > -#define LIBLUSTRE_CLIENT (0) > - > /** @} lib */ > > #endif /* _LUSTRE_LIB_H */ > diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c > index c5d00d1..6a96f2c 100644 > --- a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c > +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c > @@ -475,12 +475,7 @@ int ldlm_cli_enqueue_fini(struct obd_export *exp, struct ptlrpc_request *req, > "client-side enqueue, new policy data"); > } > > - if ((*flags) & LDLM_FL_AST_SENT || > - /* Cancel extent locks as soon as possible on a liblustre client, > - * because it cannot handle asynchronous ASTs robustly (see > - * bug 7311). > - */ > - (LIBLUSTRE_CLIENT && type == LDLM_EXTENT)) { > + if ((*flags) & LDLM_FL_AST_SENT) { > lock_res_and_lock(lock); > lock->l_flags |= LDLM_FL_CBPENDING | LDLM_FL_BL_AST; > unlock_res_and_lock(lock); > @@ -775,14 +770,6 @@ int ldlm_cli_enqueue(struct obd_export *exp, struct ptlrpc_request **reqp, > body->lock_flags = ldlm_flags_to_wire(*flags); > body->lock_handle[0] = *lockh; > > - /* > - * Liblustre client doesn't get extent locks, except for O_APPEND case > - * where [0, OBD_OBJECT_EOF] lock is taken, or truncate, where > - * [i_size, OBD_OBJECT_EOF] lock is taken. > - */ > - LASSERT(ergo(LIBLUSTRE_CLIENT, einfo->ei_type != LDLM_EXTENT || > - policy->l_extent.end == OBD_OBJECT_EOF)); > - > if (async) { > LASSERT(reqp); > return 0; > -- > 2.7.4 > >