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 cmirror: update resume method for interruption of presuspend

Suspend procedure could be interrupted between presuspend and
postsuspend procedure. When it happens, all state changes done
by presuspend procedure needs to be canceled.

I proposed a kernel patch to use a resume handler for canceling
state changes and this patch fixes the cluster mirror.

Cluster mirror changes only one flag (log's recovery_halted) for
the DM_ULOG_PRESUSPEND request. Therefore, clog_resume function
needs to reset the log's recovery_halted flag if cluster mirror
received the DM_ULOG_RESUME request with the condition of log's
state is LOG_RESUMED and its recovery_halted is set.

Signed-off-by: Takahiro Yasui <tyasui@redhat.com>
daemons/cmirrord/functions.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

Index: LVM2-2.02.62-20100217/daemons/cmirrord/functions.c
================================================== =================
--- LVM2-2.02.62-20100217.orig/daemons/cmirrord/functions.c
+++ LVM2-2.02.62-20100217/daemons/cmirrord/functions.c
@@ -721,6 +721,10 @@ static int clog_resume(struct dm_ulog_re
if (!lc)
return -EINVAL;

+ /* Check if the resume is called by interrupting suspend procedure */
+ if (lc->state == LOG_RESUMED && lc->recovery_halted)
+ goto cancel_presuspend;
switch (lc->resume_override) {
case 1000:
LOG_ERROR("[%s] Additional resume issued before suspend",
@@ -825,8 +829,10 @@ out:
SHORT_UUID(lc->uuid), (unsigned long long)lc->sync_count);
lc->sync_search = 0;
lc->state = LOG_RESUMED;
lc->recovery_halted = 0;
return rq->error;

dm-devel mailing list

Thread Tools

All times are GMT. The time now is 12:25 PM.

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