nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Namespace creation fixups
@ 2018-06-26 15:37 Keith Busch
  2018-06-26 15:37 ` [PATCH 1/2] libnvdimm: Use largest contiguous area for namespace size Keith Busch
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Keith Busch @ 2018-06-26 15:37 UTC (permalink / raw)
  To: linux-nvdimm, Dan Williams, Dave Jiang, Ross Zwisler, Vishal Verma
  Cc: Yasunori Goto

This is a three-part fixup to the warning that occurs when the available
capacity is fragmented. When this occurs, the user may believe they can
create a larger namespace than is actually possible. This was resulting
in the following kernel warning:

  nd_region region0: allocation underrun: 0x0 of 0x1400000000 bytes
  WARNING: CPU: 32 PID: 1975 at drivers/nvdimm/namespace_devs.c:913 size_store+0x879/0x8d0 [libnvdimm]

The kernel side of this determines the maximum size by calculating the
largest contiguous extent that can be allocated. If the requested size
exceeds that, an error is returned early instead of reaching the
alarming kernel warning.

To make it possible for the user to know the maximum size it may
request, a new attribute is exported that shows the largest available
extent.

Finally, separate from this series, ndctl is updated to make use of this
new attribute when creating a namespace.

Keith Busch (2):
  libnvdimm: Use largest contiguous area for namespace size
  libnvdimm: Export max available extent

 drivers/nvdimm/dimm_devs.c      | 29 +++++++++++++++++++++++++++++
 drivers/nvdimm/namespace_devs.c |  2 +-
 drivers/nvdimm/nd-core.h        |  3 +++
 drivers/nvdimm/region_devs.c    | 39 +++++++++++++++++++++++++++++++++++++++
 4 files changed, 72 insertions(+), 1 deletion(-)

-- 
2.14.3

_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

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

end of thread, other threads:[~2018-07-05 17:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-26 15:37 [PATCH 0/2] Namespace creation fixups Keith Busch
2018-06-26 15:37 ` [PATCH 1/2] libnvdimm: Use largest contiguous area for namespace size Keith Busch
2018-07-05 17:57   ` Dan Williams
2018-07-05 17:58     ` Keith Busch
2018-06-26 15:37 ` [PATCH] ndctl: Use max_available_extent for creating namespaces Keith Busch
2018-06-26 16:19   ` Verma, Vishal L
2018-06-26 16:29     ` Keith Busch
2018-06-26 16:27       ` Verma, Vishal L
2018-06-26 16:32         ` Dan Williams
2018-06-26 16:34           ` Verma, Vishal L
2018-06-26 15:37 ` [PATCH 2/2] libnvdimm: Export max available extent Keith Busch

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).