- 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 || rc == -EAGAIN || rc == -EIO) &&
- dt != lod->lod_child &&
- !top_device->ld_obd->obd_abort_recovery &&
- !top_device->ld_obd->obd_stopping) {
+ top_device = lod->lod_dt_dev.dd_lu_dev.ld_site->ls_top_dev;
+ if (rc < 0 && dt != lod->lod_child &&
+ !lod_recovery_abort(top_device->ld_obd)) {
+ if (rc == -EBADR) {
+ /* remote update llog is shorter than expected from
+ * local header. Cached copy could be de-synced during
+ * recovery, trust remote llog data
+ */
+ CDEBUG(D_HA, "%s update log data de-sync\n",
+ dt->dd_lu_dev.ld_obd->obd_name);
+ rc = 0;
+ } else if (rc == -ETIMEDOUT || rc == -EAGAIN || rc == -EIO) {
+ /*
+ * the remote target might failover at the same time,
+ * let's retry here
+ */