Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.16.0
    • None
    • 3
    • 9223372036854775807

    Description

      It looks like lgl_oi.oi_fid is used in quite a number of places, but any use of lgl_oi.oi_fid looks to be incorrect (f_seq and oi_seq are in opposite order in struct ost_objid). This was broken by patch https://review.whamcloud.com/25640 "LU-9153 llog: update llog print format to use FIDs". It is only using oi_fid like PFID(&...lgl_oi.oi_fid), so this is only affecting error messages and not any functionality.

      log_process_thread()) lfs02-MDT001e-osp-MDT0000: [0x3:0x1b70:0x4] Invalid record: index 16123 but expected 16122
      

      The output "[0x3:0x1b70:0x4]" should be interpreted as FID [0x400001b70:0x3:0x0] (swap last and first components of the field, add intervening "0000" and add ":0x0" at the end) in the update_log_dir/ directory.

      To print these FIDs correctly, there is a logid_to_fid() helper with the DOSTID macro, and it would make sense to have it also return the same pointer as the passed-in fid argument, so that it can be passed directly to PFID() in the error message, like:

              struct lu_fid tmp_fid;
      
              CERROR("%s: "DFID" Invalid record: index %u but expected %u\n",
                     loghandle2name(loghandle),
                     PFID(logid_to_fid(&loghandle->lgh_id, &tmp_fid)),          
                     rec->lrh_index, index);
      

      Alternately, it would be more efficient to add a new PLOGID() macro that is returning oi_seq, oi_id, 0, directly, and avoid the need for tmp_fid entirely.

      Attachments

        Issue Links

          Activity

            [LU-15646] fix DOSTID printing of llog_id FIDs

            "Etienne AUJAMES <eaujames@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/49472
            Subject: LU-15646 llog: correct llog FID and path output
            Project: fs/lustre-release
            Branch: b2_12
            Current Patch Set: 1
            Commit: 7176bc9204c134731d96f5151c3709aaec8a4f9e

            gerrit Gerrit Updater added a comment - "Etienne AUJAMES <eaujames@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/49472 Subject: LU-15646 llog: correct llog FID and path output Project: fs/lustre-release Branch: b2_12 Current Patch Set: 1 Commit: 7176bc9204c134731d96f5151c3709aaec8a4f9e

            "Jian Yu <yujian@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/48901
            Subject: LU-15646 llog: correct llog FID and path output
            Project: fs/lustre-release
            Branch: b2_15
            Current Patch Set: 1
            Commit: 7fec2d29a8ccb5e80ded409de2be3d85c53d40c3

            gerrit Gerrit Updater added a comment - "Jian Yu <yujian@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/48901 Subject: LU-15646 llog: correct llog FID and path output Project: fs/lustre-release Branch: b2_15 Current Patch Set: 1 Commit: 7fec2d29a8ccb5e80ded409de2be3d85c53d40c3
            pjones Peter Jones added a comment -

            Landed for 2.16

            pjones Peter Jones added a comment - Landed for 2.16

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/48430/
            Subject: LU-15646 llog: correct llog FID and path output
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: e28f3ee185b2ef7bad8046f46444772fac214a40

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/48430/ Subject: LU-15646 llog: correct llog FID and path output Project: fs/lustre-release Branch: master Current Patch Set: Commit: e28f3ee185b2ef7bad8046f46444772fac214a40
            tappro Mikhail Pershin added a comment - - edited

            "Mikhail Pershin <mpershin@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/48430
            Subject: LU-15646 llog: correct llog FID and path output
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 42517821d219a299a428902abd34501dd95891db

            tappro Mikhail Pershin added a comment - - edited "Mikhail Pershin <mpershin@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/48430 Subject: LU-15646 llog: correct llog FID and path output Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 42517821d219a299a428902abd34501dd95891db
            adilger Andreas Dilger added a comment - - edited

            Also, llog_reader is not printing the FIDs/pathnames correctly for the catalogs under update_log_dir:

            # ls
            total 292
            36 [0x200000400:0x1:0x0]   0 [0x200000401:0x3:0x0]  36 [0x200000403:0x1:0x0]
            36 [0x200000400:0x2:0x0]  36 [0x200000402:0x1:0x0]  36 [0x200000403:0x2:0x0]
            36 [0x200000401:0x1:0x0]  36 [0x200000402:0x2:0x0]   0 [0x200000403:0x3:0x0]
            40 [0x200000401:0x2:0x0]   0 [0x200000402:0x3:0x0]
            [root@centos7 update_log_dir]# llog_reader '[0x200000402:0x1:0x0]'
            rec #1 type=1064553b len=64 offset 32768
            rec #2 type=1064553b len=64 offset 32832
            Header size : 32768      llh_size : 64
            Time : Sun Jun 12 22:29:38 2022
            Number of records: 2    cat_idx: 0      last_idx: 2
            Target uuid : 
            -----------------------
            #01 (064)id=[0x2:0x402:0x2]:0 path=O/8589935618/d2/2
            #02 (064)id=[0x3:0x402:0x2]:0 path=O/8589935618/d3/3
            

            The FIDs should be [0x200000402:0x2:0x0] and [0x200000402:0x3:0x0], and the pathnames are meaningless - they should be under update_log_dir for the DNE recovery logs.

            adilger Andreas Dilger added a comment - - edited Also, llog_reader is not printing the FIDs/pathnames correctly for the catalogs under update_log_dir : # ls total 292 36 [0x200000400:0x1:0x0] 0 [0x200000401:0x3:0x0] 36 [0x200000403:0x1:0x0] 36 [0x200000400:0x2:0x0] 36 [0x200000402:0x1:0x0] 36 [0x200000403:0x2:0x0] 36 [0x200000401:0x1:0x0] 36 [0x200000402:0x2:0x0] 0 [0x200000403:0x3:0x0] 40 [0x200000401:0x2:0x0] 0 [0x200000402:0x3:0x0] [root@centos7 update_log_dir]# llog_reader '[0x200000402:0x1:0x0]' rec #1 type=1064553b len=64 offset 32768 rec #2 type=1064553b len=64 offset 32832 Header size : 32768 llh_size : 64 Time : Sun Jun 12 22:29:38 2022 Number of records: 2 cat_idx: 0 last_idx: 2 Target uuid : ----------------------- #01 (064)id=[0x2:0x402:0x2]:0 path=O/8589935618/d2/2 #02 (064)id=[0x3:0x402:0x2]:0 path=O/8589935618/d3/3 The FIDs should be [0x200000402:0x2:0x0] and [0x200000402:0x3:0x0] , and the pathnames are meaningless - they should be under update_log_dir for the DNE recovery logs.

            People

              tappro Mikhail Pershin
              adilger Andreas Dilger
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: