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

Don't restart CLI IO for IOCB_NOWAIT direct IO

Details

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

    Description

      int cl_io_loop(const struct lu_env *env, struct cl_io *io)
      {
      	int result = 0;
      	int rc = 0;
      
             ...
            if (result == -EAGAIN && io->ci_ndelay) {
      		io->ci_need_restart = 1;
      		result = 0;
      	}
      
      	if (result == 0)
      		result = io->ci_result;
      	RETURN(result < 0 ? result : 0);
      }
      EXPORT_SYMBOL(cl_io_loop);
      
      ssize_t
      generic_file_read_iter(struct kiocb *iocb, struct iov_iter *iter)
      {
      ...
                 if (iocb->ki_flags & IOCB_NOWAIT) {
      			if (filemap_range_has_page(mapping, iocb->ki_pos,
      						   iocb->ki_pos + count - 1))
      				return -EAGAIN;
                     ...
      

      We should handle FLR mirror retry and io_uring IOCB_NOWAIT differently.

      In the current code, it will restart the I/O engine loop when get -EAGAIN return code.
      When io_uring with IOCB_NOWAIT flags and found there are page cache in the I/O range, we should return the -EAGAIN to the caller immediately.
      Otherwise, it will Stuck in an endless loop。

      Attachments

        Issue Links

          Activity

            [LU-15399] Don't restart CLI IO for IOCB_NOWAIT direct IO

            "Etienne AUJAMES <eaujames@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53246
            Subject: LU-15399 llite: dont restart directIO with IOCB_NOWAIT
            Project: fs/lustre-release
            Branch: b2_15
            Current Patch Set: 1
            Commit: ebb2ac34de76fa43bd1de44de712f34362117ece

            gerrit Gerrit Updater added a comment - "Etienne AUJAMES <eaujames@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53246 Subject: LU-15399 llite: dont restart directIO with IOCB_NOWAIT Project: fs/lustre-release Branch: b2_15 Current Patch Set: 1 Commit: ebb2ac34de76fa43bd1de44de712f34362117ece
            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/46147/
            Subject: LU-15399 llite: dont restart directIO with IOCB_NOWAIT
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 8db455c77265063a10a9d08147b8fd4ed20c59c4

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/46147/ Subject: LU-15399 llite: dont restart directIO with IOCB_NOWAIT Project: fs/lustre-release Branch: master Current Patch Set: Commit: 8db455c77265063a10a9d08147b8fd4ed20c59c4

            "Yingjin Qian <qian@ddn.com>" uploaded a new patch: https://review.whamcloud.com/46147
            Subject: LU-15399 llite: dont restart directIO with IOCB_NOWAIT
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 07d7db274e9f906d77274298d83775425cab8f3a

            gerrit Gerrit Updater added a comment - "Yingjin Qian <qian@ddn.com>" uploaded a new patch: https://review.whamcloud.com/46147 Subject: LU-15399 llite: dont restart directIO with IOCB_NOWAIT Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 07d7db274e9f906d77274298d83775425cab8f3a

            People

              qian_wc Qian Yingjin
              qian_wc Qian Yingjin
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: