qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Fomichev <dmitry.fomichev@wdc.com>
To: "Kevin Wolf" <kwolf@redhat.com>, "Max Reitz" <mreitz@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Fam Zheng" <famz@redhat.com>,
	"Maxim Levitsky" <mlevitsky@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: Dmitry Fomichev <dmitry.fomichev@wdc.com>,
	Damien Le Moal <damien.lemoal@wdc.com>,
	Alistair Francis <alistair.francis@wdc.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: [PATCH 0/2] block;scsi-generic: Fix max transfer size calculation
Date: Wed, 12 Aug 2020 07:51:20 +0900	[thread overview]
Message-ID: <20200811225122.17342-1-dmitry.fomichev@wdc.com> (raw)

When a host-managed zoned device is passed through to the
guest system using scsi-generic driver, the maximum i/o size for the
drive at the guest may end up being larger than at the host, causing
i/o errors while accessing the backing zoned drive at the host system.

Two problems prevent correct setting of the maximum i/o transfer size
at the guest in this configuration. One issue is specific to
host-managed zone devices - scsi-generic driver doesn't recognize the
SCSI type of HM-zoned devices. The other problem is that file-posix
code for finding max_segments system value doesn't correctly handle
SG nodes.

The following two patches fix these problems.

Based-on: <20200424084338.26803-16-armbru@redhat.com>

Dmitry Fomichev (2):
  file-posix: Correctly read max_segments of SG nodes
  scsi-generic: Fix HM-zoned device scan

 block/file-posix.c       | 55 +++++++++++++++++++++++-----------------
 hw/scsi/scsi-generic.c   | 10 +++++---
 include/scsi/constants.h |  1 +
 3 files changed, 39 insertions(+), 27 deletions(-)

-- 
2.21.0



             reply	other threads:[~2020-08-11 22:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-11 22:51 Dmitry Fomichev [this message]
2020-08-11 22:51 ` [PATCH 1/2] file-posix: Correctly read max_segments of SG nodes Dmitry Fomichev
2020-09-17 13:16   ` Max Reitz
2020-09-17 13:22     ` Maxim Levitsky
2020-09-17 13:24       ` Maxim Levitsky
2020-09-17 16:44         ` Dmitry Fomichev
2020-09-19 15:18           ` Paolo Bonzini
2020-09-19 15:15     ` Paolo Bonzini
2020-08-11 22:51 ` [PATCH 2/2] scsi-generic: Fix HM-zoned device scan Dmitry Fomichev
2020-08-17 15:58   ` Alistair Francis
2020-08-17 16:38 ` [PATCH 0/2] block; scsi-generic: Fix max transfer size calculation Paolo Bonzini

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=20200811225122.17342-1-dmitry.fomichev@wdc.com \
    --to=dmitry.fomichev@wdc.com \
    --cc=alistair.francis@wdc.com \
    --cc=damien.lemoal@wdc.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mlevitsky@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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;
as well as URLs for NNTP newsgroup(s).