Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 257691 Details for
Bug 381511
dmraid needs to generate UUIDs for lib device-mapper
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch to add UUID support to dmraid
dmraid-1.0.0.rc14-UUID.patch (text/plain), 1.69 KB, created by
Ian Kent
on 2007-11-14 04:17:31 UTC
(
hide
)
Description:
Patch to add UUID support to dmraid
Filename:
MIME Type:
Creator:
Ian Kent
Created:
2007-11-14 04:17:31 UTC
Size:
1.69 KB
patch
obsolete
>--- 1.0.0.rc14/lib/activate/devmapper.c 2006-09-15 15:52:11.000000000 +0200 >+++ current/lib/activate/devmapper.c 2007-11-13 13:51:11.000000000 +0100 >@@ -21,6 +21,8 @@ > #include "internal.h" > #include "devmapper.h" > >+#include <linux/dm-ioctl.h> >+ > /* Make up a dm path. */ > char *mkdm_path(struct lib_context *lc, const char *name) > { >@@ -147,24 +149,46 @@ > return handle_table(lc, NULL, table, get_target_list()); > } > >+/* Build a UUID for a dmraid device >+ * Return 1 for sucess; 0 for failure*/ >+static int dmraid_uuid(char *uuid, struct lib_context *lc, >+ struct raid_set *rs, uint uuid_len) { >+ /* Clear garbage data from uuid string */ >+ memset(uuid, 0, uuid_len); >+ >+ /* Insert volume name into string */ >+ return !!memcpy(uuid, rs->name, strlen(rs->name)); >+} >+ > /* Create a task, set its name and run it. */ > static int run_task(struct lib_context *lc, struct raid_set *rs, > char *table, int type) > { >+ /* DM_UUID_LEN is defined in dm-ioctl.h as 129 characters; >+ * though not all 129 must be used (md uses just 16 from >+ * a quick review of md.c. >+ * We will be using: (len vol grp name)*/ >+ char uuid[DM_UUID_LEN]; > int ret; > struct dm_task *dmt; > > _init_dm(); >- ret = (dmt = dm_task_create(type)) && dm_task_set_name(dmt, rs->name); >+ ret = (dmt = dm_task_create(type)) && >+ dm_task_set_name(dmt, rs->name); > if (ret && table) > ret = parse_table(lc, dmt, table); > >- if (ret) >+ if (ret) { >+ if (DM_DEVICE_CREATE == type && >+ dmraid_uuid(uuid, lc, rs, DM_UUID_LEN)) >+ dm_task_set_uuid(dmt, uuid); > ret = dm_task_run(dmt); >+ } > > _exit_dm(dmt); > return ret; > } >+ > /* Create a mapped device. */ > int dm_create(struct lib_context *lc, struct raid_set *rs, char *table) > {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 381511
: 257691