Whamcloud - gitweb
LU-1876 hsm: bugfix for deadlock in glimpse and layout change
authorJinshan Xiong <jinshan.xiong@intel.com>
Thu, 24 Jan 2013 00:44:34 +0000 (16:44 -0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 31 Jan 2013 16:15:52 +0000 (11:15 -0500)
commitdf8d26f186c1726ddf50a39d82b02a6b685b8d2b
treee5f666679af8f4512676c0089d16df0ea104037f
parentca461f0f7aa3e7db4639e7d67824eeccde13ca96
LU-1876 hsm: bugfix for deadlock in glimpse and layout change

This dead lock is as follows: glimpse calls ccc_inode_lsm_get()
inside glimpse IO, it will be blocked at grabbing lo_type_guard
sem, because another thread is changing layout which holds
lo_type_guard but waiting for all active IO to complete.

The basic rule: any attempt to grab lo_type_guard inside an IO is
generically risky.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Ib41c03f0a73e2ef7cd37e7689c2d55f7fd0484bf
Reviewed-on: http://review.whamcloud.com/5158
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
lustre/lclient/glimpse.c
lustre/liblustre/llite_lib.h
lustre/liblustre/rw.c
lustre/llite/file.c
lustre/llite/llite_internal.h
lustre/lov/lov_object.c