[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aS-K0LVwGazNyVNj@deb-101020-bm01.eng.stellus.in>
Date: Wed, 3 Dec 2025 00:56:48 +0000
From: Swarna Prabhu <sw.prabhu6@...il.com>
To: Bart Van Assche <bvanassche@....org>
Cc: James.Bottomley@...senpartnership.com, martin.petersen@...cle.com,
linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
mcgrof@...nel.org, kernel@...kajraghav.com,
Swarna Prabhu <s.prabhu@...sung.com>
Subject: Re: [PATCH 2/2] scsi: enable sector_size > PAGE_SIZE
On Tue, Dec 02, 2025 at 02:30:19PM -1000, Bart Van Assche wrote:
> On 12/1/25 4:15 PM, sw.prabhu6@...il.com wrote:
> > diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
> > index b2ab97be5db3..b5839e62d3bb 100644
> > --- a/drivers/scsi/scsi_debug.c
> > +++ b/drivers/scsi/scsi_debug.c
> > @@ -8459,13 +8459,8 @@ 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 (sdebug_sector_size < 512 || sdebug_sector_size > BLK_MAX_BLOCK_SIZE ||
> > + !is_power_of_2(sdebug_sector_size)) {
> > pr_err("invalid sector_size %d\n", sdebug_sector_size);
> > return -EINVAL;
> > }
> > diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
> > index c3502fcba1bb..f2eac79d7263 100644
> > --- a/drivers/scsi/sd.c
> > +++ b/drivers/scsi/sd.c
> > @@ -2889,10 +2889,8 @@ sd_read_capacity(struct scsi_disk *sdkp, struct queue_limits *lim,
> > "assuming 512.\n");
> > }
> > - if (sector_size != 512 &&
> > - sector_size != 1024 &&
> > - sector_size != 2048 &&
> > - sector_size != 4096) {
> > + if (sector_size < 512 || sector_size > BLK_MAX_BLOCK_SIZE ||
> > + !is_power_of_2(sector_size)) {
> > sd_printk(KERN_NOTICE, sdkp, "Unsupported sector size %d.\n",
> > sector_size);
> > /*
>
> Please reorganize this patch series into one patch for the scsi_debug
> driver and another patch for the sd driver.
>
Sure, will do.
Thanks
Swarna
Powered by blists - more mailing lists