Received: by 10.213.65.68 with SMTP id h4csp617082imn; Fri, 30 Mar 2018 11:59:24 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+UZ72tFwXXMWfhtPCHG5Re4tOQCOb2f/pNHkpGqJfBg/5tYZ08HqgI882fpfYUkaB2Rasn X-Received: by 10.99.140.87 with SMTP id q23mr121886pgn.258.1522436364804; Fri, 30 Mar 2018 11:59:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522436364; cv=none; d=google.com; s=arc-20160816; b=Ge61VTtZ3/bCg2ZjciwKbqCdnaz+5ojwfcUKVnJnUBS5QXqHjaErKM09V/BUE7/23D C3V/tn8+U3SCJw4WwFjV/UG2/f/4HaoglPFX79n6K5qnai+YHv32v06HKQq5sULs71ej w1hMFYskkhsC88lPARS5yj4323hTP7/y7+rnYdZJ7DK4Ah0dp+DF2E1YiyAS7IcoYhg/ 1BYfkEF4vu3ZrvFgnN3vvEOwLVBWlguSEskb5L7lwEu5LtPF6V366W033kAYgJtvsG6g TpXq9eqfId68ZzSajbp/Wb33iM0LtSCRnloufked8SDvk7uW5bMitjCJC1RN8f8sFt4R 2lYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=X0vsKl/zfrkOoRPtrrcXBtGzErSjkPBUSLFcsymiyFQ=; b=PZSCCmxPQEdcnpLjbRyoJWuAWWD8mLp0PxZiT7azM5JB59xNxyN2mtpg7teIrIP8+K YpjsF9JX9ZckFMKRTWm247yY5qhvRJ3qNVuxfiDzDKUJCWyHKSP/1TKFIihorWjUGmmf zvjE+VMia0fdq0cZ3KzA2TEbTqNgEWhaMB+bvx+fVW/HXGu3lVSudcKttvvhWVo+ZQGJ dfx8KQZefrmUxHJyqhOB1i/i2fww0dfw7jushsmDf1ycLszHecIOzjO9v8ut0ZRGMw6+ 6teJqBWEfBL0VmjN5zsuW9vcpoNl4hv9S/qOe67Bl1yAkX513mUm2/4cCem67tOPPYpi LCIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=IvGtI4ib; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o5-v6si9072947plh.432.2018.03.30.11.59.10; Fri, 30 Mar 2018 11:59:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=IvGtI4ib; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752611AbeC3S5e (ORCPT + 99 others); Fri, 30 Mar 2018 14:57:34 -0400 Received: from casper.infradead.org ([85.118.1.10]:46074 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752548AbeC3S5d (ORCPT ); Fri, 30 Mar 2018 14:57:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:References: Message-ID:In-Reply-To:Subject:cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=X0vsKl/zfrkOoRPtrrcXBtGzErSjkPBUSLFcsymiyFQ=; b=IvGtI4ibK/mnce0k8O2Kfox0N qDAteDE6x8CT+BDI3y/ToohQLZTgIPwPJetCBwGnSu7nAthQoeWDBZbzBIQBPwlEWNdmb/TDcVkom ZQA/TSqptDzsymNE5mK71M16cRRcsR9+87cgLZFV5S2SJZl6swDwctc3rGvGXf0E6jXVIQwgg/5i8 RMtewzcwUT/ohb5TvCA1dC43rjnLkcR+BMyiQgWoY60aths2bWVG5zo7t5zbomREIF5Zq+hwqxmjb DtndnFDTIXZnulkZ/fgy2VwrbOJzxhkTN34Yn3y49JU7H+Q6h5SQsb9h0WJLixdeqm3QdSJgoDv2S B5cWr3aEA==; Received: from jsimmons (helo=localhost) by casper.infradead.org with local-esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f1zDL-0002aE-8Q; Fri, 30 Mar 2018 18:57:28 +0000 Date: Fri, 30 Mar 2018 19:57:27 +0100 (BST) From: James Simmons To: NeilBrown cc: Oleg Drokin , Greg Kroah-Hartman , Andreas Dilger , Linux Kernel Mailing List , Lustre Development List Subject: Re: [PATCH 04/17] staging: lustre: remove unused hash tables. In-Reply-To: <152229760834.27689.17845742683913841545.stgit@noble> Message-ID: References: <152229732768.27689.4800156943561963977.stgit@noble> <152229760834.27689.17845742683913841545.stgit@noble> User-Agent: Alpine 2.21 (LFD 202 2017-01-01) 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-20180330_195727_295731_FF39CB81 X-CRM114-Status: GOOD ( 22.84 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.1 on casper.infradead.org summary: Content analysis details: (-0.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 NO_RELAYS Informational: message was not relayed via SMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > exp_lock_hash and exp_flock_hash are unused in > the client, so remove all references. > > Also remove unused hashtable size definitions. Reviewed-by: James Simmons > Signed-off-by: NeilBrown > --- > drivers/staging/lustre/lustre/include/lustre_dlm.h | 10 ------- > .../staging/lustre/lustre/include/lustre_export.h | 7 ----- > .../staging/lustre/lustre/include/obd_support.h | 18 ------------- > drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 11 +------- > drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 14 ---------- > drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 27 +------------------- > drivers/staging/lustre/lustre/obdclass/genops.c | 2 - > 7 files changed, 3 insertions(+), 86 deletions(-) > > diff --git a/drivers/staging/lustre/lustre/include/lustre_dlm.h b/drivers/staging/lustre/lustre/include/lustre_dlm.h > index 7407acf60cf8..5a355fbab401 100644 > --- a/drivers/staging/lustre/lustre/include/lustre_dlm.h > +++ b/drivers/staging/lustre/lustre/include/lustre_dlm.h > @@ -629,16 +629,6 @@ struct ldlm_lock { > * Tree node for ldlm_extent. > */ > struct ldlm_interval *l_tree_node; > - /** > - * Per export hash of locks. > - * Protected by per-bucket exp->exp_lock_hash locks. > - */ > - struct hlist_node l_exp_hash; > - /** > - * Per export hash of flock locks. > - * Protected by per-bucket exp->exp_flock_hash locks. > - */ > - struct hlist_node l_exp_flock_hash; > /** > * Requested mode. > * Protected by lr_lock. > diff --git a/drivers/staging/lustre/lustre/include/lustre_export.h b/drivers/staging/lustre/lustre/include/lustre_export.h > index 40cd168ed2ea..19ce13bc8ee6 100644 > --- a/drivers/staging/lustre/lustre/include/lustre_export.h > +++ b/drivers/staging/lustre/lustre/include/lustre_export.h > @@ -102,13 +102,6 @@ struct obd_export { > struct ptlrpc_connection *exp_connection; > /** Connection count value from last successful reconnect rpc */ > __u32 exp_conn_cnt; > - /** Hash list of all ldlm locks granted on this export */ > - struct cfs_hash *exp_lock_hash; > - /** > - * Hash list for Posix lock deadlock detection, added with > - * ldlm_lock::l_exp_flock_hash. > - */ > - struct cfs_hash *exp_flock_hash; > struct list_head exp_outstanding_replies; > struct list_head exp_uncommitted_replies; > spinlock_t exp_uncommitted_replies_lock; > diff --git a/drivers/staging/lustre/lustre/include/obd_support.h b/drivers/staging/lustre/lustre/include/obd_support.h > index 8595091b8b86..eb2d6cb6b40b 100644 > --- a/drivers/staging/lustre/lustre/include/obd_support.h > +++ b/drivers/staging/lustre/lustre/include/obd_support.h > @@ -67,27 +67,9 @@ extern char obd_jobid_var[]; > #define HASH_UUID_BKT_BITS 5 > #define HASH_UUID_CUR_BITS 7 > #define HASH_UUID_MAX_BITS 12 > -#define HASH_NID_BKT_BITS 5 > -#define HASH_NID_CUR_BITS 7 > -#define HASH_NID_MAX_BITS 12 > -#define HASH_NID_STATS_BKT_BITS 5 > -#define HASH_NID_STATS_CUR_BITS 7 > -#define HASH_NID_STATS_MAX_BITS 12 > -#define HASH_LQE_BKT_BITS 5 > -#define HASH_LQE_CUR_BITS 7 > -#define HASH_LQE_MAX_BITS 12 > #define HASH_CONN_BKT_BITS 5 > #define HASH_CONN_CUR_BITS 5 > #define HASH_CONN_MAX_BITS 15 > -#define HASH_EXP_LOCK_BKT_BITS 5 > -#define HASH_EXP_LOCK_CUR_BITS 7 > -#define HASH_EXP_LOCK_MAX_BITS 16 > -#define HASH_CL_ENV_BKT_BITS 5 > -#define HASH_CL_ENV_BITS 10 > -#define HASH_JOB_STATS_BKT_BITS 5 > -#define HASH_JOB_STATS_CUR_BITS 7 > -#define HASH_JOB_STATS_MAX_BITS 12 > - > /* Timeout definitions */ > #define OBD_TIMEOUT_DEFAULT 100 > /* Time to wait for all clients to reconnect during recovery (hard limit) */ > diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > index 411b540b96d9..94f3b1e49896 100644 > --- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c > @@ -83,9 +83,6 @@ ldlm_flock_destroy(struct ldlm_lock *lock, enum ldlm_mode mode) > LDLM_DEBUG(lock, "%s(mode: %d)", > __func__, mode); > > - /* Safe to not lock here, since it should be empty anyway */ > - LASSERT(hlist_unhashed(&lock->l_exp_flock_hash)); > - > list_del_init(&lock->l_res_link); > > /* client side - set a flag to prevent sending a CANCEL */ > @@ -263,15 +260,9 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req) > lock->l_policy_data.l_flock.start = > new->l_policy_data.l_flock.end + 1; > new2->l_conn_export = lock->l_conn_export; > - if (lock->l_export) { > + if (lock->l_export) > new2->l_export = class_export_lock_get(lock->l_export, > new2); > - if (new2->l_export->exp_lock_hash && > - hlist_unhashed(&new2->l_exp_hash)) > - cfs_hash_add(new2->l_export->exp_lock_hash, > - &new2->l_remote_handle, > - &new2->l_exp_hash); > - } > ldlm_lock_addref_internal_nolock(new2, > lock->l_granted_mode); > > diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c > index 95bea351d21d..b8fd778d9832 100644 > --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c > +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c > @@ -318,18 +318,6 @@ static int ldlm_lock_destroy_internal(struct ldlm_lock *lock) > } > ldlm_set_destroyed(lock); > > - if (lock->l_export && lock->l_export->exp_lock_hash) { > - /* NB: it's safe to call cfs_hash_del() even lock isn't > - * in exp_lock_hash. > - */ > - /* In the function below, .hs_keycmp resolves to > - * ldlm_export_lock_keycmp() > - */ > - /* coverity[overrun-buffer-val] */ > - cfs_hash_del(lock->l_export->exp_lock_hash, > - &lock->l_remote_handle, &lock->l_exp_hash); > - } > - > ldlm_lock_remove_from_lru(lock); > class_handle_unhash(&lock->l_handle); > > @@ -419,8 +407,6 @@ static struct ldlm_lock *ldlm_lock_new(struct ldlm_resource *resource) > lock->l_blocking_lock = NULL; > INIT_LIST_HEAD(&lock->l_sl_mode); > INIT_LIST_HEAD(&lock->l_sl_policy); > - INIT_HLIST_NODE(&lock->l_exp_hash); > - INIT_HLIST_NODE(&lock->l_exp_flock_hash); > > lprocfs_counter_incr(ldlm_res_to_ns(resource)->ns_stats, > LDLM_NSS_LOCKS); > diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c > index be43958e4090..8e79f5e073ff 100644 > --- a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c > +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c > @@ -405,19 +405,7 @@ int ldlm_cli_enqueue_fini(struct obd_export *exp, struct ptlrpc_request *req, > cleanup_phase = 0; > > lock_res_and_lock(lock); > - /* Key change rehash lock in per-export hash with new key */ > - if (exp->exp_lock_hash) { > - /* In the function below, .hs_keycmp resolves to > - * ldlm_export_lock_keycmp() > - */ > - /* coverity[overrun-buffer-val] */ > - cfs_hash_rehash_key(exp->exp_lock_hash, > - &lock->l_remote_handle, > - &reply->lock_handle, > - &lock->l_exp_hash); > - } else { > - lock->l_remote_handle = reply->lock_handle; > - } > + lock->l_remote_handle = reply->lock_handle; > > *flags = ldlm_flags_from_wire(reply->lock_flags); > lock->l_flags |= ldlm_flags_from_wire(reply->lock_flags & > @@ -1884,18 +1872,7 @@ static int replay_lock_interpret(const struct lu_env *env, > > /* Key change rehash lock in per-export hash with new key */ > exp = req->rq_export; > - if (exp && exp->exp_lock_hash) { > - /* In the function below, .hs_keycmp resolves to > - * ldlm_export_lock_keycmp() > - */ > - /* coverity[overrun-buffer-val] */ > - cfs_hash_rehash_key(exp->exp_lock_hash, > - &lock->l_remote_handle, > - &reply->lock_handle, > - &lock->l_exp_hash); > - } else { > - lock->l_remote_handle = reply->lock_handle; > - } > + lock->l_remote_handle = reply->lock_handle; > > LDLM_DEBUG(lock, "replayed lock:"); > ptlrpc_import_recovery_state_machine(req->rq_import); > diff --git a/drivers/staging/lustre/lustre/obdclass/genops.c b/drivers/staging/lustre/lustre/obdclass/genops.c > index 63ccbabb4c5a..86e22472719a 100644 > --- a/drivers/staging/lustre/lustre/obdclass/genops.c > +++ b/drivers/staging/lustre/lustre/obdclass/genops.c > @@ -721,8 +721,6 @@ struct obd_export *class_new_export(struct obd_device *obd, > return ERR_PTR(-ENOMEM); > > export->exp_conn_cnt = 0; > - export->exp_lock_hash = NULL; > - export->exp_flock_hash = NULL; > atomic_set(&export->exp_refcount, 2); > atomic_set(&export->exp_rpc_count, 0); > atomic_set(&export->exp_cb_count, 0); > > >