Whamcloud - gitweb
LU-11760 ofd: formatted OST recognition change 33/33833/6
authorSergey Cheremencev <c17829@cray.com>
Fri, 24 Aug 2018 14:03:45 +0000 (17:03 +0300)
committerOleg Drokin <green@whamcloud.com>
Sat, 25 May 2019 04:55:51 +0000 (04:55 +0000)
Modern system is fast enough to create above
100 000(5 * OST_MAX_PRECREATE) objects during commit interval.
Increase the difference between MDS last_used ID
and OST LAST_ID to 500 000 to avoid gaps after OST failover.

Cray-bug-id: LUS-6399
Change-Id: If36e04878d13f27f5229b488781440a159ddff7d
Signed-off-by: Sergey Cheremencev <c17829@cray.com>
Reviewed-on: https://es-gerrit.dev.cray.com/153866
Reviewed-by: Alexander Boyko <c17825@cray.com>
Reviewed-by: Alexander Zarochentsev <c17826@cray.com>
Tested-by: Elena Gryaznova <c17455@cray.com>
Reviewed-on: https://review.whamcloud.com/33833
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexandr Boyko <c17825@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ofd/ofd_dev.c

index 1f0fbdc..e63a8d7 100644 (file)
@@ -1645,19 +1645,23 @@ static int ofd_create_hdl(struct tgt_session_info *tsi)
                 * in place of an old one at the same index.  Instead of
                 * precreating potentially millions of deleted old objects
                 * (possibly filling the OST), only precreate the last batch.
-                * LFSCK will eventually clean up any orphans. LU-14 */
-               if (diff > 5 * OST_MAX_PRECREATE) {
+                * LFSCK will eventually clean up any orphans. LU-14
+                * 500000 is a theoretical maximum number of objects that could
+                * be created(but not stored on disk in case of failover)
+                * during default journal commit interval - 5 seconds. */
+               if (diff > 500000) {
                        diff = OST_MAX_PRECREATE / 2;
                        LCONSOLE_WARN("%s: Too many FIDs to precreate "
+                                     "precreate FID"DOSTID" LAST_ID"DOSTID
                                      "OST replaced or reformatted: "
-                                     "LFSCK will clean up",
-                                     ofd_name(ofd));
+                                     "LFSCK will clean up\n",
+                                     ofd_name(ofd), POSTID(&oa->o_oi),
+                                     POSTID(&oseq->os_oi));
 
-                       CDEBUG(D_HA, "%s: precreate FID "DOSTID" is over "
-                              "%u larger than the LAST_ID "DOSTID", only "
+                       CDEBUG(D_HA, "%s: precreate FID "DOSTID" is over 500000"
+                              "larger than the LAST_ID "DOSTID", only "
                               "precreating the last %lld objects.\n",
                               ofd_name(ofd), POSTID(&oa->o_oi),
-                              5 * OST_MAX_PRECREATE,
                               POSTID(&oseq->os_oi), diff);
                        ofd_seq_last_oid_set(oseq, ostid_id(&oa->o_oi) - diff);
                }