staging: lustre: mdt: extra checking for getattr RPC.
authorwang di <di.wang@intel.com>
Wed, 4 May 2016 14:28:55 +0000 (10:28 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 May 2016 12:01:14 +0000 (14:01 +0200)
commit483eec0deba1505e437b639dd353f8cd4336133d
tree751968e0fcf165f76cb770114b92bbc811a65736
parentae322e05ebc033b89d46e37df744f08240cf0a3d
staging: lustre: mdt: extra checking for getattr RPC.

Check whether getattr RPC can hold layout MD(RMF_MDT_MD),
in case the client sends some invalid RPC, which can
cause panic on MDT.

Client will retrieve cl_max_md_size/cl_default_md_size
from MDS during mount process, so it will initialize
cl_max_md_size/cl_default_md_size before sending getattr
to MDS.

Signed-off-by: wang di <di.wang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4222
Reviewed-on: http://review.whamcloud.com/8599
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/llite_lib.c
drivers/staging/lustre/lustre/mdc/mdc_request.c