All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v8 0/1] scsi: sas: fix mkfs.xfs failure due to bogus optimal_io_size
@ 2026-05-19 13:52 Ionut Nechita (Wind River)
  2026-05-19 13:52 ` [PATCH v8 1/1] scsi: sas: skip opt_sectors when DMA reports no real optimization hint Ionut Nechita (Wind River)
  0 siblings, 1 reply; 5+ messages in thread
From: Ionut Nechita (Wind River) @ 2026-05-19 13:52 UTC (permalink / raw)
  To: James.Bottomley, martin.petersen
  Cc: linux-scsi, linux-kernel, stable, hch, dlemoal, robin.murphy,
	john.g.garry, axboe, m.szyprowski, ahuang12, ionut_n2001,
	sunlightlinux, Ionut Nechita

From: Ionut Nechita <ionut.nechita@windriver.com>

From: Ionut Nechita <ionut.nechita@windriver.com>

v8 (per Christoph Hellwig's review of v7):
  - Removed the dma_dev->dma_mask guard — dma_opt_mapping_size() and
    dma_max_mapping_size() both return SIZE_MAX when no DMA ops are
    present, so the opt >= max early-return already covers this case.
  - Added inline comments explaining each conditional in the helper.

v7 (per John Garry's review of v6):
  - Dropped the redundant !opt check from the first guard; the
    !opt_sectors check later already handles the opt == 0 case.
    Now simply: if (opt >= max) return;
  - Added Reviewed-by: John Garry <john.g.garry@oracle.com>.
  - Rebased onto linux-next (next-20260414).

v6 (per John Garry's review of v5):
  - Replaced kerneldoc (/**) with a regular comment — function is static.
  - Condensed the comment to a single paragraph.
  - Removed WARN_ONCE for opt > max — not the driver's job.
  - Combined the !opt and opt == max checks into: if (!opt || opt >= max).
  - Apply rounddown_pow_of_two() to min(opt_sectors, max_sectors) instead
    of just opt, since max_sectors can be any value.
  - Restructured as sas_dma_setup_opt_sectors(struct Scsi_Host *shost)
    with the dma_mask check moved inside, removing the need for a
    separate dma_dev variable in sas_host_setup().

v5 (per Damien Le Moal's and James Bottomley's review of v4):
  - Expanded kdoc, inline comment at opt == max, guard for opt == 0
    before rounddown_pow_of_two, trimmed Cc list.

v4 (per Damien Le Moal's review of v3):
  - WARN_ONCE for opt > max, min_t overflow protection, reformatted
    call site.

v3 (per Christoph Hellwig's review of v2):
  - Extracted the opt_sectors logic into a dedicated helper function.
  - Added rounddown_pow_of_two().

v2:
  - Dropped the dma_opt_mapping_size() change per Robin Murphy's
    feedback.

Single patch fixing scsi_transport_sas.c.

Test environment:
  - Dell PowerEdge R750
  - SAS Controller: Broadcom/LSI mpt3sas (SAS3816, FW 33.15.00.00)
  - Disks: SAMSUNG MZILT800HBHQ0D3 (800GB SCSI SAS SSD)
  - Kernel: 6.12.0-1-amd64 with intel_iommu=off
  - IOMMU: Disabled (DMAR: IOMMU disabled), default domain: Passthrough

Based on linux-next (next-20260519).

Link: https://lore.kernel.org/lkml/20260316203956.64515-1-ionut.nechita@windriver.com/ [v1]
Link: https://lore.kernel.org/all/20260318074314.17372-1-ionut.nechita@windriver.com/ [v2]
Link: https://lore.kernel.org/all/20260318200532.51232-1-ionut.nechita@windriver.com/ [v3]
Link: https://lore.kernel.org/lkml/20260319083954.21056-1-ionut.nechita@windriver.com/ [v4]
Link: https://lore.kernel.org/linux-scsi/20260320081429.42106-1-ionut.nechita@windriver.com/ [v5]
Link: https://lore.kernel.org/linux-scsi/20260326084644.27162-1-ionut.nechita@windriver.com/ [v6]
Link: https://lore.kernel.org/linux-scsi/20260415071849.25693-1-ionut.nechita@windriver.com/ [v7]

Ionut Nechita (Wind River) (1):
  scsi: sas: skip opt_sectors when DMA reports no real optimization hint

 drivers/scsi/scsi_transport_sas.c | 43 +++++++++++++++++++++++++++----
 1 file changed, 38 insertions(+), 5 deletions(-)

-- 
2.53.0

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

end of thread, other threads:[~2026-06-02  8:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-19 13:52 [PATCH v8 0/1] scsi: sas: fix mkfs.xfs failure due to bogus optimal_io_size Ionut Nechita (Wind River)
2026-05-19 13:52 ` [PATCH v8 1/1] scsi: sas: skip opt_sectors when DMA reports no real optimization hint Ionut Nechita (Wind River)
2026-05-25  6:02   ` Christoph Hellwig
2026-06-02  1:43   ` Martin K. Petersen
2026-06-02  8:04     ` Ionut Nechita (Wind River)

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.