* [RFC][PATCH 1/4] dm: restore presuspend status
@ 2010-02-23 18:45 ` Takahiro Yasui
0 siblings, 0 replies; 2+ messages in thread
From: Takahiro Yasui @ 2010-02-23 18:45 UTC (permalink / raw)
To: device-mapper development; +Cc: k-ueda, LVM2 development
When suspend procedure was interrupted just after a target's presuspend
method was executed, dm_suspend() calls the target's resume method to
cancel the target's state changes.
Signed-off-by: Takahiro Yasui <tyasui@redhat.com>
---
drivers/md/dm.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
Index: linux-2.6.33-rc1-dm/drivers/md/dm.c
===================================================================
--- linux-2.6.33-rc1-dm.orig/drivers/md/dm.c
+++ linux-2.6.33-rc1-dm/drivers/md/dm.c
@@ -2475,7 +2475,6 @@ int dm_suspend(struct mapped_device *md,
if (noflush)
set_bit(DMF_NOFLUSH_SUSPENDING, &md->flags);
- /* This does not get reverted if there's an error later. */
dm_table_presuspend_targets(map);
/*
@@ -2486,8 +2485,10 @@ int dm_suspend(struct mapped_device *md,
*/
if (!noflush && do_lockfs) {
r = lock_fs(md);
- if (r)
+ if (r) {
+ dm_table_resume_targets(map);
goto out;
+ }
}
/*
@@ -2541,6 +2542,8 @@ int dm_suspend(struct mapped_device *md,
start_queue(md->queue);
unlock_fs(md);
+
+ dm_table_resume_targets(map);
goto out; /* pushback list is already flushed, so skip flush */
}
--
lvm-devel mailing list
lvm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/lvm-devel
^ permalink raw reply [flat|nested] 2+ messages in thread* [RFC][PATCH 1/4] dm: restore presuspend status
@ 2010-02-23 18:45 ` Takahiro Yasui
0 siblings, 0 replies; 2+ messages in thread
From: Takahiro Yasui @ 2010-02-23 18:45 UTC (permalink / raw)
To: lvm-devel
When suspend procedure was interrupted just after a target's presuspend
method was executed, dm_suspend() calls the target's resume method to
cancel the target's state changes.
Signed-off-by: Takahiro Yasui <tyasui@redhat.com>
---
drivers/md/dm.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
Index: linux-2.6.33-rc1-dm/drivers/md/dm.c
===================================================================
--- linux-2.6.33-rc1-dm.orig/drivers/md/dm.c
+++ linux-2.6.33-rc1-dm/drivers/md/dm.c
@@ -2475,7 +2475,6 @@ int dm_suspend(struct mapped_device *md,
if (noflush)
set_bit(DMF_NOFLUSH_SUSPENDING, &md->flags);
- /* This does not get reverted if there's an error later. */
dm_table_presuspend_targets(map);
/*
@@ -2486,8 +2485,10 @@ int dm_suspend(struct mapped_device *md,
*/
if (!noflush && do_lockfs) {
r = lock_fs(md);
- if (r)
+ if (r) {
+ dm_table_resume_targets(map);
goto out;
+ }
}
/*
@@ -2541,6 +2542,8 @@ int dm_suspend(struct mapped_device *md,
start_queue(md->queue);
unlock_fs(md);
+
+ dm_table_resume_targets(map);
goto out; /* pushback list is already flushed, so skip flush */
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-02-23 18:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-23 18:45 [RFC][PATCH 1/4] dm: restore presuspend status Takahiro Yasui
2010-02-23 18:45 ` Takahiro Yasui
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.