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

don't call aio_complete() in lustre upon errors

    XMLWordPrintable

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

            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: