Whamcloud - gitweb
LU-2388 statahead: race in do_sa_entry_fini()
authorLai Siyao <lai.siyao@intel.com>
Tue, 26 Mar 2013 08:12:11 +0000 (16:12 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 30 Mar 2013 18:40:31 +0000 (14:40 -0400)
commit633d4edb4e27ff3af7026e8d4e6770cec042a931
tree1ffd5056e2505da81a9388d9e9f4aa294a562dec
parent1a7278b801affc467407272d58ece59d903d57a6
LU-2388 statahead: race in do_sa_entry_fini()

Two fixes:
* When iterating sa_entry list in do_sa_entry_fini(), there is
  no lock, as may cause one entry put twice. To fix this, all
  entries are put in one list, and only 'scanner' will drop
  entry from this list.
* sa_entry may be linked to sai_sent_entries, but not hashed
  yet, if ll_sa_entry_fini() is called at this moment, this
  sa_entry may be unhashed.

Also include minor cleanup:
* rename do_sai_entry_fini() to do_sa_entry_fini().
* rename do_sai_entry_to_stated() to do_sa_entry_to_stated().
* rename do_statahead_interpret() to ll_post_statahead() to
  distinguish from ll_statahead_interpret().
* ll_post_statahead() always post handle statahead from received
  list to simplify logic.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I3d0911d0bd3b940c9650473099604646408200c4
Reviewed-on: http://review.whamcloud.com/5842
Tested-by: Hudson
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/llite/llite_internal.h
lustre/llite/statahead.c