All of lore.kernel.org
 help / color / mirror / Atom feed
From: Feng Li <lifeng1519@gmail.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: 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: Wed, 13 Jan 2021 01:27:10 +0800	[thread overview]
Message-ID: <CAEK8JBALYE0_OzfhrppF38=dD7HKSn-U0ggPJTGgx5849Gfiiw@mail.gmail.com> (raw)
In-Reply-To: <yq1v9c25bm1.fsf@ca-mkp.ca.oracle.com>

Hi Martin,

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:

[   63.153018] nvme nvme0: creating 3 I/O queues.
[   63.181644] nvme nvme0: mapped 3/0/0 default/read/poll queues.
[   63.185568] nvme nvme0: new ctrl: NQN
"nqn.2018-11.io.spdk:nvmf-test", addr 192.168.64.217:4421
[   63.189440] divide error: 0000 [#1] SMP NOPTI
[   63.190963] CPU: 0 PID: 122 Comm: kworker/u8:2 Not tainted
5.9.9-200.fc33.x86_64 #1
[   63.193426] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),
BIOS 1.14.0-1.fc33 04/01/2014
[   63.196263] Workqueue: nvme-wq nvme_scan_work [nvme_core]
[   63.198015] RIP: 0010:blk_stack_limits+0x189/0x440
[   63.199549] Code: 43 28 0f b6 45 62 08 43 62 8b 4d 2c 39 4d 38 0f
43 4d 38 31 d2 45 31 f6 48 8b 04 24 8b 75 34 89 cf 44 8b 43 34 c1 ef
09 09
[   63.203169] RSP: 0018:ffffb312001ffc98 EFLAGS: 00010202
[   63.204034] RAX: 0000000000000000 RBX: ffff9463b270ecc8 RCX: 0000000000000008
[   63.205205] RDX: 0000000000000000 RSI: 0000000000000008 RDI: 0000000000000000
[   63.206377] RBP: ffff9463b27083f8 R08: 0000000000000000 R09: 0000000000000008
[   63.207553] R10: ffff9463b81d6420 R11: 0000035f00000000 R12: ffff9463b2bea000
[   63.208725] R13: ffff9463b6d31258 R14: 0000000000000000 R15: ffff9463b6c22800
[   63.209914] FS:  0000000000000000(0000) GS:ffff9463bec00000(0000)
knlGS:0000000000000000
[   63.211239] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   63.212186] CR2: 000055d73270e690 CR3: 0000000036b32000 CR4: 00000000000006f0
[   63.213383] Call Trace:
[   63.213826]  ? blk_mq_freeze_queue_wait+0x13/0x80
[   63.214609]  __nvme_revalidate_disk+0x191/0x2d0 [nvme_core]
[   63.215528]  nvme_validate_ns+0x3fa/0x960 [nvme_core]
[   63.216374]  nvme_scan_work+0x165/0x3c0 [nvme_core]
[   63.217183]  process_one_work+0x1b4/0x370
[   63.217852]  worker_thread+0x53/0x3e0
[   63.218458]  ? process_one_work+0x370/0x370
[   63.219156]  kthread+0x11b/0x140
[   63.219700]  ? __kthread_bind_mask+0x60/0x60
[   63.220403]  ret_from_fork+0x22/0x30

Martin K. Petersen <martin.petersen@oracle.com> 于2021年1月13日周三 上午1:10写道:
>
>
> Li,
>
> > If the physical_block_size and io_min is less than a sector,
>
> That's not supposed to happen. What device/driver is this?
>
> --
> Martin K. Petersen      Oracle Linux Engineering

  reply	other threads:[~2021-01-12 17:28 UTC|newest]

Thread overview: 14+ 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 [this message]
2021-01-12 17:36       ` Johannes Thumshirn
2021-01-12 17:46         ` Martin K. Petersen
2021-01-13  2:42           ` Li Feng
2021-01-12 18:42 ` [PATCH] " kernel test robot
2021-01-12 18:42   ` kernel test robot
2021-01-12 21:49 ` kernel test robot
2021-01-12 21:49   ` kernel test robot
2021-01-12 22:57 ` 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='CAEK8JBALYE0_OzfhrppF38=dD7HKSn-U0ggPJTGgx5849Gfiiw@mail.gmail.com' \
    --to=lifeng1519@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=fengli@smartx.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.petersen@oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.