- if (rc == 0 && !dev->od_noscrub &&
- ((sf->sf_status == SS_PAUSED) ||
- (sf->sf_status == SS_CRASHED &&
- sf->sf_flags & (SF_RECREATED | SF_INCONSISTENT | SF_UPGRADE |
- SF_AUTO)) ||
- (sf->sf_status == SS_INIT &&
- sf->sf_flags & (SF_RECREATED | SF_INCONSISTENT | SF_UPGRADE))))
- rc = osd_scrub_start(dev);
+ if (rc == 0) {
+ if ((sf->sf_flags & SF_UPGRADE) &&
+ !(sf->sf_flags & SF_INCONSISTENT))
+ /* The 'od_igif_inoi' will be set after the
+ * upgrading completed, needs NOT remount. */
+ dev->od_igif_inoi = 0;
+ else
+ /* The 'od_igif_inoi' will be set under the
+ * following cases:
+ * 1) new created system, or
+ * 2) restored from file-level backup, or
+ * 3) the upgrading completed.
+ *
+ * The 'od_igif_inoi' may be cleared by OI scrub
+ * later if found that the system is upgrading. */
+ dev->od_igif_inoi = 1;
+
+ if (!dev->od_noscrub &&
+ ((sf->sf_status == SS_PAUSED) ||
+ (sf->sf_status == SS_CRASHED &&
+ sf->sf_flags & (SF_RECREATED | SF_INCONSISTENT |
+ SF_UPGRADE | SF_AUTO)) ||
+ (sf->sf_status == SS_INIT &&
+ sf->sf_flags & (SF_RECREATED | SF_INCONSISTENT |
+ SF_UPGRADE))))
+ rc = osd_scrub_start(dev);
+ }