static int do_resume(struct dm_ioctl *param)
{
- int r = 0;
+ int r = 0, resumed = 0;
unsigned suspend_flags = DM_SUSPEND_LOCKFS_FLAG;
struct hash_cell *hc;
struct mapped_device *md;
@@ -919,16 +925,21 @@ static int do_resume(struct dm_ioctl *param)
if (dm_suspended_md(md)) {
r = dm_resume(md);
- if (!r)
+ if (!r) {
dm_ioctl_uevent(md, KOBJ_CHANGE, param->event_nr,
¶m->flags);
+ resumed = 1;
+ }
}
if (old_map)
dm_table_destroy(old_map);
- if (!r)
+ if (!r) {
r = __dev_status(md, param);
+ if (resumed)
+ param->flags |= DM_SUSPEND_CHANGE_FLAG;
+ }
dm_put(md);
return r;
diff --git a/include/linux/dm-ioctl.h b/include/linux/dm-ioctl.h
index 2c445e1..ae957a3 100644
--- a/include/linux/dm-ioctl.h
+++ b/include/linux/dm-ioctl.h
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2001 - 2003 Sistina Software (UK) Limited.
- * Copyright (C) 2004 - 2009 Red Hat, Inc. All rights reserved.
+ * Copyright (C) 2004 - 2010 Red Hat, Inc. All rights reserved.
*
* This file is released under the LGPL.
*/
@@ -266,9 +266,9 @@ enum {
#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)