linux/drivers/nvdimm
Dmitry Krivenok bd26d0d0ce nvdimm: improve diagnosibility of namespaces
In order to bind namespace to the driver user must first
set all mandatory attributes in the following order:
- uuid
- size
- sector_size (for blk namespace only)

If the order is wrong, then user either won't be able to set
the attribute or bind the namespace.

This simple patch improves diagnosibility of common operations
with namespaces by printing some details about the error
instead of failing silently.

Below are examples of error messages (assuming dyndbg is
enabled for nvdimms):

[/]# echo 4194304 > /sys/bus/nd/devices/region5/namespace5.0/size
[  288.372612] nd namespace5.0: __size_store: uuid not set
[  288.374839] nd namespace5.0: size_store: 400000 fail (-6)
sh: write error: No such device or address
[/]#

[/]# echo namespace5.0 > /sys/bus/nd/drivers/nd_blk/bind
[  554.671648] nd_blk namespace5.0: nvdimm_namespace_common_probe: sector size not set
[  554.674688]  ndbus1: nd_blk.probe(namespace5.0) = -19
sh: write error: No such device
[/]#

Signed-off-by: Dmitry V. Krivenok <krivenok.dmitry@gmail.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2015-12-08 16:27:30 -08:00
..
blk.c block: change ->make_request_fn() and users to return a queue cookie 2015-11-07 10:40:46 -07:00
btt_devs.c libnvdimm: btt_devs: Fix locking in namespace_store 2015-09-17 11:37:16 -04:00
btt.c block: change ->make_request_fn() and users to return a queue cookie 2015-11-07 10:40:46 -07:00
btt.h libnvdimm, btt: consolidate arena validation 2015-08-14 13:43:04 -04:00
bus.c nvdimm: Fix return value of nvdimm_bus_init() if class_create() fails 2015-06-30 14:30:34 -04:00
claim.c libnvdimm, pfn: 'struct page' provider infrastructure 2015-08-28 23:39:36 -04:00
core.c block, libnvdimm, nvme: provide a built-in blk_integrity nop profile 2015-10-21 14:43:45 -06:00
dimm_devs.c nvdimm: change to use generic kvfree() 2015-08-27 19:35:48 -04:00
dimm.c libnvdimm: pmem label sets and namespace instantiation. 2015-06-24 21:24:10 -04:00
e820.c libnvdimm, e820: fix numa node for e820-type-12 pmem ranges 2015-11-12 09:21:18 -08:00
Kconfig libnvdimm, pmem: 'struct page' for pmem 2015-08-28 23:40:04 -04:00
label.c libnvdimm: infrastructure for btt devices 2015-06-25 04:20:04 -04:00
label.h libnvdimm: write blk label set 2015-06-24 21:24:10 -04:00
Makefile libnvdimm, pfn: 'struct page' provider infrastructure 2015-08-28 23:39:36 -04:00
namespace_devs.c nvdimm: improve diagnosibility of namespaces 2015-12-08 16:27:30 -08:00
nd-core.h libnvdimm, pfn: 'struct page' provider infrastructure 2015-08-28 23:39:36 -04:00
nd.h libnvdimm, pmem: direct map legacy pmem by default 2015-08-28 23:40:05 -04:00
pfn_devs.c libnvdimm: pfn_devs: Fix locking in namespace_store 2015-09-17 11:47:50 -04:00
pfn.h libnvdimm, pfn: 'struct page' provider infrastructure 2015-08-28 23:39:36 -04:00
pmem.c libnvdimm, pmem: fix size trim in pmem_direct_access() 2015-11-12 09:55:23 -08:00
region_devs.c libnvdimm, pmem: direct map legacy pmem by default 2015-08-28 23:40:05 -04:00
region.c libnvdimm, pfn: 'struct page' provider infrastructure 2015-08-28 23:39:36 -04:00