Whamcloud - gitweb
LU-4647 nodemap: fix problem with node reclassification 75/12575/2
authorKit Westneat <kit.westneat@gmail.com>
Wed, 5 Nov 2014 14:23:10 +0000 (09:23 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 4 Dec 2014 15:15:01 +0000 (15:15 +0000)
commitec6aae2e3aa4174e3c8fdd8e75a9a4186e3abdc4
tree81c53893ef4baedc1ff8e82ad6b4f2915a84f0ef
parent84e925a5611028f49c8ad07996352c2f062f598e
LU-4647 nodemap: fix problem with node reclassification

nodemap_add_member can't be used to move an already hashed member
to a new nodemap, so this patch copies the needed functionality to
nm_member_reclassif_cb. This also adds a mutex lock for reclassifying
so that there is only one nodemap reclassifying at a time.
Reclassifying takes a lock on a nodemap's nm_member_hash, so a
deadlock could arise if one nodemap is trying to add a member to
another nodemap, and that second nodemap is also reclassifying and
eventually tries to add a member to the first nodemap.

Signed-off-by: Kit Westneat <kit.westneat@gmail.com>
Change-Id: Icc93a8e6d8384afa90e45cc04f1422512974ce4a
Reviewed-on: http://review.whamcloud.com/12575
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/ptlrpc/nodemap_member.c