From: Mike Christie <michael.christie@oracle.com>
To: Jia Jia <physicalmtea@gmail.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
"Jason Wang" <jasowangio@gmail.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Eugenio Pérez" <eperezma@redhat.com>,
virtualization@lists.linux.dev, kvm@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vhost-scsi: do not count PI bytes in the data length
Date: Thu, 8 Oct 2026 18:52:20 -0500 [thread overview]
Message-ID: <08e68e3e-172e-4349-825e-13bafda8c365@oracle.com> (raw)
In-Reply-To: <20261006082102.27085-1-physicalmtea@gmail.com>
On 10/6/26 3:21 AM, Jia Jia wrote:
> vhost_scsi_handle_vq() moves pi_bytesout and pi_bytesin into the
> protection sgl and subtracts them from exp_data_len. The length passed
> to TCM is still exp_data_len + prot_bytes.
>
> That sum matched an older target path which subtracted prot_length
> again. sbc_check_prot() now replaces data_length from the CDB only
What patch changed this? Did all the drivers except vhost-scsi get fixed?
> when the protect field is non-zero, and only for READ and WRITE.
> target_cmd_size_check() leaves a write's data_length unchanged when the
> CDB size is smaller.
>
> MODE SELECT, SET TARGET PORT GROUPS and UNMAP then use data_length as
> the size of t_data_sg. The PI bytes are not in that sgl. A parameter
Can you have prot_bytes > 0 with those commands?
next prev parent reply other threads:[~2026-10-08 23:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-06 8:21 [PATCH] vhost-scsi: do not count PI bytes in the data length Jia Jia
2026-10-08 23:52 ` Mike Christie [this message]
2026-10-09 1:54 ` Jia Jia
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=08e68e3e-172e-4349-825e-13bafda8c365@oracle.com \
--to=michael.christie@oracle.com \
--cc=eperezma@redhat.com \
--cc=jasowangio@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=physicalmtea@gmail.com \
--cc=stefanha@redhat.com \
--cc=virtualization@lists.linux.dev \
/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