Re: [PATCH] nvme: reject the ns when the block size is smaller than a sector

2021-01-14 Thread Li Feng
Christoph Hellwig 于2021年1月15日周五 上午1:43写道: > > On Wed, Jan 13, 2021 at 02:12:59PM -0800, Sagi Grimberg wrote: > >> But this only catches a physical block size < 512 for NVMe, not any other > >> block device. > >> > >> Please fix it for the general case in blk_queue_physical_block_size(). > > > >

Re: [PATCH] nvme: reject the ns when the block size is smaller than a sector

2021-01-14 Thread Sagi Grimberg
But this only catches a physical block size < 512 for NVMe, not any other block device. Please fix it for the general case in blk_queue_physical_block_size(). We actually call that later and would probably be better to check here.. We had a series for that a short while ago that got

Re: [PATCH] nvme: reject the ns when the block size is smaller than a sector

2021-01-14 Thread Christoph Hellwig
On Wed, Jan 13, 2021 at 02:12:59PM -0800, Sagi Grimberg wrote: >> But this only catches a physical block size < 512 for NVMe, not any other >> block device. >> >> Please fix it for the general case in blk_queue_physical_block_size(). > > We actually call that later and would probably be better to

Re: [PATCH] nvme: reject the ns when the block size is smaller than a sector

2021-01-13 Thread Feng Li
Sagi Grimberg 于2021年1月14日周四 上午6:13写道: > > > >> The nvme spec(1.4a, figure 248) says: > >> "A value smaller than 9 (i.e., 512 bytes) is not supported." > >> > >> Signed-off-by: Li Feng > >> --- > >> drivers/nvme/host/core.c | 6 ++ > >> 1 file changed, 6 insertions(+) > >> > >> diff --git

Re: [PATCH] nvme: reject the ns when the block size is smaller than a sector

2021-01-13 Thread Sagi Grimberg
The nvme spec(1.4a, figure 248) says: "A value smaller than 9 (i.e., 512 bytes) is not supported." Signed-off-by: Li Feng --- drivers/nvme/host/core.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index

Re: [PATCH] nvme: reject the ns when the block size is smaller than a sector

2021-01-13 Thread Johannes Thumshirn
On 13/01/2021 17:07, Li Feng wrote: > The nvme spec(1.4a, figure 248) says: > "A value smaller than 9 (i.e., 512 bytes) is not supported." > > Signed-off-by: Li Feng > --- > drivers/nvme/host/core.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/nvme/host/core.c

[PATCH] nvme: reject the ns when the block size is smaller than a sector

2021-01-13 Thread Li Feng
The nvme spec(1.4a, figure 248) says: "A value smaller than 9 (i.e., 512 bytes) is not supported." Signed-off-by: Li Feng --- drivers/nvme/host/core.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index f320273fc672..1f02e6e49a05