Whamcloud - gitweb
LU-6409 nodemap: don't destroy nodemaps in cfs_hash_for_each 75/14275/10
authorKit Westneat <kit.westneat@gmail.com>
Thu, 11 Jun 2015 20:37:18 +0000 (16:37 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 29 Jun 2015 22:06:38 +0000 (22:06 +0000)
commit6299d78713ef2b6f69f6dd046256aa91a85147a8
tree3eb3fb3c51a656cbfd175636578b0251b80f172e
parentbf3e7f67cb33f3b4e0590ef8af3843ac53d0a4e8
LU-6409 nodemap: don't destroy nodemaps in cfs_hash_for_each

nodemap_destroy might sleep, but cfs_hash_for_each iterators aren't
allowed to sleep. This patch changes nodemap_cleanup_all to avoid
destroying nodemaps in its cfs_hash_for_each iterator. Instead, the
iterator creats a list of nodemaps, and then all the nodemaps in the
list are destroyed.

Signed-off-by: Kit Westneat <kit.westneat@gmail.com>
Change-Id: I1d16f61ba7739af0494944f6515508b3f0d19ba1
Reviewed-on: http://review.whamcloud.com/14275
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@seagate.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/include/lustre_nodemap.h
lustre/ptlrpc/nodemap_handler.c