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
commit4206c444e4a89dae9f67f08d9c29d58c37c960cd (patch)
tree7fe516c0cc1d742f3e474562d9afab4fec201211 /drivers/staging/lustre/lustre/include/obd.h
parent055ed193b190edac539f37a66699b02eae3a19a9 (diff)
downloadop-kernel-dev-4206c444e4a89dae9f67f08d9c29d58c37c960cd.zip
op-kernel-dev-4206c444e4a89dae9f67f08d9c29d58c37c960cd.tar.gz
staging: lustre: convert obd uuid hash to rhashtable
The rhashtable data type is a perfect fit for the export uuid hash table, so use that instead of cfs_hash (which will eventually be removed). As rhashtable supports lookups and insertions in atomic context, there is no need to drop a spinlock while inserting a new entry, which simplifies code quite a bit. As there are no simple lookups on this hash table (only insertions which might fail and take a spinlock), there is no need to use rcu to free the exports. 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.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lustre/include/obd.h b/drivers/staging/lustre/lustre/include/obd.h
index 7e1de03..0d0420e 100644
--- a/drivers/staging/lustre/lustre/include/obd.h
+++ b/drivers/staging/lustre/lustre/include/obd.h
@@ -558,7 +558,7 @@ struct obd_device {
*/
unsigned long obd_recovery_expired:1;
/* uuid-export hash body */
- struct cfs_hash *obd_uuid_hash;
+ struct rhashtable obd_uuid_hash;
wait_queue_head_t obd_refcount_waitq;
struct list_head obd_exports;
struct list_head obd_unlinked_exports;
@@ -622,6 +622,9 @@ struct obd_device {
struct completion obd_kobj_unregister;
};
+int obd_uuid_add(struct obd_device *obd, struct obd_export *export);
+void obd_uuid_del(struct obd_device *obd, struct obd_export *export);
+
/* get/set_info keys */
#define KEY_ASYNC "async"
#define KEY_CHANGELOG_CLEAR "changelog_clear"
OpenPOWER on IntegriCloud