From: Alasdair G Kergon <agk@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: dm-devel@redhat.com, linux-kernel@vger.kernel.org,
Jonathan Brassow <jbrassow@redhat.com>
Subject: [2.6.24 PATCH 24/25] dm log: split suspend
Date: Fri, 12 Oct 2007 18:23:37 +0100 [thread overview]
Message-ID: <20071012172337.GJ24157@agk.fab.redhat.com> (raw)
From: Jonathan Brassow <jbrassow@redhat.com>
There are now two phases to a suspend in device-mapper -
presuspend and postsuspend. This patch removes the
single 'suspend' in the logging API and replaces it with
'presuspend' and 'postsuspend' functions to align it
better with core device-mapper.
A subsequent patch will make use of 'presuspend'.
Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
---
drivers/md/dm-log.c | 2 +-
drivers/md/dm-log.h | 3 ++-
drivers/md/dm-raid1.c | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
Index: linux-2.6.23/drivers/md/dm-log.c
===================================================================
--- linux-2.6.23.orig/drivers/md/dm-log.c 2007-10-12 12:36:13.000000000 +0100
+++ linux-2.6.23/drivers/md/dm-log.c 2007-10-12 15:03:32.000000000 +0100
@@ -696,7 +696,7 @@ static struct dirty_log_type _disk_type
.module = THIS_MODULE,
.ctr = disk_ctr,
.dtr = disk_dtr,
- .suspend = disk_flush,
+ .postsuspend = disk_flush,
.resume = disk_resume,
.get_region_size = core_get_region_size,
.is_clean = core_is_clean,
Index: linux-2.6.23/drivers/md/dm-log.h
===================================================================
--- linux-2.6.23.orig/drivers/md/dm-log.h 2007-10-12 12:36:13.000000000 +0100
+++ linux-2.6.23/drivers/md/dm-log.h 2007-10-12 15:03:32.000000000 +0100
@@ -32,7 +32,8 @@ struct dirty_log_type {
* There are times when we don't want the log to touch
* the disk.
*/
- int (*suspend)(struct dirty_log *log);
+ int (*presuspend)(struct dirty_log *log);
+ int (*postsuspend)(struct dirty_log *log);
int (*resume)(struct dirty_log *log);
/*
Index: linux-2.6.23/drivers/md/dm-raid1.c
===================================================================
--- linux-2.6.23.orig/drivers/md/dm-raid1.c 2007-10-12 13:15:36.000000000 +0100
+++ linux-2.6.23/drivers/md/dm-raid1.c 2007-10-12 15:03:32.000000000 +0100
@@ -1305,7 +1305,7 @@ static void mirror_postsuspend(struct dm
wait_event(_kmirrord_recovery_stopped,
!atomic_read(&ms->rh.recovery_in_flight));
- if (log->type->suspend && log->type->suspend(log))
+ if (log->type->postsuspend && log->type->postsuspend(log))
/* FIXME: need better error handling */
DMWARN("log suspend failed");
}
reply other threads:[~2007-10-12 17:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20071012172337.GJ24157@agk.fab.redhat.com \
--to=agk@redhat.com \
--cc=dm-devel@redhat.com \
--cc=jbrassow@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®