#define OBD_INCOMPAT_COMMON_LR 0x00000008
/** FID is enabled */
#define OBD_INCOMPAT_FID 0x00000010
-/**
- * lustre disk using iam format to store directory entries
- */
+/** lustre disk using iam format to store directory entries */
#define OBD_INCOMPAT_IAM_DIR 0x00000020
+/** 2.0 server, interop flag to show server is changed */
+#define OBD_INCOMPAT_20 0x00000040
/* Data stored per server at the head of the last_rcvd file. In le32 order.
obd->obd_uuid.uuid, lsd->lsd_uuid);
GOTO(out, rc = -EINVAL);
}
+
+ /** evict all clients as it is first boot with old last_rcvd */
+ if (!(lsd->lsd_feature_incompat & OBD_INCOMPAT_20)) {
+ LCONSOLE_WARN("Mounting %s at first time on old FS, "
+ "remove all clients for interop needs\n",
+ obd->obd_name);
+ simple_truncate(lsi->lsi_srv_mnt->mnt_sb->s_root,
+ lsi->lsi_srv_mnt, LAST_RCVD,
+ lsd->lsd_client_start);
+ last_rcvd_size = lsd->lsd_client_start;
+ }
}
mount_count = lsd->lsd_mount_count;
if (ldd->ldd_flags & LDD_F_IAM_DIR)
lsd->lsd_feature_incompat |= OBD_INCOMPAT_IAM_DIR;
- lsd->lsd_feature_compat = OBD_COMPAT_MDT;
- lsd->lsd_feature_incompat |= OBD_INCOMPAT_FID;
+ lsd->lsd_feature_compat = 0;
+ lsd->lsd_feature_incompat |= OBD_INCOMPAT_FID | OBD_INCOMPAT_20;
spin_lock(&mdt->mdt_transno_lock);
mdt->mdt_last_transno = lsd->lsd_last_transno;