All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takahiro Yasui <tyasui@redhat.com>
To: device-mapper development <dm-devel@redhat.com>
Cc: k-ueda@ct.jp.nec.com, LVM2 development <lvm-devel@redhat.com>
Subject: [RFC][PATCH 1/4] dm: restore presuspend status
Date: Tue, 23 Feb 2010 13:45:02 -0500	[thread overview]
Message-ID: <4B84222E.10304@redhat.com> (raw)

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

WARNING: multiple messages have this Message-ID (diff)
From: Takahiro Yasui <tyasui@redhat.com>
To: lvm-devel@redhat.com
Subject: [RFC][PATCH 1/4] dm: restore presuspend status
Date: Tue, 23 Feb 2010 13:45:02 -0500	[thread overview]
Message-ID: <4B84222E.10304@redhat.com> (raw)

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



             reply	other threads:[~2010-02-23 18:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-23 18:45 Takahiro Yasui [this message]
2010-02-23 18:45 ` [RFC][PATCH 1/4] dm: restore presuspend status Takahiro Yasui

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B84222E.10304@redhat.com \
    --to=tyasui@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=k-ueda@ct.jp.nec.com \
    --cc=lvm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.