From 96d38da15246dcfac8663b8322a58b5f3c1c0f87 Mon Sep 17 00:00:00 2001 From: Mikulas Patocka Date: Thu, 10 Dec 2009 23:52:01 +0000 Subject: [PATCH] --- yaml --- r: 176519 b: refs/heads/master c: 87a8f240e9bcf025ba45e4563c842b0d59c5e8ef h: refs/heads/master i: 176517: c96a6cf4cbea6e5c73b73c2d725b04176bdeb742 176515: a41136d482e4c4aa16ff50b126c55159f50b5512 176511: 4bc4b1153cecf3413387717cdfd7f8112a4bf680 v: v3 --- [refs] | 2 +- trunk/drivers/md/dm-log.c | 6 ++++-- trunk/drivers/md/dm-raid1.c | 2 +- trunk/include/linux/dm-dirty-log.h | 6 ++++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 32c52a66a8e9..ae98c31f586c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5adc78d0d231b030405b31759f125f13404fdb64 +refs/heads/master: 87a8f240e9bcf025ba45e4563c842b0d59c5e8ef diff --git a/trunk/drivers/md/dm-log.c b/trunk/drivers/md/dm-log.c index d779f8c915dd..666a80e3602e 100644 --- a/trunk/drivers/md/dm-log.c +++ b/trunk/drivers/md/dm-log.c @@ -145,8 +145,9 @@ int dm_dirty_log_type_unregister(struct dm_dirty_log_type *type) EXPORT_SYMBOL(dm_dirty_log_type_unregister); struct dm_dirty_log *dm_dirty_log_create(const char *type_name, - struct dm_target *ti, - unsigned int argc, char **argv) + struct dm_target *ti, + int (*flush_callback_fn)(struct dm_target *ti), + unsigned int argc, char **argv) { struct dm_dirty_log_type *type; struct dm_dirty_log *log; @@ -161,6 +162,7 @@ struct dm_dirty_log *dm_dirty_log_create(const char *type_name, return NULL; } + log->flush_callback_fn = flush_callback_fn; log->type = type; if (type->ctr(log, ti, argc, argv)) { kfree(log); diff --git a/trunk/drivers/md/dm-raid1.c b/trunk/drivers/md/dm-raid1.c index 752a29e1855b..d44bc497dad9 100644 --- a/trunk/drivers/md/dm-raid1.c +++ b/trunk/drivers/md/dm-raid1.c @@ -896,7 +896,7 @@ static struct dm_dirty_log *create_dirty_log(struct dm_target *ti, return NULL; } - dl = dm_dirty_log_create(argv[0], ti, param_count, argv + 2); + dl = dm_dirty_log_create(argv[0], ti, NULL, param_count, argv + 2); if (!dl) { ti->error = "Error creating mirror dirty log"; return NULL; diff --git a/trunk/include/linux/dm-dirty-log.h b/trunk/include/linux/dm-dirty-log.h index 5e8b11d88f6f..7084503c3405 100644 --- a/trunk/include/linux/dm-dirty-log.h +++ b/trunk/include/linux/dm-dirty-log.h @@ -21,6 +21,7 @@ struct dm_dirty_log_type; struct dm_dirty_log { struct dm_dirty_log_type *type; + int (*flush_callback_fn)(struct dm_target *ti); void *context; }; @@ -136,8 +137,9 @@ int dm_dirty_log_type_unregister(struct dm_dirty_log_type *type); * type->constructor/destructor() directly. */ struct dm_dirty_log *dm_dirty_log_create(const char *type_name, - struct dm_target *ti, - unsigned argc, char **argv); + struct dm_target *ti, + int (*flush_callback_fn)(struct dm_target *ti), + unsigned argc, char **argv); void dm_dirty_log_destroy(struct dm_dirty_log *log); #endif /* __KERNEL__ */