Whamcloud - gitweb
LU-170 oscc_grow_count will never grow
authorLiang Zhen <liang@whamcloud.com>
Mon, 23 May 2011 04:57:03 +0000 (12:57 +0800)
committerJohann Lombardi <johann@whamcloud.com>
Mon, 23 May 2011 06:06:05 +0000 (23:06 -0700)
commitd70807c400978c3ae1119d7d9fa22f160eece35a
treed4ef921c4b002d41fede51267c30231a174e6a14
parent386b23c44c9d69361183eea2ff0ad3b741980522
LU-170 oscc_grow_count will never grow

We are using req::rq_async_args.space[0] to store original value of
oscc_grow_count, and using req::rq_async_args.pointer_arg[0] to store
oscc, however, ptlrpc_async_args is a union, which means
req::rq_async_args.space[0] will always be overwritten by a ossc (pointer),
and osc_interpret_create will always get true on this condition
"if (diff < (int) req->rq_async_args.space[0])" and reset
oscc_grow_count to OST_MIN_PRECREATE and set OSCC_FLAG_LOW.

Because it's very unsafe to use raw scratchpad directly, I also cleaned
up all using of raw scratchpad in this patch.

Change-Id: I431a37521a41c5dfbe10ebca9efac157985add51
Signed-off-by: Liang Zhen <liang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/588
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
lustre/include/lustre_net.h
lustre/ldlm/ldlm_lockd.c
lustre/mdc/mdc_locks.c
lustre/osc/osc_create.c
lustre/ptlrpc/recov_thread.c