path: root/sys/sys
diff options
authorMaxim Sobolev <sobomax@FreeBSD.org>2017-08-28 15:54:07 +0000
committerMaxim Sobolev <sobomax@FreeBSD.org>2017-08-28 15:54:07 +0000
commitf7ca2bbe447a5224efb4078fdd1d29910f495b91 (patch)
treecb56738fbda43529121c81ce104b97435b0fe35d /sys/sys
parent505f20a67b7448f332704d03ab3ceb0b83a0bf87 (diff)
Add ability to label md(4) devices.
This feature comes from the fact that we rely memory-backed md(4) in our build process heavily. However, if the build goes haywire the allocated resources (i.e. swap and memory-backed md(4)'s) need to be purged. It is extremely useful to have ability to attach arbitrary labels to each of the virtual disks so that they can be identified and GC'ed if neecessary. MFC after: 4 weeks Differential Revision: https://reviews.freebsd.org/D10457
Notes: svn path=/head/; revision=322969
Diffstat (limited to 'sys/sys')
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/sys/mdioctl.h b/sys/sys/mdioctl.h
index 9a7642923ccd..8f6a2d7e9d31 100644
--- a/sys/sys/mdioctl.h
+++ b/sys/sys/mdioctl.h
@@ -49,7 +49,7 @@ enum md_types {MD_MALLOC, MD_PRELOAD, MD_VNODE, MD_SWAP, MD_NULL};
* Ioctl definitions for memory disk pseudo-device.
-#define MDNPAD 97
+#define MDNPAD 96
struct md_ioctl {
unsigned md_version; /* Structure layout version */
unsigned md_unit; /* unit number */
@@ -61,6 +61,7 @@ struct md_ioctl {
u_int64_t md_base; /* base address */
int md_fwheads; /* firmware heads */
int md_fwsectors; /* firmware sectors */
+ char *md_label; /* label of the device */
int md_pad[MDNPAD]; /* padding for future ideas */