All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 1893634] [NEW] blk_get_max_transfer() works only with sg
@ 2020-08-31 10:24 Tom Yan
  2020-08-31 11:08 ` [Bug 1893634] " Tom Yan
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Tom Yan @ 2020-08-31 10:24 UTC (permalink / raw)
  To: qemu-devel

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-08  4:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-31 10:24 [Bug 1893634] [NEW] blk_get_max_transfer() works only with sg Tom Yan
2020-08-31 11:08 ` [Bug 1893634] " Tom Yan
2021-05-08  6:11 ` Thomas Huth
2021-07-08  4:17 ` Launchpad Bug Tracker

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.