Linux block layer
 help / color / mirror / Atom feed
From: Utkarsh Singh <utsingh@redhat.com>
To: Ming Lei <tom.leiming@gmail.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org,
	Caleb Sander Mateos <csander@purestorage.com>,
	Shuah Khan <shuah@kernel.org>,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v2 0/5] ublk: fix completion of short READ/WRITE
Date: Wed, 2 Dec 2026 11:58:13 +0530	[thread overview]
Message-ID: <aw-6fetaQv2f9oFb@redhat.com> (raw)
In-Reply-To: <20261201095153.1012606-1-tom.leiming@gmail.com>

On Tue, Dec 01, 2026 at 03:51:46AM -0600, Ming Lei wrote:
>Hi Jens,
>
>Since commit a8a79eba22dc ("ublk: lift checks out of
>ublk_{,un}map_io()"), a short result from the ublk server is ignored for
>WRITE, and for READ on user copy, zero copy, auto buffer registration
>and shmem zero copy devices: the request is completed in full.
>
I tested this patch series on fe6ff8d5d675 ("Linux 7.4-rc5"), x86_64.

test_loop_09.sh and test_stripe_01..06.sh pass. I traced loop_09 to
check nothing was silently skipped: all six modes run and NR_RUN
reaches 6. Also confirmed the original failure on plain v7.4-rc5 --
dd reported 17 blocks written with rc=0 while 60K never reached the
backing file -- and its absence with the series applied.

For patch 2 I hacked fault_inject to complete READ/WRITE with an
injected byte count. With dd bs=4096 (blk_rq_bytes 4096, logical
block size 512):

   io->res = 100   (not block aligned)       -> EIO
   io->res = 0                               -> EIO
   io->res = 8192  (> blk_rq_bytes, aligned) -> EIO
   io->res = 4096  (full length)             -> completes normally
   io->res = 2048  (short but aligned)       -> requeued, completes

So all three rejection branches fire and a legitimate short result is
still requeued rather than rejected. Happy to post the fault_inject
--bad_res knob separately if useful.

Patch 4 is untested: kublk has no zoned target, so a short zone append
can't be exercised from the suite at all.

Tested-by: Utkarsh Singh <utsingh@redhat.com>

      parent reply	other threads:[~2026-12-02  6:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01  9:51 [PATCH v2 0/5] ublk: fix completion of short READ/WRITE Ming Lei
2026-12-01  9:51 ` [PATCH v2 1/5] selftests: ublk: complete a striped request with its full length Ming Lei
2026-12-01  9:51 ` [PATCH v2 2/5] ublk: fail READ/WRITE if the result from the server is invalid Ming Lei
2026-12-01 19:57   ` Caleb Sander Mateos
2026-12-01  9:51 ` [PATCH v2 3/5] ublk: don't complete a short request in full Ming Lei
2026-12-01 20:03   ` Caleb Sander Mateos
2026-12-01  9:51 ` [PATCH v2 4/5] ublk: fail a short zone append Ming Lei
2026-12-01 20:04   ` Caleb Sander Mateos
2026-12-02  1:57     ` Ming Lei
2026-12-02  3:33     ` Ming Lei
2026-12-02  4:49       ` Caleb Sander Mateos
2026-12-01  9:51 ` [PATCH v2 5/5] selftests: ublk: test that a short request isn't completed in full Ming Lei
2026-12-02  6:28 ` Utkarsh Singh [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=aw-6fetaQv2f9oFb@redhat.com \
    --to=utsingh@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=csander@purestorage.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=tom.leiming@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox