Message ID | 20241113094727.1497722-8-mcgrof@kernel.org (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Series | enable bs > ps for block devices | expand |
On 11/13/24 10:47, Luis Chamberlain wrote: > The block layer already validates proper block sizes with > blk_validate_block_size() for us so we can remove this now > superfluous check. > > Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> > --- > drivers/nvme/host/core.c | 10 ---------- > 1 file changed, 10 deletions(-) > Reviewed-by: Hannes Reinecke <hare@suse.de> Cheers, Hannes
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 855b42c92284..86ff872cf6bd 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -2022,16 +2022,6 @@ static bool nvme_update_disk_info(struct nvme_ns *ns, struct nvme_id_ns *id, u32 atomic_bs, phys_bs, io_opt = 0; bool valid = true; - /* - * The block layer can't support LBA sizes larger than the page size - * or smaller than a sector size yet, so catch this early and don't - * allow block I/O. - */ - if (head->lba_shift > PAGE_SHIFT || head->lba_shift < SECTOR_SHIFT) { - bs = (1 << 9); - valid = false; - } - atomic_bs = phys_bs = bs; if (id->nabo == 0) { /*
The block layer already validates proper block sizes with blk_validate_block_size() for us so we can remove this now superfluous check. Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> --- drivers/nvme/host/core.c | 10 ---------- 1 file changed, 10 deletions(-)