public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/2] enable sector size > PAGE_SIZE for scsi
@ 2026-02-19  4:37 sw.prabhu6
  2026-02-19  4:37 ` [PATCH 1/2] scsi: sd: enable sector size > PAGE_SIZE in scsi sd driver sw.prabhu6
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: sw.prabhu6 @ 2026-02-19  4:37 UTC (permalink / raw)
  To: James.Bottomley, martin.petersen, linux-scsi
  Cc: linux-kernel, mcgrof, pankaj.raghav, bvanassche, dlemoal,
	Swarna Prabhu

From: Swarna Prabhu <sw.prabhu6@gmail.com>

Hi All,

This is v4 series sent based on the review comments received on v3 [1].
This patchset enables sector sizes > PAGE_SIZE for
sd driver and scsi_debug driver since block layer can support block
size > PAGE_SIZE. There was one issue with write_same16 and write_same10
command, which is fixed as a part of the series.

Changes since v2:
 - Added reviewed by tag for scsi sd driver and scsi_debug patch.
 - Modified the helper function name used for safe creation and destruction
   of the large page mempool.
 - No functional changes.

Thanks to Damien for review.

Testing:
Testing results are same as v3 since no functional changes introduced in v4.

Link to v3: https://lore.kernel.org/all/20260214011829.508272-1-sw.prabhu6@gmail.com/ [1]

Swarna Prabhu (2):
  scsi: sd: enable sector size > PAGE_SIZE in scsi sd driver
  scsi: scsi_debug: enable sdebug_sector_size > PAGE_SIZE

 drivers/scsi/scsi_debug.c |  8 +---
 drivers/scsi/sd.c         | 80 +++++++++++++++++++++++++++++++++------
 2 files changed, 69 insertions(+), 19 deletions(-)

-- 
2.39.5


^ permalink raw reply	[flat|nested] 11+ messages in thread
* [PATCH v2 0/2] enable sector size > PAGE_SIZE for scsi
@ 2026-02-11  1:50 sw.prabhu6
  2026-02-11  1:50 ` [PATCH 2/2] scsi: scsi_debug: enable sdebug_sector_size > PAGE_SIZE sw.prabhu6
  0 siblings, 1 reply; 11+ messages in thread
From: sw.prabhu6 @ 2026-02-11  1:50 UTC (permalink / raw)
  To: James.Bottomley, martin.petersen, linux-scsi
  Cc: linux-kernel, mcgrof, pankaj.raghav, bvanassche, dlemoal,
	Swarna Prabhu

From: Swarna Prabhu <sw.prabhu6@gmail.com>

Hi All,

This is v2 series sent based on the feedback received on v1 [1] and RFC
series. This patchset enables sector sizes > PAGE_SIZE for
sd driver and scsi_debug driver since block layer can support block
size > PAGE_SIZE. There was one issue with write_same16 and write_same10
command, which is fixed as a part of the series.

Changes since v1:
 - Retain the single page mempool for the regular devices.
 - Initialize a large page mempool at 'sd_probe' when the first device with
   sector size > 4k is detected for sd driver with ensuring atomicity.
 - Safe destruction of the large page mempool in 'sd_probe' if the device
   fails at probe after the mempool is successfully created.
 - Safe destruction of the large page mempool in 'sd_remove' when the last
   device with sector size > PAGE_SIZE is detached from the system.
 - Added a check in 'sd_set_special_bvec' to use the correct mempool for
   allocation based on the sector size of the device.
 - Added a check in 'sd_uninit_command' to use the correct mempool for
   freeing based on the sector size of the device.
 - Added check to destroy large page mempool if it exists while exiting
   sd driver.
 - Slightly modified the git commit message to update the above changes
   for scsi sd driver fix patch.

Thanks to Damien for feedback on the v1 series.

Testing:
 -Test suite: xfs and generic from fstest + QEMU emulated block
    device(scsi and nvme)
  - fstest Config for patched xfs 16k block size [xfs_reflink_16k_scsi]
    TEST_DEV=/dev/sda
    SCRATCH_DEV_POOL="/dev/sdb"
    MKFS_OPTIONS='-f -m reflink=1,rmapbt=1, -i sparse=1, -b size=16384,
    -s size=16384'
  - Generic test results
    Baseline: 6.19-rc8 kernel + nvme 16k logical block size
    Patched: 6.19-rc8 kernel + scsi 16k logical block size
    No regressions introduced by the patch.
  - XFS tests results
    Baseline: 6.19-rc8 kernel + nvme 16k logical block size
    Patched: 6.19-rc8 kernel + scsi 16k logical block size
    No regressions introduced by the patch
  - Blktests results
    scsi and block layer tests with 16k logical block size.
    Baseline: vanilla kernel + scsi 4k
    No regressions seen by the patch.

Link to v1: https://lore.kernel.org/all/20251210014136.2549405-1-sw.prabhu6@gmail.com/ [1]

Swarna Prabhu (2):
  scsi: sd: fix write_same(16/10) to enable sector size > PAGE_SIZE
  scsi: scsi_debug: enable sdebug_sector_size > PAGE_SIZE

 drivers/scsi/scsi_debug.c |  8 +---
 drivers/scsi/sd.c         | 79 +++++++++++++++++++++++++++++++++------
 2 files changed, 68 insertions(+), 19 deletions(-)

-- 
2.39.5


^ permalink raw reply	[flat|nested] 11+ messages in thread
* [v1 0/2] enable sector size > PAGE_SIZE for scsi
@ 2025-12-10  1:41 sw.prabhu6
  2025-12-10  1:41 ` [PATCH 2/2] scsi: scsi_debug: enable sdebug_sector_size > PAGE_SIZE sw.prabhu6
  0 siblings, 1 reply; 11+ messages in thread
From: sw.prabhu6 @ 2025-12-10  1:41 UTC (permalink / raw)
  To: James.Bottomley, martin.petersen, linux-scsi
  Cc: bvanassche, linux-kernel, mcgrof, kernel, dlemoal, Swarna Prabhu

From: Swarna Prabhu <sw.prabhu6@gmail.com>

Hi All,

This is non RFC v1 series sent based on the feedback received on RFC
v2 [1] and RFC v1 [2]. This patchset enables sector sizes > PAGE_SIZE for
sd driver and scsi_debug driver since block layer can support block
size > PAGE_SIZE. There was one issue with write_same16 and write_same10
command, which is fixed as a part of the series.

Motivation:
 - While enabling LBS on ZoneFS, zonefs-tools tests were being skipped
   for conventional zones when tested on nvme block device emulated using
   QEMU. Hence there was a need to enable scsi with higher sector sizes
   to run zonefs tests for conventional zones as well.

Changes since RFC v2:
 - Replaced open coded check for enabling sdebug_sector_size > PAGE_SIZE
   with blk_validate_block_size() in scsi_debug.
 - Replaced open coded check for enabling sector_size > PAGE_SIZE
   with blk_validate_block_size() in sd driver.
 - Replaced 'struct request *rq' argument in  'sd_set_special_bvec()' to
   'struct scsi_cmnd *cmnd' and used that to get SCSI device pointer
   'struct scsi_device *sdp'.
 - Slightly modified the commit title for scsi sd driver fix patch.
 - Added "Cc: stable@vger.kernel.org" tag to scsi sd driver fix patch.

Changes since RFC v1:
 - Re organized the patch series into one patch for scsi_debug driver
   and one patch for sd driver.
 - Updated commit title and description to accommodate the above
   re organization on commit titled - scsi: sd: fix write_same(16/10)
   to enable sector size > PAGE_SIZE.
 - Updated commit title and description to reflect the re organization
   on commit titled - scsi: scsi_debug: enable sdebug_sector_size
   > PAGE_SIZE.

Thanks to Bart for feedback on the RFC v1 and v2 series.

Testing:
 -Test suite: xfs and generic from fstest + QEMU emulated block
    device(scsi and nvme)
  - fstest Config for patched xfs 16k block size [xfs_reflink_16k_scsi]
    TEST_DEV=/dev/sda
    SCRATCH_DEV_POOL="/dev/sdb"
    MKFS_OPTIONS='-f -m reflink=1,rmapbt=1, -i sparse=1, -b size=16384,
    -s size=16384'
  - Generic test results
    Baseline: 6.18.0-rc7 kernel + nvme 16k logical block size
    Patched: 6.18 kernel + scsi 16k logical block size
    5 failures seen on generic tests and the same seen on baseline
    No regressions introduced by the patch.
  - XFS tests results
    Baseline: 6.18.0-rc7 kernel + nvme16k logical block size
    Patched: 6.18 kernel + sci 16k logical block size
    30 failures seen on patched and baseline
    No regressions introduced by the patch
  - Blktests results
    scis and block layer tests with 16k and 32k logical block size.
    config used:
    TEST_DEVS=(/dev/sda)
    EXCLUDE=(block/010 block/011) # these didn't run on baseline(nvme 16k)
    All tests passed.

Link to RFC v2: https://lore.kernel.org/all/20251203230546.1275683-2-sw.prabhu6@gmail.com/ [1]
Link to RFC v1: https://lore.kernel.org/all/20251202021522.188419-1-sw.prabhu6@gmail.com/ [2]

Swarna Prabhu (2):
  scsi: sd: fix write_same(16/10) to enable sector size > PAGE_SIZE
  scsi: scsi_debug: enable sdebug_sector_size > PAGE_SIZE

 drivers/scsi/scsi_debug.c |  8 +-------
 drivers/scsi/sd.c         | 27 +++++++++++++++++----------
 2 files changed, 18 insertions(+), 17 deletions(-)

-- 
2.51.0


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

end of thread, other threads:[~2026-03-11  2:06 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-19  4:37 [PATCH v4 0/2] enable sector size > PAGE_SIZE for scsi sw.prabhu6
2026-02-19  4:37 ` [PATCH 1/2] scsi: sd: enable sector size > PAGE_SIZE in scsi sd driver sw.prabhu6
2026-03-01  1:49   ` Martin K. Petersen
2026-02-19  4:37 ` [PATCH 2/2] scsi: scsi_debug: enable sdebug_sector_size > PAGE_SIZE sw.prabhu6
2026-02-27  8:35   ` John Garry
2026-03-02 12:27     ` Swarna Prabhu
2026-03-02 12:37       ` John Garry
2026-02-27  3:09 ` [PATCH v4 0/2] enable sector size > PAGE_SIZE for scsi Swarna Prabhu
2026-03-11  2:06 ` (subset) " Martin K. Petersen
  -- strict thread matches above, loose matches on Subject: below --
2026-02-11  1:50 [PATCH v2 " sw.prabhu6
2026-02-11  1:50 ` [PATCH 2/2] scsi: scsi_debug: enable sdebug_sector_size > PAGE_SIZE sw.prabhu6
2025-12-10  1:41 [v1 0/2] enable sector size > PAGE_SIZE for scsi sw.prabhu6
2025-12-10  1:41 ` [PATCH 2/2] scsi: scsi_debug: enable sdebug_sector_size > PAGE_SIZE sw.prabhu6

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox