All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/3] Couple of fixes detected with blktests
@ 2019-03-11 22:02 Sagi Grimberg
  2019-03-11 22:02 ` [PATCH v4 1/3] nvme: set 0 capacity if namespace block size exceeds PAGE_SIZE Sagi Grimberg
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Sagi Grimberg @ 2019-03-11 22:02 UTC (permalink / raw)


nvme test 009 discovered a few issues with and without multipathing.

1. if a namespace has a larger block size than PAGE_SIZE we either panic
   on a divide by zero with multipathing, or we see I/O errors without it.
   - fix nvmet to always export block size that is leq PAGE_SIZE
   - fix the core to set 0 capacity on such a namespace

2. if a namespace allocation fails after nvme_init_ns_head we leak
   subsystems due to a missing ns_head ref put
   - fix it by putting the ns_head reference on nvme_alloc_ns error flow

Changes from v3:
- don't have the host fail if ns allocation lba_shift exceeds PAGE_SHIFT,
  instead set 0 capacity

Changes from v2:
- add comment to nvmet file ns lba_shift clamping
- add host side protection against such a namespace

Sagi Grimberg (3):
  nvme: set 0 capacity if namespace block size exceeds PAGE_SIZE
  nvme: put ns_head ref if namespace fails allocation
  nvmet-file: clamp-down file namespace lba_shift

 drivers/nvme/host/core.c          | 8 +++++++-
 drivers/nvme/target/io-cmd-file.c | 7 ++++++-
 2 files changed, 13 insertions(+), 2 deletions(-)

-- 
2.17.1

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2019-04-25 14:52 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-11 22:02 [PATCH v4 0/3] Couple of fixes detected with blktests Sagi Grimberg
2019-03-11 22:02 ` [PATCH v4 1/3] nvme: set 0 capacity if namespace block size exceeds PAGE_SIZE Sagi Grimberg
2019-03-11 22:06   ` Keith Busch
2019-03-12 14:32   ` Christoph Hellwig
2019-03-12 15:35     ` Christoph Hellwig
2019-03-12 21:15     ` Sagi Grimberg
2019-03-15 16:28       ` Christoph Hellwig
2019-03-15 16:38         ` Keith Busch
2019-03-15 16:40           ` Christoph Hellwig
2019-03-15 16:47             ` Keith Busch
2019-03-15 17:17         ` Sagi Grimberg
2019-03-15 18:24           ` Christoph Hellwig
2019-03-15 20:44             ` Sagi Grimberg
2019-04-24 18:50               ` Sagi Grimberg
2019-04-25 14:52   ` Christoph Hellwig
2019-03-11 22:02 ` [PATCH v4 2/3] nvme: put ns_head ref if namespace fails allocation Sagi Grimberg
2019-03-12 14:47   ` Christoph Hellwig
2019-03-11 22:02 ` [PATCH v4 3/3] nvmet-file: clamp-down file namespace lba_shift Sagi Grimberg
2019-03-12 14:33   ` Christoph Hellwig
2019-03-12 21:07     ` Sagi Grimberg
2019-03-15 16:29       ` Christoph Hellwig
2019-03-15 17:18         ` Sagi Grimberg

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.