Whamcloud - gitweb
LU-7737 lod: not return -EIO during process updates log 08/18308/2
authorDi Wang <di.wang@intel.com>
Thu, 4 Feb 2016 11:23:23 +0000 (06:23 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 9 Feb 2016 19:03:03 +0000 (19:03 +0000)
Do not return -EIO in lod_process_updates_recovery(),
otherwise the update log might be deleted incorrectly,
especially when doing umount during recovery, see
llog_process_thread().

Signed-off-by: Di Wang <di.wang@intel.com>
Change-Id: I822dae9984eb044ce3d63a30d8bb24294f46dd65
Reviewed-on: http://review.whamcloud.com/18308
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/lod/lod_dev.c

index 32f7421..7d23aae 100644 (file)
@@ -319,7 +319,7 @@ static int lod_process_recovery_updates(const struct lu_env *env,
                CERROR("%s broken update record! index %u "DOSTID":%u :"
                       " rc = %d\n", lod2obd(lrd->lrd_lod)->obd_name, index,
                       POSTID(&llh->lgh_id.lgl_oi), rec->lrh_index, -EIO);
                CERROR("%s broken update record! index %u "DOSTID":%u :"
                       " rc = %d\n", lod2obd(lrd->lrd_lod)->obd_name, index,
                       POSTID(&llh->lgh_id.lgl_oi), rec->lrh_index, -EIO);
-               return -EIO;
+               return -EINVAL;
        }
 
        cookie->lgc_lgl = llh->lgh_id;
        }
 
        cookie->lgc_lgl = llh->lgh_id;
@@ -333,7 +333,7 @@ static int lod_process_recovery_updates(const struct lu_env *env,
 
        if (lut->lut_obd->obd_stopping ||
            lut->lut_obd->obd_abort_recovery)
 
        if (lut->lut_obd->obd_stopping ||
            lut->lut_obd->obd_abort_recovery)
-               return -EIO;
+               return -ESHUTDOWN;
 
        return insert_update_records_to_replay_list(lut->lut_tdtd,
                                        (struct llog_update_record *)rec,
 
        return insert_update_records_to_replay_list(lut->lut_tdtd,
                                        (struct llog_update_record *)rec,