From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
Cc: Feng Li <lifeng1519@gmail.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Li Feng <fengli@smartx.com>, Jens Axboe <axboe@kernel.dk>,
"open list:BLOCK LAYER" <linux-block@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] blk: avoid divide-by-zero with zero granularity
Date: Tue, 12 Jan 2021 12:46:49 -0500 [thread overview]
Message-ID: <yq1pn2a59u3.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <DM5PR0401MB3591FDAC44CD5665D6CEBDC39BAA0@DM5PR0401MB3591.namprd04.prod.outlook.com> (Johannes Thumshirn's message of "Tue, 12 Jan 2021 17:36:01 +0000")
Johannes,
>> I use the nvme-tcp as the host, the target is spdk nvme-tcp target,
>> and set a wrong block size(i.g. bs=8), then the host prints this oops:
>
> I think the better fix here is to reject devices which report a block size
> small than a sector.
Yep, Linux doesn't support logical block sizes < 512 bytes.
Also, the NVMe spec states:
"A value smaller than 9 (i.e., 512 bytes) is not supported."
--
Martin K. Petersen Oracle Linux Engineering
next prev parent reply other threads:[~2021-01-12 17:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-12 15:29 [PATCH] blk: avoid divide-by-zero with zero granularity Li Feng
2021-01-12 15:34 ` Feng Li
2021-01-12 15:55 ` [PATCH v2] " Li Feng
2021-01-12 17:10 ` Martin K. Petersen
2021-01-12 17:27 ` Feng Li
2021-01-12 17:36 ` Johannes Thumshirn
2021-01-12 17:46 ` Martin K. Petersen [this message]
2021-01-13 2:42 ` Li Feng
2021-01-12 18:42 ` [PATCH] " kernel test robot
2021-01-12 21:49 ` kernel test robot
2021-01-12 22:57 ` kernel test robot
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=yq1pn2a59u3.fsf@ca-mkp.ca.oracle.com \
--to=martin.petersen@oracle.com \
--cc=Johannes.Thumshirn@wdc.com \
--cc=axboe@kernel.dk \
--cc=fengli@smartx.com \
--cc=lifeng1519@gmail.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).