FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 02-23-2010, 05:45 PM
Takahiro Yasui
 
Default dm: restore presuspend status

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 */
}


--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 10:30 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org