Whamcloud - gitweb
LU-5648 ofd: In destroy orphan case always let MDS know last id 67/12067/3
authorOleg Drokin <oleg.drokin@intel.com>
Fri, 26 Sep 2014 02:15:36 +0000 (22:15 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 23 Dec 2014 12:44:35 +0000 (12:44 +0000)
It appears that if we think MDS asked us to delete too many
precreate objects (more than 2 MAX_PRECREATE counts)
then we don't do the precreation, but do not let MDS know it needs
to advance the last_id forward by quite a bit.
This lead to reassigning these objects to other files after recovery.

Change-Id: Icbd5b9e3cd81129f56ee5cd3aafd5f418affbecc
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/12067
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
lustre/ofd/ofd_dev.c

index 5e34ecc..e3ffc17 100644 (file)
@@ -1636,7 +1636,8 @@ static int ofd_create_hdl(struct tgt_session_info *tsi)
                CDEBUG(D_HA, "ofd_last_id() = "LPU64" -> diff = %d\n",
                        ofd_seq_last_oid(oseq), diff);
                if (-diff > OST_MAX_PRECREATE) {
-                       /* FIXME: should reset precreate_next_id on MDS */
+                       /* Let MDS know that we are so far ahead. */
+                       ostid_set_id(&rep_oa->o_oi, ofd_seq_last_oid(oseq) + 1);
                        rc = 0;
                } else if (diff < 0) {
                        rc = ofd_orphans_destroy(tsi->tsi_env, exp,