All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Yan <1893634@bugs.launchpad.net>
To: qemu-devel@nongnu.org
Subject: [Bug 1893634] [NEW] blk_get_max_transfer() works only with sg
Date: Mon, 31 Aug 2020 10:24:49 -0000	[thread overview]
Message-ID: <159886949002.28151.4021199873744523881.malonedeb@soybean.canonical.com> (raw)

Public bug reported:

blk_get_max_transfer() is supposed to be able to get the max_sectors
queue limit of the scsi device on the host side and is used in both
scsi-generic.c (for scsi-generic and scsi-block) and scsi-disk.c (for
scsi-hd) to set/change the max_xfer_len (and opt_xfer_len in the case of
scsi-generic).

However, it only works with the sg driver in doing so. It cannot get the
queue limit with the sd driver and simply returns MAX_INT.

qemu version 5.1.0
kernel version 5.8.5

Btw, is there a particular reason that it doesn't MIN_NON_ZERO against
the original max_xfer_len:
https://github.com/qemu/qemu/blob/v5.1.0/hw/scsi/scsi-generic.c#L172?

** Affects: qemu
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1893634

Title:
  blk_get_max_transfer() works only with sg

Status in QEMU:
  New

Bug description:
  blk_get_max_transfer() is supposed to be able to get the max_sectors
  queue limit of the scsi device on the host side and is used in both
  scsi-generic.c (for scsi-generic and scsi-block) and scsi-disk.c (for
  scsi-hd) to set/change the max_xfer_len (and opt_xfer_len in the case
  of scsi-generic).

  However, it only works with the sg driver in doing so. It cannot get
  the queue limit with the sd driver and simply returns MAX_INT.

  qemu version 5.1.0
  kernel version 5.8.5

  Btw, is there a particular reason that it doesn't MIN_NON_ZERO against
  the original max_xfer_len:
  https://github.com/qemu/qemu/blob/v5.1.0/hw/scsi/scsi-generic.c#L172?

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1893634/+subscriptions


             reply	other threads:[~2020-08-31 10:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-31 10:24 Tom Yan [this message]
2020-08-31 11:08 ` [Bug 1893634] Re: blk_get_max_transfer() works only with sg Tom Yan
2021-05-08  6:11 ` Thomas Huth
2021-07-08  4:17 ` Launchpad Bug Tracker

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=159886949002.28151.4021199873744523881.malonedeb@soybean.canonical.com \
    --to=1893634@bugs.launchpad.net \
    --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 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.