public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Friedrich Weber <f.weber@proxmox.com>
Cc: Damien Le Moal <dlemoal@kernel.org>,
	Mira Limbeck <m.limbeck@proxmox.com>,
	axboe@kernel.dk, hch@lst.de, linux-block@vger.kernel.org,
	martin.petersen@oracle.com
Subject: Re: [PATCH v2] block: Increase BLK_DEF_MAX_SECTORS_CAP
Date: Thu, 2 Apr 2026 09:03:48 -0600	[thread overview]
Message-ID: <ac6FVPT3ZCDoVtb7@kbusch-mbp> (raw)
In-Reply-To: <9bf5286c-bac7-4cb7-9bfe-f47195e18b79@proxmox.com>

On Thu, Apr 02, 2026 at 04:33:47PM +0200, Friedrich Weber wrote:
> We only have limited access to the test machine, so testing this is not
> trivial. If I understand correctly, there is a lead pointing in the direction
> of mpt3sas [1], so I'd postpone this test for now. But if needed, we're happy
> to look into it.

Yeah, the mpt3sas driver isn't using an appropriate sized buffer for
nvme prp handling. The easy option is just force the block layer to
split requests so the driver never sees anything bigger than what it can
currently handle. This should do it. I don't have any such device to
test on, though.

---
diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index 6ff7885572942..c76f5b958c56f 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -2739,7 +2739,10 @@ scsih_sdev_configure(struct scsi_device *sdev, struct queue_limits *lim)
 				pcie_device->connector_name);
 
 		if (pcie_device->nvme_mdts)
-			lim->max_hw_sectors = pcie_device->nvme_mdts / 512;
+			lim->max_hw_sectors = min(pcie_device->nvme_mdts / 512,
+						(SZ_2M / 512) - 8);
+		else
+			lim->max_hw_sectors = (SZ_2M / 512) - 8;
 
 		pcie_device_put(pcie_device);
 		spin_unlock_irqrestore(&ioc->pcie_device_lock, flags);
--

      reply	other threads:[~2026-04-02 15:03 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-18  6:00 [PATCH v2] block: Increase BLK_DEF_MAX_SECTORS_CAP Damien Le Moal
2025-06-18  6:17 ` Hannes Reinecke
2025-06-18  8:51 ` Johannes Thumshirn
2025-06-18  9:06 ` John Garry
2025-06-18  9:47   ` Damien Le Moal
2025-06-18 10:19 ` Martin K. Petersen
2025-06-23 13:40 ` Christoph Hellwig
2025-06-24 16:49 ` Jens Axboe
2025-08-27  7:07   ` Sebastian Andrzej Siewior
2025-08-27  7:38     ` Christoph Hellwig
2025-08-27  7:52       ` Sebastian Andrzej Siewior
2025-08-27  8:00         ` Christoph Hellwig
2025-08-27  8:03           ` Damien Le Moal
2025-08-27  8:01         ` Damien Le Moal
2025-08-27  8:42           ` Sebastian Andrzej Siewior
2025-08-27  9:01             ` Damien Le Moal
2025-08-27 10:16               ` Sebastian Andrzej Siewior
2026-03-31 12:02 ` Mira Limbeck
2026-03-31 12:30   ` Mira Limbeck
2026-03-31 19:48   ` Damien Le Moal
2026-04-01 10:32     ` Mira Limbeck
2026-04-01 20:02       ` Damien Le Moal
2026-04-01 20:55         ` Keith Busch
2026-04-01 23:31           ` Damien Le Moal
2026-04-02 14:33         ` Friedrich Weber
2026-04-02 15:03           ` Keith Busch [this message]

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=ac6FVPT3ZCDoVtb7@kbusch-mbp \
    --to=kbusch@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=dlemoal@kernel.org \
    --cc=f.weber@proxmox.com \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=m.limbeck@proxmox.com \
    --cc=martin.petersen@oracle.com \
    /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