Skip to content

Commit 2e05cd6

Browse files
djbwstellarhopper
authored andcommitted
ndctl: Deprecate BLK aperture support
The kernel is dropping its BLK aperture support, so deprecate the same in ndctl. The options will still be supported, and the library calls will not be deleted in case code needs them to compile. However the documentation and the tests for BLK mode can be removed. Link: https://lore.kernel.org/r/164141833579.3990253.17885822648406789915.stgit@dwillia2-desk3.amr.corp.intel.com Tested-by: Alison Schofield <[email protected]> Tested-by: Vaibhav Jain <[email protected]> Signed-off-by: Dan Williams <[email protected]> Signed-off-by: Vishal Verma <[email protected]>
1 parent b787320 commit 2e05cd6

21 files changed

+51
-1530
lines changed

.gitignore

-4
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,16 @@ cscope*.out
4242
tags
4343
test/*.log
4444
test/*.trs
45-
test/blk-ns
4645
test/dax-dev
4746
test/dax-errors
4847
test/dax-pmd
4948
test/daxdev-errors
5049
test/device-dax
51-
test/dpa-alloc
5250
test/dsm-fail
5351
test/hugetlb
5452
test/image
5553
test/libndctl
5654
test/mmap
57-
test/multi-pmem
58-
test/parent-uuid
5955
test/pmem-ns
6056
test/smart-listen
6157
test/smart-notify

Documentation/ndctl/labels-description.txt

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@
33
DESCRIPTION
44
-----------
55
The namespace label area is a small persistent partition of capacity
6-
available on some NVDIMM devices. The label area is used to resolve
7-
aliasing between 'pmem' and 'blk' capacity by delineating namespace
8-
boundaries.
6+
available on some NVDIMM devices. The label area is used to provision
7+
one, or more, namespaces from regions.

Documentation/ndctl/ndctl-create-namespace.txt

+9-20
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,17 @@ ndctl create-namespace -f -e namespace0.0 --mode=sector
2828

2929
OPTIONS
3030
-------
31-
-t::
32-
--type=::
33-
Create a 'pmem' or 'blk' namespace (subject to available
34-
capacity). A pmem namespace supports the dax (direct access)
35-
capability to linkndctl:mmap[2] persistent memory directly into
36-
a process address space. A blk namespace access persistent
37-
memory through a block-window-aperture. Compared to pmem it
38-
supports a traditional storage error model (EIO on error rather
39-
than a cpu exception on a bad memory access), but it does not
40-
support dax.
41-
4231
-m::
4332
--mode=::
4433
- "raw": expose the namespace capacity directly with
45-
limitations. Neither a raw pmem namepace nor raw blk
46-
namespace support sector atomicity by default (see "sector"
47-
mode below). A raw pmem namespace may have limited to no dax
48-
support depending the kernel. In other words operations like
49-
direct-I/O targeting a dax buffer may fail for a pmem
50-
namespace in raw mode or indirect through a page-cache buffer.
51-
See "fsdax" and "devdax" mode for dax operation.
34+
limitations. A raw pmem namepace namespace does not support
35+
sector atomicity (see "sector" mode below). A raw pmem
36+
namespace may have limited to no dax support depending the
37+
kernel. In other words operations like direct-I/O targeting a
38+
dax buffer may fail for a pmem namespace in raw mode or
39+
indirect through a page-cache buffer. See "fsdax" and
40+
"devdax" mode for dax operation.
41+
5242

5343
- "sector": persistent memory, given that it is byte
5444
addressable, does not support sector atomicity. The
@@ -206,8 +196,7 @@ OPTIONS
206196
* NVDIMM does not support labels
207197

208198
* The NVDIMM supports labels, but the Label Index Block (see
209-
UEFI 2.7) is not present and there is no capacity aliasing
210-
between 'blk' and 'pmem' regions.
199+
UEFI 2.7) is not present.
211200

212201
- In the latter case the configuration can be upgraded to
213202
labelled operation by writing an index block on all DIMMs in a

Documentation/ndctl/ndctl-init-labels.txt

+3-4
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ SYNOPSIS
1313
'ndctl init-labels' <nmem0> [<nmem1>..<nmemN>] [<options>]
1414

1515
include::labels-description.txt[]
16-
By default, and in kernels prior to v4.10, the kernel only honors labels
17-
when a DIMM aliases PMEM and BLK capacity. Starting with v4.10 the
18-
kernel will honor labels for sub-dividing PMEM if all the DIMMs in an
19-
interleave set / region have a valid namespace index block.
16+
Starting with v4.10 the kernel will honor labels for sub-dividing PMEM
17+
if all the DIMMs in an interleave set / region have a valid namespace
18+
index block.
2019

2120
This command can be used to initialize the namespace index block if it
2221
is missing or reinitialize it if it is damaged. Note that

Documentation/ndctl/ndctl-list.txt

-4
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,6 @@ include::xable-bus-options.txt[]
8282
'X.Y'. Limit the namespace list to the single identified device
8383
if present.
8484

85-
-t::
86-
--type=::
87-
Filter listing by region type ('pmem' or 'blk')
88-
8985
-m::
9086
--mode=::
9187
Filter listing by the mode ('raw', 'fsdax', 'sector' or 'devdax')

Documentation/ndctl/region-description.txt

+4-6
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
DESCRIPTION
44
-----------
5-
A generic REGION device is registered for each PMEM range or
6-
BLK-aperture set. LIBNVDIMM provides a built-in driver for these REGION
7-
devices. This driver is responsible for reconciling the aliased DPA
8-
mappings across all regions, parsing the LABEL, if present, and then
9-
emitting NAMESPACE devices with the resolved/exclusive DPA-boundaries
10-
for the nd_pmem or nd_blk device driver to consume.
5+
A generic REGION device is registered for each PMEM range /
6+
interleave-set. LIBNVDIMM provides a built-in driver for these REGION
7+
devices. This driver is responsible for parsing namespace labels and
8+
instantiating PMEM namespaces for each coherent set of labels.

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ override dax_pmem * extra
110110
override dax_pmem_core * extra
111111
override dax_pmem_compat * extra
112112
override libnvdimm * extra
113-
override nd_blk * extra
114113
override nd_btt * extra
115114
override nd_e820 * extra
116115
override nd_pmem * extra

contrib/nfit_test_depmod.conf

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ override dax_pmem * extra
55
override dax_pmem_core * extra
66
override dax_pmem_compat * extra
77
override libnvdimm * extra
8-
override nd_blk * extra
98
override nd_btt * extra
109
override nd_e820 * extra
1110
override nd_pmem * extra

ndctl/Makefile.am

+1-5
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ endif
4545
EXTRA_DIST += keys.readme monitor.conf ndctl-monitor.service ndctl.conf
4646

4747
if ENABLE_DESTRUCTIVE
48-
ndctl_SOURCES += ../test/blk_namespaces.c \
49-
../test/pmem_namespaces.c
48+
ndctl_SOURCES += ../test/pmem_namespaces.c
5049
ndctl_SOURCES += bat.c
5150
endif
5251

@@ -67,9 +66,6 @@ if ENABLE_TEST
6766
ndctl_SOURCES += ../test/libndctl.c \
6867
../test/dsm-fail.c \
6968
../util/sysfs.c \
70-
../test/dpa-alloc.c \
71-
../test/parent-uuid.c \
72-
../test/multi-pmem.c \
7369
../test/core.c \
7470
test.c
7571
endif

ndctl/bat.c

-5
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,6 @@ int cmd_bat(int argc, const char **argv, struct ndctl_ctx *ctx)
4141
return EXIT_FAILURE;
4242
}
4343

44-
rc = test_blk_namespaces(loglevel, test, ctx);
45-
fprintf(stderr, "test_blk_namespaces: %s\n", rc ? "FAIL" : "PASS");
46-
if (rc && rc != 77)
47-
return rc;
48-
4944
rc = test_pmem_namespaces(loglevel, test, ctx);
5045
fprintf(stderr, "test_pmem_namespaces: %s\n", rc ? "FAIL" : "PASS");
5146
return ndctl_test_result(test, rc);

ndctl/test.c

-11
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,5 @@ int cmd_test(int argc, const char **argv, struct ndctl_ctx *ctx)
5858
if (rc && rc != 77)
5959
return rc;
6060

61-
rc = test_dpa_alloc(loglevel, test, ctx);
62-
fprintf(stderr, "test-dpa-alloc: %s\n", result(rc));
63-
if (rc && rc != 77)
64-
return rc;
65-
66-
rc = test_parent_uuid(loglevel, test, ctx);
67-
fprintf(stderr, "test-parent-uuid: %s\n", result(rc));
68-
69-
rc = test_multi_pmem(loglevel, test, ctx);
70-
fprintf(stderr, "test-multi-pmem: %s\n", result(rc));
71-
7261
return ndctl_test_result(test, rc);
7362
}

test.h

-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ int ndctl_test_init(struct kmod_ctx **ctx, struct kmod_module **mod,
2626

2727
struct ndctl_ctx;
2828
int test_parent_uuid(int loglevel, struct ndctl_test *test, struct ndctl_ctx *ctx);
29-
int test_multi_pmem(int loglevel, struct ndctl_test *test, struct ndctl_ctx *ctx);
3029
int test_dax_directio(int dax_fd, unsigned long align, void *dax_addr, off_t offset);
3130
int test_dax_remap(struct ndctl_test *test, int dax_fd, unsigned long align, void *dax_addr,
3231
off_t offset, bool fsdax);
@@ -40,9 +39,7 @@ static inline int test_dax_poison(struct ndctl_test *test, int dax_fd,
4039
return 0;
4140
}
4241
#endif
43-
int test_dpa_alloc(int loglevel, struct ndctl_test *test, struct ndctl_ctx *ctx);
4442
int test_dsm_fail(int loglevel, struct ndctl_test *test, struct ndctl_ctx *ctx);
4543
int test_libndctl(int loglevel, struct ndctl_test *test, struct ndctl_ctx *ctx);
46-
int test_blk_namespaces(int loglevel, struct ndctl_test *test, struct ndctl_ctx *ctx);
4744
int test_pmem_namespaces(int loglevel, struct ndctl_test *test, struct ndctl_ctx *ctx);
4845
#endif /* __TEST_H__ */

