diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index 6d7a3d0c8f88cf1d917ca67ecb7dac507615429f..cd6a184536a1c3ec6ca35bd3d912fe25e7d0f804 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c @@ -774,6 +774,8 @@ static int do_suspend(struct dm_ioctl *param) if (param->flags & DM_SKIP_LOCKFS_FLAG) suspend_flags &= ~DM_SUSPEND_LOCKFS_FLAG; + if (param->flags & DM_NOFLUSH_FLAG) + suspend_flags |= DM_SUSPEND_NOFLUSH_FLAG; if (!dm_suspended(md)) r = dm_suspend(md, suspend_flags); @@ -815,6 +817,8 @@ static int do_resume(struct dm_ioctl *param) /* Suspend if it isn't already suspended */ if (param->flags & DM_SKIP_LOCKFS_FLAG) suspend_flags &= ~DM_SUSPEND_LOCKFS_FLAG; + if (param->flags & DM_NOFLUSH_FLAG) + suspend_flags |= DM_SUSPEND_NOFLUSH_FLAG; if (!dm_suspended(md)) dm_suspend(md, suspend_flags); diff --git a/drivers/md/dm.h b/drivers/md/dm.h index 293d5ce62a2150793b787cdd7a683f931c9eeeb3..c307ca9a4c332db76af2caf02aeaf94d4a097376 100644 --- a/drivers/md/dm.h +++ b/drivers/md/dm.h @@ -47,6 +47,7 @@ * Suspend feature flags */ #define DM_SUSPEND_LOCKFS_FLAG (1 << 0) +#define DM_SUSPEND_NOFLUSH_FLAG (1 << 1) /* * List of devices that a metadevice uses and should open/close. diff --git a/include/linux/dm-ioctl.h b/include/linux/dm-ioctl.h index 8853fc4d1c5ebcd3b4f56749208057935955a208..b9348610782181429e24bc682627612d1bae7184 100644 --- a/include/linux/dm-ioctl.h +++ b/include/linux/dm-ioctl.h @@ -285,9 +285,9 @@ typedef char ioctl_struct[308]; #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 10 +#define DM_VERSION_MINOR 11 #define DM_VERSION_PATCHLEVEL 0 -#define DM_VERSION_EXTRA "-ioctl (2006-09-14)" +#define DM_VERSION_EXTRA "-ioctl (2006-10-12)" /* Status bits */ #define DM_READONLY_FLAG (1 << 0) /* In/Out */ @@ -323,4 +323,9 @@ typedef char ioctl_struct[308]; */ #define DM_SKIP_LOCKFS_FLAG (1 << 10) /* In */ +/* + * Set this to suspend without flushing queued ios. + */ +#define DM_NOFLUSH_FLAG (1 << 11) /* In */ + #endif /* _LINUX_DM_IOCTL_H */