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

Update imp_known_replied_xid for resend-replay

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Lustre 2.9.0
    • Lustre 2.8.0, Lustre 2.9.0
    • None
    • 3
    • 9223372036854775807

    Description

      The imp_known_replied_xid is updated each time when we try to get the known replied xid by following function:

      __u64 ptlrpc_known_replied_xid(struct obd_import *imp)
      {
              struct ptlrpc_request *req;
      
              assert_spin_locked(&imp->imp_lock);
              if (list_empty(&imp->imp_unreplied_list))
                      return 0;
      
              req = list_entry(imp->imp_unreplied_list.next, struct ptlrpc_request,
                               rq_unreplied_list);
              LASSERTF(req->rq_xid >= 1, "XID:%llu\n", req->rq_xid);
      
              if (imp->imp_known_replied_xid < req->rq_xid - 1)
                      imp->imp_known_replied_xid = req->rq_xid - 1;
      
              return req->rq_xid - 1;
      }
      

      Usually, the imp_known_replied_xid should be less than or equal to the miminal xid in unreplied list, one exception is resend-repaly request, on reconnection during recovery, we may resend an already replied replay request by re-adding it to unreplied list. The above function needs be amended to handle this case.

      Attachments

        Activity

          [LU-8645] Update imp_known_replied_xid for resend-replay
          pjones Peter Jones added a comment -

          Landed for 2.9

          pjones Peter Jones added a comment - Landed for 2.9

          Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/22776/
          Subject: LU-8645 ptlrpc: update imp_known_replied_xid on resend-replay
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: 51f1b46dab6c2cc16f71d3f3be483f530b5e4001

          gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/22776/ Subject: LU-8645 ptlrpc: update imp_known_replied_xid on resend-replay Project: fs/lustre-release Branch: master Current Patch Set: Commit: 51f1b46dab6c2cc16f71d3f3be483f530b5e4001

          Niu Yawei (yawei.niu@intel.com) uploaded a new patch: http://review.whamcloud.com/22776
          Subject: LU-8645 ptlrpc: update imp_known_replied_xid on resend-replay
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: c67475ffb28ad2123eefdb860446ae0bac92534a

          gerrit Gerrit Updater added a comment - Niu Yawei (yawei.niu@intel.com) uploaded a new patch: http://review.whamcloud.com/22776 Subject: LU-8645 ptlrpc: update imp_known_replied_xid on resend-replay Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: c67475ffb28ad2123eefdb860446ae0bac92534a

          Actually, we'd better keep the ptlrpc_known_replied_xid() untouched but change the replay code to handle this exception.

          niu Niu Yawei (Inactive) added a comment - Actually, we'd better keep the ptlrpc_known_replied_xid() untouched but change the replay code to handle this exception.

          People

            niu Niu Yawei (Inactive)
            niu Niu Yawei (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: