Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106128466
D12230.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D12230.diff
View Options
Index: head/sys/dev/md/md.c
===================================================================
--- head/sys/dev/md/md.c
+++ head/sys/dev/md/md.c
@@ -207,6 +207,7 @@
unsigned opencount;
unsigned fwheads;
unsigned fwsectors;
+ char ident[32];
unsigned flags;
char name[20];
struct proc *procp;
@@ -1181,6 +1182,9 @@
sc->fwheads))) ||
g_handleattr_int(bp, "GEOM::candelete", 1))
error = -1;
+ else if (sc->ident[0] != '\0' &&
+ g_handleattr_str(bp, "GEOM::ident", sc->ident))
+ error = -1;
else if (g_handleattr_int(bp, "MNT::verified", isv))
error = -1;
else
@@ -1414,6 +1418,8 @@
sc->fwsectors = mdio->md_fwsectors;
if (mdio->md_fwheads != 0)
sc->fwheads = mdio->md_fwheads;
+ snprintf(sc->ident, sizeof(sc->ident), "MD-DEV%ju-INO%ju",
+ (uintmax_t)vattr.va_fsid, (uintmax_t)vattr.va_fileid);
sc->flags = mdio->md_options & (MD_FORCE | MD_ASYNC | MD_VERIFY);
if (!(flags & FWRITE))
sc->flags |= MD_READONLY;
@@ -1898,6 +1904,11 @@
indent, (uintmax_t) mp->fwheads);
sbuf_printf(sb, "%s<fwsectors>%ju</fwsectors>\n",
indent, (uintmax_t) mp->fwsectors);
+ if (mp->ident[0] != '\0') {
+ sbuf_printf(sb, "%s<ident>", indent);
+ g_conf_printf_escaped(sb, "%s", mp->ident);
+ sbuf_printf(sb, "</ident>\n");
+ }
sbuf_printf(sb, "%s<length>%ju</length>\n",
indent, (uintmax_t) mp->mediasize);
sbuf_printf(sb, "%s<compression>%s</compression>\n", indent,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 26, 9:09 PM (11 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15607896
Default Alt Text
D12230.diff (1 KB)
Attached To
Mode
D12230: Make md(4) support GEOM::ident.
Attached
Detach File
Event Timeline
Log In to Comment