test/Makefile.am

-31
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,13 @@ include $(top_srcdir)/Makefile.am.in
33
TESTS =\
44
libndctl \
55
dsm-fail \
6-
dpa-alloc \
7-
parent-uuid \
8-
multi-pmem \
96
create.sh \
107
clear.sh \
118
pmem-errors.sh \
129
daxdev-errors.sh \
1310
multi-dax.sh \
1411
btt-check.sh \
1512
label-compat.sh \
16-
blk-exhaust.sh \
1713
sector-mode.sh \
1814
inject-error.sh \
1915
btt-errors.sh \
@@ -35,9 +31,6 @@ EXTRA_DIST += $(TESTS) common \
3531
check_PROGRAMS =\
3632
libndctl \
3733
dsm-fail \
38-
dpa-alloc \
39-
parent-uuid \
40-
multi-pmem \
4134
dax-errors \
4235
smart-notify \
4336
smart-listen \
@@ -48,7 +41,6 @@ check_PROGRAMS =\
4841

4942
if ENABLE_DESTRUCTIVE
5043
TESTS +=\
51-
blk-ns \
5244
pmem-ns \
5345
sub-section.sh \
5446
dax-dev \
@@ -68,7 +60,6 @@ TESTS += security.sh
6860
endif
6961

7062
check_PROGRAMS +=\
71-
blk-ns \
7263
pmem-ns \
7364
dax-dev \
7465
dax-pmd \
@@ -108,18 +99,9 @@ ack_shutdown_count_set_SOURCES =\
10899

