From: Oleg Drokin Date: Fri, 26 Sep 2014 02:15:36 +0000 (-0400) Subject: LU-5648 ofd: In destroy orphan case always let MDS know last id X-Git-Tag: 2.6.92~25 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=da5773e2b498a4edacc26fbf610d0b7628818d93 LU-5648 ofd: In destroy orphan case always let MDS know last id 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 Reviewed-on: http://review.whamcloud.com/12067 Reviewed-by: Andreas Dilger Reviewed-by: Alex Zhuravlev Tested-by: Jenkins Tested-by: Maloo --- diff --git a/lustre/ofd/ofd_dev.c b/lustre/ofd/ofd_dev.c index 5e34ecc..e3ffc17 100644 --- a/lustre/ofd/ofd_dev.c +++ b/lustre/ofd/ofd_dev.c @@ -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,