Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-6838

update llog become too big before it is destroyed

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Lustre 2.10.0
    • Lustre 2.8.0
    • None
    • 3
    • 9223372036854775807

    Description

      Update llog might be too big before it is destroyed

      So with current llog destroy implementation.

      /* returns negative on error; 0 if success; 1 if success & log destroyed */
      int llog_cancel_rec(const struct lu_env *env, struct llog_handle *loghandle,
                          int index)
      {
      ............
              if ((llh->llh_flags & LLOG_F_ZAP_WHEN_EMPTY) &&
                  (llh->llh_count == 1) &&
                  (loghandle->lgh_last_idx == LLOG_HDR_BITMAP_SIZE(llh) - 1)) {
                      rc = llog_destroy(env, loghandle);
                      if (rc < 0) {
                              /* Sigh, can not destroy the final plain llog, but
                               * the bitmap has been clearly, so the record can not
                               * be accessed anymore, let's return 0 for now, and
                               * the orphan will be handled by LFSCK. */
                              CERROR("%s: can't destroy empty llog #"DOSTID
                                     "#%08x: rc = %d\n",
                                     loghandle->lgh_ctxt->loc_obd->obd_name,
                                     POSTID(&loghandle->lgh_id.lgl_oi),
                                     loghandle->lgh_id.lgl_ogen, rc);
                              RETURN(0);
                      }
                      RETURN(LLOG_DEL_PLAIN);
              }      
      }
      

      So with llog chunk size = 32K, the LLOG_HDR_BITMAP_SIZE() will be It 261375, so the llog update record object will be destroyed until all of its bitmap is "FULL", the size will be about (each record will be about 3K, even more with bigger stripe_count)

      261375 * 3k = 760M.

      So we probably should destroy the llog object earlier, instead of waiting all of bits are being filled.

      Attachments

        Issue Links

          Activity

            People

              di.wang Di Wang
              di.wang Di Wang
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: