Whamcloud - gitweb
LU-7975 lod: fix delayed stripe error path & Client resend 02/19302/2
authorBruno Faccini <bruno.faccini@intel.com>
Fri, 1 Apr 2016 22:11:36 +0000 (00:11 +0200)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 31 May 2016 04:56:10 +0000 (04:56 +0000)
commit047dfe489966c8816cbead1a3abbbb1564fdb7db
tree367cf14d85cd65f5b1ca152f796e154109bf9421
parenta52819c3f77022ca931cac47de68d46d160ff0aa
LU-7975 lod: fix delayed stripe error path & Client resend

This patch is a follow-on to LU-4260/LU-4971/LU-5346 to fix
cleanup in error path during layout/stripe creation.
It is intended to fix special case when layout creation has been
delayed and will be with a non-0 size (ie truncate).

Problem has been unveiled due to the current limitation where a
delayed layout creation with a non-0 size/truncate will not be
resent if connection with OST is down, but is rather returning
-EAGAIN/-EWOULDBLOCK upon next open, and finally MDS will crash for
"(lod_object.c:700:lod_ah_init()) ASSERTION( lc->ldo_stripenr == 0 )"
LBUG.

Thus, patch also fixes this limitation by instead returning
-EINPROGRESS,this to avoid using costly resend operation from MDS
(will keep a ptlrpc thread busy) but offload this responsibility to
Client side (in after_reply()) which will handle this process in a
much less agressive way.

Specific sanity/test_27F sub-test has been created to test both
layout creation error path correct cleanup and Client resend.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: Ibc1734f52c071c66cb5974e3fe21d8819d725c2a
Reviewed-on: http://review.whamcloud.com/19302
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/lod/lod_object.c
lustre/osp/osp_precreate.c
lustre/tests/sanity.sh