All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Ming Lei <ming.lei@redhat.com>, io-uring@vger.kernel.org
Cc: Pavel Begunkov <asml.silence@gmail.com>
Subject: Re: [PATCH] io_uring: retry in case of short read on block device
Date: Tue, 31 Aug 2021 06:24:13 -0600	[thread overview]
Message-ID: <8627961e-3f6c-f0d1-9dc4-f3439b2fe590@kernel.dk> (raw)
In-Reply-To: <20210821150751.1290434-1-ming.lei@redhat.com>

On 8/21/21 9:07 AM, Ming Lei wrote:
> In case of buffered reading from block device, when short read happens,
> we should retry to read more, otherwise the IO will be completed
> partially, for example, the following fio expects to read 2MB, but it
> can only read 1M or less bytes:
> 
>     fio --name=onessd --filename=/dev/nvme0n1 --filesize=2M \
> 	--rw=randread --bs=2M --direct=0 --overwrite=0 --numjobs=1 \
> 	--iodepth=1 --time_based=0 --runtime=2 --ioengine=io_uring \
> 	--registerfiles --fixedbufs --gtod_reduce=1 --group_reporting
> 
> Fix the issue by allowing short read retry for block device, which sets
> FMODE_BUF_RASYNC really.

Applied, thanks Ming.

-- 
Jens Axboe


      parent reply	other threads:[~2021-08-31 12:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-21 15:07 [PATCH] io_uring: retry in case of short read on block device Ming Lei
2021-08-31  9:39 ` Ming Lei
2021-08-31 10:07 ` Pavel Begunkov
2021-08-31 12:24 ` Jens Axboe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8627961e-3f6c-f0d1-9dc4-f3439b2fe590@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=asml.silence@gmail.com \
    --cc=io-uring@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.