diff options
author | Peter Jones <pjones@redhat.com> | 2011-01-13 14:59:47 -0500 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2011-01-13 14:59:47 -0500 |
commit | 84c89557a302e18414a011cc52b1abd034860743 (patch) | |
tree | 6b6ca2c400b7a6e09da46b051c177317316f0b93 /include/linux/dm-ioctl.h | |
parent | d9bf0b508ddfe19883b982b29a03c02ccbf53806 (diff) |
dm ioctl: allow rename to fill empty uuid
Allow the uuid of a mapped device to be set after device creation.
Previously the uuid (which is optional) could only be set by
DM_DEV_CREATE. If no uuid was supplied it could not be set later.
Sometimes it's necessary to create the device before the uuid is known,
and in such cases the uuid must be filled in after the creation.
This patch extends DM_DEV_RENAME to accept a uuid accompanied by
a new flag DM_UUID_FLAG. This can only be done once and if no
uuid was previously supplied. It cannot be used to change an
existing uuid.
DM_VERSION_MINOR is also bumped to 19 to indicate this interface
extension is available.
Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'include/linux/dm-ioctl.h')
-rw-r--r-- | include/linux/dm-ioctl.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/linux/dm-ioctl.h b/include/linux/dm-ioctl.h index 49eab360d5d4..e453e1174ae1 100644 --- a/include/linux/dm-ioctl.h +++ b/include/linux/dm-ioctl.h | |||
@@ -44,7 +44,7 @@ | |||
44 | * Remove a device, destroy any tables. | 44 | * Remove a device, destroy any tables. |
45 | * | 45 | * |
46 | * DM_DEV_RENAME: | 46 | * DM_DEV_RENAME: |
47 | * Rename a device. | 47 | * Rename a device or set its uuid if none was previously supplied. |
48 | * | 48 | * |
49 | * DM_SUSPEND: | 49 | * DM_SUSPEND: |
50 | * This performs both suspend and resume, depending which flag is | 50 | * This performs both suspend and resume, depending which flag is |
@@ -267,9 +267,9 @@ enum { | |||
267 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) | 267 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) |
268 | 268 | ||
269 | #define DM_VERSION_MAJOR 4 | 269 | #define DM_VERSION_MAJOR 4 |
270 | #define DM_VERSION_MINOR 18 | 270 | #define DM_VERSION_MINOR 19 |
271 | #define DM_VERSION_PATCHLEVEL 0 | 271 | #define DM_VERSION_PATCHLEVEL 0 |
272 | #define DM_VERSION_EXTRA "-ioctl (2010-06-29)" | 272 | #define DM_VERSION_EXTRA "-ioctl (2010-10-14)" |
273 | 273 | ||
274 | /* Status bits */ | 274 | /* Status bits */ |
275 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ | 275 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ |
@@ -322,4 +322,10 @@ enum { | |||
322 | */ | 322 | */ |
323 | #define DM_UEVENT_GENERATED_FLAG (1 << 13) /* Out */ | 323 | #define DM_UEVENT_GENERATED_FLAG (1 << 13) /* Out */ |
324 | 324 | ||
325 | /* | ||
326 | * If set, rename changes the uuid not the name. Only permitted | ||
327 | * if no uuid was previously supplied: an existing uuid cannot be changed. | ||
328 | */ | ||
329 | #define DM_UUID_FLAG (1 << 14) /* In */ | ||
330 | |||
325 | #endif /* _LINUX_DM_IOCTL_H */ | 331 | #endif /* _LINUX_DM_IOCTL_H */ |