Whamcloud - gitweb
LU-5871 lod: Do not return EAGAIN in lod_object_init 86/12586/4
authorWang Di <di.wang@intel.com>
Wed, 5 Nov 2014 18:46:59 +0000 (10:46 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 11 Nov 2014 04:11:39 +0000 (04:11 +0000)
commit6db07f095fba42cee30af8270a6015c85e91c1d3
treea048a66381ba2242cabc7f9e1a52106b5eebee10
parent1da9b84b39ab36be9ba67a72ae175dde6521769b
LU-5871 lod: Do not return EAGAIN in lod_object_init

Convert EAGAIN to EIO if fld_client_rpc() fails in
lod_object_init(), otherwise it will confuse
lu_object_find_at(), and make it wait there for no
reason, which should only wait if the object is dying.
See call chain lu_object_find_at()-> lu_object_find_try()
->lu_object_alloc()->lod_object_init()->lod_fld_lookup()
->fld_client_rpc(), and even worse waitq is not being
initialized yet when the failure happened here.

Change-Id: Ieae434b34c239efea86a4a471fb01e397336a31c
Signed-off-by: Wang Di <di.wang@intel.com>
Reviewed-on: http://review.whamcloud.com/12586
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/lod/lod_object.c