summaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/include/obd.h
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2018-04-12 07:54:48 +1000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-04-23 15:07:41 +0200
commit55161065d05d99a800bdac5bed3365daa93ecd62 (patch)
tree6029c9c715f8d84dd6e315688b1ca267eb19c3e6 /drivers/staging/lustre/lustre/include/obd.h
parent4206c444e4a89dae9f67f08d9c29d58c37c960cd (diff)
downloadop-kernel-dev-55161065d05d99a800bdac5bed3365daa93ecd62.zip
op-kernel-dev-55161065d05d99a800bdac5bed3365daa93ecd62.tar.gz
staging: lustre: convert osc_quota hash to rhashtable
As this is indexed by an integer, an extensible array or extensible bitmap would be better. If/when xarray lands, we should change to use that. For now, just a simple conversion to rhashtable. When removing an entry, we need to hold rcu_read_lock() across the lookup and remove in case we race with another thread performing a removal. This means we need to use call_rcu() to free the quota info so we need an rcu_head in there, which unfortunately doubles the size of the structure. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/include/obd.h')
-rw-r--r--drivers/staging/lustre/lustre/include/obd.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lustre/include/obd.h b/drivers/staging/lustre/lustre/include/obd.h
index 0d0420e..fe21987 100644
--- a/drivers/staging/lustre/lustre/include/obd.h
+++ b/drivers/staging/lustre/lustre/include/obd.h
@@ -333,7 +333,7 @@ struct client_obd {
void *cl_writeback_work;
void *cl_lru_work;
/* hash tables for osc_quota_info */
- struct cfs_hash *cl_quota_hash[MAXQUOTAS];
+ struct rhashtable cl_quota_hash[MAXQUOTAS];
};
#define obd2cli_tgt(obd) ((char *)(obd)->u.cli.cl_target_uuid.uuid)
OpenPOWER on IntegriCloud