Whamcloud - gitweb
LU-6602 osp: change lgh_hdr_lock to mutex 74/15274/8
authorwang di <di.wang@intel.com>
Tue, 7 Jul 2015 18:11:16 +0000 (14:11 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 16 Jul 2015 03:32:50 +0000 (03:32 +0000)
commitfffe8ac7e42b6638bff9fe19c4bfeb6635023c92
treecc6908e8197d669e77cb5d97f8f94740c3637280
parent96dced729f343ea1d6193d1d906524230485b969
LU-6602 osp: change lgh_hdr_lock to mutex

Change lgh_hdr_lock from spinlock to mutex, because in
osp_md_write_obj(), it might be blocked by memory
allocation.

Reorganize the llog_cache_rec process, so lgh_hdr_mutex
will protect both setbit and update llog header, to avoid
conflicts between add records and cancel llog records.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Ic12d7d768546c67a858cb235929de8ae6aeaa1aa
Reviewed-on: http://review.whamcloud.com/15274
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/lustre_log.h
lustre/obdclass/llog.c
lustre/obdclass/llog_osd.c