Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176519
b: refs/heads/master
c: 87a8f24
h: refs/heads/master
i:
  176517: c96a6cf
  176515: a41136d
  176511: 4bc4b11
v: v3
  • Loading branch information
Mikulas Patocka authored and Alasdair G Kergon committed Dec 10, 2009
1 parent ad70e49 commit 96d38da
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5adc78d0d231b030405b31759f125f13404fdb64
refs/heads/master: 87a8f240e9bcf025ba45e4563c842b0d59c5e8ef
6 changes: 4 additions & 2 deletions trunk/drivers/md/dm-log.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/md/dm-raid1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 4 additions & 2 deletions trunk/include/linux/dm-dirty-log.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down Expand Up @@ -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__ */
Expand Down

0 comments on commit 96d38da

Please sign in to comment.