Because the remote MDT might be in recovery at the same
time, let's Keep trying to get remote update log until
the recovery is abort.
Signed-off-by: Di Wang <di.wang@intel.com>
Change-Id: Id9543201ce543be730e73f9f51f3f7a0d10d3dfc
Reviewed-on: http://review.whamcloud.com/16786
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
else
dt = lrd->lrd_ltd->ltd_tgt;
+again:
rc = lod_sub_prep_llog(&env, lod, dt, lrd->lrd_idx);
if (rc != 0)
GOTO(out, rc);
llog_ctxt_put(ctxt);
if (rc < 0) {
+ struct lu_device *top_device;
+
+ top_device = lod->lod_dt_dev.dd_lu_dev.ld_site->ls_top_dev;
+ /* Because the remote target might failover at the same time,
+ * let's retry here */
+ if (rc == -ETIMEDOUT && dt != lod->lod_child &&
+ !top_device->ld_obd->obd_force_abort_recovery)
+ goto again;
+
CERROR("%s getting update log failed: rc = %d\n",
dt->dd_lu_dev.ld_obd->obd_name, rc);
GOTO(out, rc);