diff options
author | Peter Rajnoha <prajnoha@redhat.com> | 2010-03-23 14:38:37 +0000 |
---|---|---|
committer | Peter Rajnoha <prajnoha@redhat.com> | 2010-03-23 14:38:37 +0000 |
commit | ac3691f70e9ab0638820384aa03ed9913b79772b (patch) | |
tree | cd32d4dbe0b563569a6c821c3342bf3f1cd9452b /libdm/misc | |
parent | 8b373275a25da1269369e605d9c26ff2414305fe (diff) | |
download | lvm2-ac3691f70e9ab0638820384aa03ed9913b79772b.tar.gz lvm2-ac3691f70e9ab0638820384aa03ed9913b79772b.tar.xz lvm2-ac3691f70e9ab0638820384aa03ed9913b79772b.zip |
Add support for ioctl's DM_UEVENT_GENERATED_FLAG.
We need to know whether we should wait for any uevent or not when
using udev_sync. A kernel patch was posted recently that changed the
way uevents are sent on dm device resume - it is sent only if the
device has been suspended before. There's also a new DM_UEVENT_GENERATED_FLAG
in the ioctl to notify userspace whether the event was generated.
If the uevent was not generated (e.g. the situation where the device is
*not* suspended and we call a resume), we just call dm_udev_complete
explicitly from within libdevmapper itself to prevent infinite waiting
while trying to synchronise with udev processing.
Diffstat (limited to 'libdm/misc')
-rw-r--r-- | libdm/misc/dm-ioctl.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libdm/misc/dm-ioctl.h b/libdm/misc/dm-ioctl.h index 77979842..a7b80f6a 100644 --- a/libdm/misc/dm-ioctl.h +++ b/libdm/misc/dm-ioctl.h @@ -268,9 +268,9 @@ enum { #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) #define DM_VERSION_MAJOR 4 -#define DM_VERSION_MINOR 16 +#define DM_VERSION_MINOR 17 #define DM_VERSION_PATCHLEVEL 0 -#define DM_VERSION_EXTRA "-ioctl (2009-11-05)" +#define DM_VERSION_EXTRA "-ioctl (2010-03-05)" /* Status bits */ #define DM_READONLY_FLAG (1 << 0) /* In/Out */ @@ -318,4 +318,9 @@ enum { */ #define DM_QUERY_INACTIVE_TABLE_FLAG (1 << 12) /* In */ +/* + * If set, a uevent was generated for which the caller may need to wait. + */ +#define DM_UEVENT_GENERATED_FLAG (1 << 13) /* Out */ + #endif /* _LINUX_DM_IOCTL_H */ |