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

don't call aio_complete() in lustre upon errors

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Lustre 2.14.0
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      See following codes in aio_ret():

          static inline ssize_t aio_ret(struct kiocb *req, ssize_t ret)
          {
                  switch (ret) {
                  case -EIOCBQUEUED:
                          return ret;
                  case -ERESTARTSYS:
                  case -ERESTARTNOINTR:
                  case -ERESTARTNOHAND:
                  case -ERESTART_RESTARTBLOCK:
                          /*
                           * There's no easy way to restart the
                           * syscall since other AIO's may be already running.
                           * Just fail this IO with EINTR.
                           */
                          ret = -EINTR;
                          /*FALLTHRU*/
                  default:
                          aio_complete(req, ret, 0);
                          return 0;
                  }
          }
         

      VFS will call aio_complete() if ret is not -EIOCBQUEUED,
      this could happen when we don't pass user buffer as page
      alignment or some other errors happen in Lustre.

      So in Lustre, we need be careful to handle this case to avoid double
      aio_complete() called.

      Attachments

        Issue Links

          Activity

            [LU-13900] don't call aio_complete() in lustre upon errors
            pjones Peter Jones added a comment -

            Landed for 2.14

            pjones Peter Jones added a comment - Landed for 2.14

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/39636/
            Subject: LU-13900 clio: don't call aio_complete() in lustre upon errors
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 2fb8444b5a636956281f180a04845502e7e99691

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/39636/ Subject: LU-13900 clio: don't call aio_complete() in lustre upon errors Project: fs/lustre-release Branch: master Current Patch Set: Commit: 2fb8444b5a636956281f180a04845502e7e99691

            Wang Shilong (wshilong@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/39636
            Subject: LU-13900 clio: don't call aio_complete() in lustre upon errors
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: fc48392af2a55db944e8bc3411d5975db0bb5886

            gerrit Gerrit Updater added a comment - Wang Shilong (wshilong@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/39636 Subject: LU-13900 clio: don't call aio_complete() in lustre upon errors Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: fc48392af2a55db944e8bc3411d5975db0bb5886

            People

              wshilong Wang Shilong (Inactive)
              wshilong Wang Shilong (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: