diff options
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm-ioctl.c | 4 | ||||
-rw-r--r-- | drivers/md/dm.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index 6d7a3d0c8f88..cd6a184536a1 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 293d5ce62a21..c307ca9a4c33 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. |