path: root/sbin/mdconfig
diff options
authorStephen J. Kiernan <stevek@FreeBSD.org>2017-05-31 21:18:11 +0000
committerStephen J. Kiernan <stevek@FreeBSD.org>2017-05-31 21:18:11 +0000
commit9a81ba0f241a477b92f3ae3b48429a04724459f2 (patch)
treee4600b82a37dff45691a2d569c138a8e88294049 /sbin/mdconfig
parent9a83b0971e6fc935a65feee3b0e2407a89ccc4bd (diff)
Add MD_VERIFY option to enable O_VERIFY in open for vnode type.
Add -o [no]verify option to mdconfig (and document in man page.) Implement GEOM attribute MNT::verified to ask md if the backing vnode is verified. Check for MNT::verified in cd9660 mount to flag the mount as MNT_VERIFIED if the underlying device has been verified. Reviewed by: rwatson Approved by: sjg (mentor) Obtained from: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D2902
Notes: svn path=/head/; revision=319358
Diffstat (limited to 'sbin/mdconfig')
2 files changed, 13 insertions, 0 deletions
diff --git a/sbin/mdconfig/mdconfig.8 b/sbin/mdconfig/mdconfig.8
index d5000cf1903a..a437e40d58ec 100644
--- a/sbin/mdconfig/mdconfig.8
+++ b/sbin/mdconfig/mdconfig.8
@@ -215,6 +215,14 @@ flag to forcibly destroy an
disk that is still in use.
.It Oo Cm no Oc Ns Cm readonly
Enable/disable readonly mode.
+.It Oo Cm no Oc Ns Cm verify
+.Cm vnode
+backed devices: enable/disable requesting verification of the
+file used for backing store.
+The type of verification depends on which security features are available.
+One example of verification is testing file integrity with
+checksums or cryptographic signatures.
.It Fl u Ar unit
Request a specific unit number or device name for the
@@ -298,6 +306,7 @@ gnop create -o 512K md1
mount /dev/md1.nop /mnt
+.Xr open 2 ,
.Xr md 4 ,
.Xr ffs 7 ,
.Xr gpart 8 ,
diff --git a/sbin/mdconfig/mdconfig.c b/sbin/mdconfig/mdconfig.c
index f1c013c8b9fe..12c2a82c44d7 100644
--- a/sbin/mdconfig/mdconfig.c
+++ b/sbin/mdconfig/mdconfig.c
@@ -193,6 +193,10 @@ main(int argc, char **argv)
mdio.md_options |= MD_RESERVE;
else if (!strcmp(optarg, "noreserve"))
mdio.md_options &= ~MD_RESERVE;
+ else if (!strcmp(optarg, "verify"))
+ mdio.md_options |= MD_VERIFY;
+ else if (!strcmp(optarg, "noverify"))
+ mdio.md_options &= ~MD_VERIFY;
errx(1, "unknown option: %s", optarg);