summaryrefslogtreecommitdiffstats
path: root/Documentation/admin-guide/device-mapper
diff options
context:
space:
mode:
authoryangerkun <yangerkun@huawei.com>2020-06-19 23:12:42 +0200
committerMike Snitzer <snitzer@redhat.com>2020-07-20 17:17:41 +0200
commit0c248ea27fc88cf8a3035ba0ed75b210be9abf80 (patch)
tree71b4b586f35944e129f8db51e660b0ff922bf48c /Documentation/admin-guide/device-mapper
parentdm dust: report some message results directly back to user (diff)
downloadlinux-0c248ea27fc88cf8a3035ba0ed75b210be9abf80.tar.xz
linux-0c248ea27fc88cf8a3035ba0ed75b210be9abf80.zip
dm dust: add interface to list all badblocks
This interface may help anyone who want to know all badblocks without querying for each block. [Bryan: DMEMIT message if no blocks are in the bad block list.] Signed-off-by: yangerkun <yangerkun@huawei.com> Signed-off-by: Bryan Gurney <bgurney@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'Documentation/admin-guide/device-mapper')
-rw-r--r--Documentation/admin-guide/device-mapper/dm-dust.rst17
1 files changed, 17 insertions, 0 deletions
diff --git a/Documentation/admin-guide/device-mapper/dm-dust.rst b/Documentation/admin-guide/device-mapper/dm-dust.rst
index cf8079e368de..e35ec8cd2f88 100644
--- a/Documentation/admin-guide/device-mapper/dm-dust.rst
+++ b/Documentation/admin-guide/device-mapper/dm-dust.rst
@@ -206,6 +206,22 @@ appear::
dust_clear_badblocks: no badblocks found
+Listing the bad block list
+--------------------------
+
+To list all bad blocks in the bad block list (using an example device
+with blocks 1 and 2 in the bad block list), run the following message
+command::
+
+ $ sudo dmsetup message dust1 0 listbadblocks
+ 1
+ 2
+
+If there are no bad blocks in the bad block list, the command will
+execute with no output::
+
+ $ sudo dmsetup message dust1 0 listbadblocks
+
Message commands list
---------------------
@@ -224,6 +240,7 @@ Single argument message commands::
countbadblocks
clearbadblocks
+ listbadblocks
disable
enable
quiet