[PATCH v3 2/2] scsi: scsi_debug: enable sdebug_sector_size > PAGE_SIZE

sw.prabhu6@gmail.com posted 2 patches 1 month, 2 weeks ago
There is a newer version of this series
[PATCH v3 2/2] scsi: scsi_debug: enable sdebug_sector_size > PAGE_SIZE
Posted by sw.prabhu6@gmail.com 1 month, 2 weeks ago
From: Swarna Prabhu <s.prabhu@samsung.com>

Now that block layer can support block size > PAGE_SIZE
and the issue with WRITE_SAME(16) and WRITE_SAME(10) are
fixed for sector sizes > PAGE_SIZE, enable sdebug_sector_size
> PAGE_SIZE in scsi_debug.

Signed-off-by: Swarna Prabhu <s.prabhu@samsung.com>
---
 drivers/scsi/scsi_debug.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index c947655db518..4c6feee87f05 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -8495,13 +8495,7 @@ static int __init scsi_debug_init(void)
 	} else if (sdebug_ndelay > 0)
 		sdebug_jdelay = JDELAY_OVERRIDDEN;
 
-	switch (sdebug_sector_size) {
-	case  512:
-	case 1024:
-	case 2048:
-	case 4096:
-		break;
-	default:
+	if (blk_validate_block_size(sdebug_sector_size)) {
 		pr_err("invalid sector_size %d\n", sdebug_sector_size);
 		return -EINVAL;
 	}
-- 
2.39.5
Re: [PATCH v3 2/2] scsi: scsi_debug: enable sdebug_sector_size > PAGE_SIZE
Posted by Damien Le Moal 1 month, 2 weeks ago
On 2/14/26 10:18, sw.prabhu6@gmail.com wrote:
> From: Swarna Prabhu <s.prabhu@samsung.com>
> 
> Now that block layer can support block size > PAGE_SIZE
> and the issue with WRITE_SAME(16) and WRITE_SAME(10) are
> fixed for sector sizes > PAGE_SIZE, enable sdebug_sector_size
>> PAGE_SIZE in scsi_debug.
> 
> Signed-off-by: Swarna Prabhu <s.prabhu@samsung.com>

Reviewed-by: Damien Le Moal <dlemoal@kernel.org>


-- 
Damien Le Moal
Western Digital Research
Re: [PATCH v3 2/2] scsi: scsi_debug: enable sdebug_sector_size > PAGE_SIZE
Posted by Hannes Reinecke 2 weeks, 6 days ago
On 2/16/26 23:57, Damien Le Moal wrote:
> On 2/14/26 10:18, sw.prabhu6@gmail.com wrote:
>> From: Swarna Prabhu <s.prabhu@samsung.com>
>>
>> Now that block layer can support block size > PAGE_SIZE
>> and the issue with WRITE_SAME(16) and WRITE_SAME(10) are
>> fixed for sector sizes > PAGE_SIZE, enable sdebug_sector_size
>>> PAGE_SIZE in scsi_debug.
>>
>> Signed-off-by: Swarna Prabhu <s.prabhu@samsung.com>
> 
> Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
> 
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
hare@suse.de                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich