From: Bart Van Assche <bvanassche@acm.org>
To: sw.prabhu6@gmail.com, James.Bottomley@HansenPartnership.com,
martin.petersen@oracle.com, linux-scsi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, mcgrof@kernel.org,
kernel@pankajraghav.com, Swarna Prabhu <s.prabhu@samsung.com>,
Pankaj Raghav <p.raghav@samsung.com>
Subject: Re: [RFC v2 1/2] scsi: sd: fix write_same16 and write_same10 for sector size > PAGE_SIZE
Date: Wed, 3 Dec 2025 16:03:36 -1000 [thread overview]
Message-ID: <de6e39f9-476b-4867-ad55-1f3f3bfbe25d@acm.org> (raw)
In-Reply-To: <20251203230546.1275683-2-sw.prabhu6@gmail.com>
On 12/3/25 1:05 PM, sw.prabhu6@gmail.com wrote:
> - 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 use blk_validate_block_size() instead of open-coding it.
Thanks,
Bart.
prev parent reply other threads:[~2025-12-04 2:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-03 23:05 sw.prabhu6
2025-12-03 23:05 ` [RFC v2 2/2] scsi: scsi_debug: enable sdebug_sector_size " sw.prabhu6
2025-12-04 1:40 ` Luis Chamberlain
2025-12-04 2:02 ` Bart Van Assche
2025-12-04 1:39 ` [RFC v2 1/2] scsi: sd: fix write_same16 and write_same10 for sector size " Luis Chamberlain
2025-12-04 1:59 ` Bart Van Assche
2025-12-04 2:03 ` Bart Van Assche [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=de6e39f9-476b-4867-ad55-1f3f3bfbe25d@acm.org \
--to=bvanassche@acm.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=kernel@pankajraghav.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mcgrof@kernel.org \
--cc=p.raghav@samsung.com \
--cc=s.prabhu@samsung.com \
--cc=sw.prabhu6@gmail.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
all inboxes | Powered by JetHome®