109100
ack_shutdown_count_set_LDADD = $(LIBNDCTL_LIB) $(KMOD_LIBS)
110101

111-
blk_ns_SOURCES = blk_namespaces.c $(testcore)
112-
blk_ns_LDADD = $(LIBNDCTL_LIB) $(KMOD_LIBS) $(UUID_LIBS)
113-
114102
pmem_ns_SOURCES = pmem_namespaces.c $(testcore)
115103
pmem_ns_LDADD = $(LIBNDCTL_LIB) $(KMOD_LIBS) $(UUID_LIBS)
116104

117-
dpa_alloc_SOURCES = dpa-alloc.c $(testcore)
118-
dpa_alloc_LDADD = $(LIBNDCTL_LIB) $(UUID_LIBS) $(KMOD_LIBS)
119-
120-
parent_uuid_SOURCES = parent-uuid.c $(testcore)
121-
parent_uuid_LDADD = $(LIBNDCTL_LIB) $(UUID_LIBS) $(KMOD_LIBS)
122-
123105
dax_dev_SOURCES = dax-dev.c $(testcore)
124106
dax_dev_LDADD = $(LIBNDCTL_LIB) $(KMOD_LIBS)
125107

@@ -169,19 +151,6 @@ smart_notify_LDADD = $(LIBNDCTL_LIB)
169151
smart_listen_SOURCES = smart-listen.c
170152
smart_listen_LDADD = $(LIBNDCTL_LIB)
171153

172-
multi_pmem_SOURCES = \
173-
multi-pmem.c \
174-
$(testcore) \
175-
../ndctl/namespace.c \
176-
../ndctl/check.c \
177-
../util/json.c
178-
multi_pmem_LDADD = \
179-
$(LIBNDCTL_LIB) \
180-
$(JSON_LIBS) \
181-
$(UUID_LIBS) \
182-
$(KMOD_LIBS) \
183-
../libutil.a
184-
185154
list_smart_dimm_SOURCES = \
186155
list-smart-dimm.c \
187156
../util/json.c

test/blk-exhaust.sh

-30
This file was deleted.

0 commit comments

Comments
 (0)