diff options
Diffstat (limited to 'drivers/block/loop/loop_file_fmt.h')
-rw-r--r-- | drivers/block/loop/loop_file_fmt.h | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/drivers/block/loop/loop_file_fmt.h b/drivers/block/loop/loop_file_fmt.h index 67719bcd1b6a..208c8f7cbc31 100644 --- a/drivers/block/loop/loop_file_fmt.h +++ b/drivers/block/loop/loop_file_fmt.h @@ -4,7 +4,7 @@ * * File format subsystem for the loop device module. * - * Copyright (C) 2019 Manuel Bentele + * Copyright (C) 2019 Manuel Bentele <development@manuel-bentele.de> */ #ifndef _LINUX_LOOP_FILE_FMT_H @@ -30,16 +30,15 @@ struct loop_file_fmt_ops { int (*discard) (struct loop_file_fmt *lo_fmt, struct request *rq); - int (*flush) (struct loop_file_fmt *lo_fmt, - struct request *rq); -}; + int (*flush) (struct loop_file_fmt *lo_fmt); -/* states of the file format */ + loff_t (*sector_size) (struct loop_file_fmt *lo_fmt); +}; /* data structure for implementing file format drivers */ struct loop_file_fmt_driver { const char *name; - const __u32 file_fmt_type; + const u32 file_fmt_type; struct loop_file_fmt_ops *ops; struct module *owner; }; @@ -64,6 +63,8 @@ struct loop_file_fmt_driver { * initialized ------------------------------> initialized * loop_file_fmt_flush(...) * initialized ------------------------------> initialized + * loop_file_fmt_sector_size(...) + * initialized ------------------------------> initialized * * loop_file_fmt_change(...) * +-----------------------------------------------------------+ @@ -78,7 +79,7 @@ enum { /* data structure for using with the file format subsystem */ struct loop_file_fmt { - __u32 file_fmt_type; + u32 file_fmt_type; int file_fmt_state; struct loop_device *lo; void *private_data; @@ -96,7 +97,8 @@ extern int loop_file_fmt_set_lo(struct loop_file_fmt *lo_fmt, struct loop_device *lo); extern struct loop_device *loop_file_fmt_get_lo(struct loop_file_fmt *lo_fmt); -extern int loop_file_fmt_init(struct loop_file_fmt *lo_fmt); +extern int loop_file_fmt_init(struct loop_file_fmt *lo_fmt, + u32 file_fmt_type); extern void loop_file_fmt_exit(struct loop_file_fmt *lo_fmt); extern int loop_file_fmt_read(struct loop_file_fmt *lo_fmt, @@ -110,14 +112,15 @@ extern int loop_file_fmt_write_aio(struct loop_file_fmt *lo_fmt, extern int loop_file_fmt_discard(struct loop_file_fmt *lo_fmt, struct request *rq); -extern int loop_file_fmt_flush(struct loop_file_fmt *lo_fmt, - struct request *rq); +extern int loop_file_fmt_flush(struct loop_file_fmt *lo_fmt); + +extern loff_t loop_file_fmt_sector_size(struct loop_file_fmt *lo_fmt); extern int loop_file_fmt_change(struct loop_file_fmt *lo_fmt, - __u32 file_fmt_type_new); + u32 file_fmt_type_new); /* helper functions of the subsystem */ -extern ssize_t loop_file_fmt_print_type(__u32 file_fmt_type, +extern ssize_t loop_file_fmt_print_type(u32 file_fmt_type, char *file_fmt_name); #endif |