Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6b3df0d7a5e85ad2afd3eecc50e2dee59e876ae8 Commit: 6b3df0d7a5e85ad2afd3eecc50e2dee59e876ae8 Parent: fe97e2aa0502922488ad62303a19a20c8044ae18 Author: Jonathan Brassow <[EMAIL PROTECTED]> AuthorDate: Fri Oct 19 22:47:57 2007 +0100 Committer: Alasdair G Kergon <[EMAIL PROTECTED]> CommitDate: Sat Oct 20 02:01:21 2007 +0100
dm log: split suspend 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 <[EMAIL PROTECTED]> Signed-off-by: Alasdair G Kergon <[EMAIL PROTECTED]> --- 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(-) diff --git a/drivers/md/dm-log.c b/drivers/md/dm-log.c index a66428d..072ee43 100644 --- a/drivers/md/dm-log.c +++ b/drivers/md/dm-log.c @@ -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, diff --git a/drivers/md/dm-log.h b/drivers/md/dm-log.h index 86a301c..3fae87e 100644 --- a/drivers/md/dm-log.h +++ b/drivers/md/dm-log.h @@ -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); /* diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c index 2b2ca37..8aafbb7 100644 --- a/drivers/md/dm-raid1.c +++ b/drivers/md/dm-raid1.c @@ -1305,7 +1305,7 @@ static void mirror_postsuspend(struct dm_target *ti) 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"); } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html