summaryrefslogtreecommitdiff
path: root/drivers/md/dm-log.c
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2009-12-11 02:52:01 +0300
committerAlasdair G Kergon <agk@redhat.com>2009-12-11 02:52:01 +0300
commit87a8f240e9bcf025ba45e4563c842b0d59c5e8ef (patch)
treeb6b42a74fc1135c11656d8cf4bf5ea4005c74a77 /drivers/md/dm-log.c
parent5adc78d0d231b030405b31759f125f13404fdb64 (diff)
downloadlinux-87a8f240e9bcf025ba45e4563c842b0d59c5e8ef.tar.xz
dm log: add flush callback fn
Introduce a callback pointer from the log to dm-raid1 layer. Before some region is set as "in-sync", we need to flush hardware cache on all the disks. But the log module doesn't have access to the mirror_set structure. So it will use this callback. So far the callback is unused, it will be used in further patches. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-log.c')
-rw-r--r--drivers/md/dm-log.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/md/dm-log.c b/drivers/md/dm-log.c
index d779f8c915dd..666a80e3602e 100644
--- a/drivers/md/dm-log.c
+++ b/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);