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

Suspicious condition in lfsck_layout_slave_exec_oit

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a Bug
    • Minor
    • None
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      In the master code we have this snippet in lfsck_layout_slave_exec_oit:

              if (oid > lls->lls_lastid) {
                      if (!(lo->ll_flags & LF_CRASHED_LASTID)) {
                              /* OFD may create new objects during LFSCK scanning. */
                              rc = lfsck_layout_lastid_reload(env, com, lls);
                              if (unlikely(rc != 0)) {
                                      CDEBUG(D_LFSCK, "%s: layout LFSCK failed to "
                                            "reload LAST_ID for "LPX64": rc = %d\n",
                                            lfsck_lfsck2name(com->lc_lfsck),
                                            lls->lls_seq, rc);
      
                                      GOTO(unlock, rc);
                              }
      
                              if (oid <= lls->lls_lastid ||
                                  lo->ll_flags & LF_CRASHED_LASTID)
                                      GOTO(unlock, rc = 0);
      

      Note that we are still in the !(lo->ll_flags & LF_CRASHED_LASTID) branch, so why test for it one more time? Was there something else in mind?
      I don't see any locking implying a parallel thread set it or any function calls in between that might have changed it too.

      Attachments

        Activity

          People

            yong.fan nasf (Inactive)
            green Oleg Drokin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: