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>
This commit is contained in:
committed by
Alasdair G Kergon
parent
5adc78d0d2
commit
87a8f240e9
@@ -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__ */
|
||||
|
Reference in New Issue
Block a user