From 23d648e4d185ec903a55516cb60774a4b963d70d Mon Sep 17 00:00:00 2001 From: "hongchao.zhang" Date: Thu, 1 Apr 2010 20:08:51 +0800 Subject: [PATCH] b=22307 remove lock acquisition during holding spinlock in ras_update, "lov_get_info" could be called during increasing readahead windows, which tries to get the mutex lock "lov_lock" while holding the spin_lock "ras_lock", then causes system lockup. i=johann@sun.com i=tom.wang@sun.com --- lustre/llite/rw.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/lustre/llite/rw.c b/lustre/llite/rw.c index 149a035..8c49a03 100644 --- a/lustre/llite/rw.c +++ b/lustre/llite/rw.c @@ -2004,19 +2004,7 @@ static void ras_stride_increase_window(struct ll_readahead_state *ras, static void ras_increase_window(struct ll_readahead_state *ras, struct ll_ra_info *ra, struct inode *inode) { - __u64 step; - __u32 size; - int rc; - - step = ((loff_t)(ras->ras_window_start + - ras->ras_window_len)) << CFS_PAGE_SHIFT; - size = sizeof(step); - /*Get rpc_size for this offset (step) */ - rc = obd_get_info(ll_i2obdexp(inode), sizeof(KEY_OFF_RPCSIZE), - KEY_OFF_RPCSIZE, &size, &step, - ll_i2info(inode)->lli_smd); - if (rc) - step = INIT_RAS_WINDOW_PAGES; + __u64 step = INIT_RAS_WINDOW_PAGES; if (stride_io_mode(ras)) ras_stride_increase_window(ras, ra, (unsigned long)step); -- 1.8.3.1