Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Refactoring
- Loading branch information
Showing
17 changed files
with
339 additions
and
565 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,42 @@ | ||
| #ifndef __DM_OVBD_HEADER__ | ||
| #define __DM_OVBD_HEADER__ | ||
|
|
||
| #include "log-format.h" | ||
| #include "dm-lsmt.h" | ||
| #include "dm-zfile.h" | ||
| #include <linux/module.h> | ||
| #include <linux/device-mapper.h> | ||
| #include <linux/bio.h> | ||
|
|
||
| typedef struct ovbd_context { | ||
| struct workqueue_struct *wq; | ||
| } ovbd_context; | ||
|
|
||
| ovbd_context* get_ovbd_context(void); | ||
| ovbd_context *get_ovbd_context(void); | ||
|
|
||
| int init_lsmt_target(void); | ||
|
|
||
| void cleanup_lsmt_target(void); | ||
|
|
||
| int init_zfile_target(void); | ||
|
|
||
| void cleanup_zfile_target(void); | ||
|
|
||
| struct vfile; | ||
|
|
||
| typedef struct vfile_operations { | ||
| struct block_device *(*blkdev)(struct vfile *); | ||
| size_t (*len)(struct vfile *); | ||
| ssize_t (*pread)(struct vfile *, void *, size_t, loff_t); | ||
| int (*bio_remap)(struct vfile *, struct bio *, struct dm_dev **, | ||
| unsigned int); | ||
| void (*close)(struct vfile *); | ||
| } vfile_operations; | ||
|
|
||
| typedef struct vfile { | ||
| vfile_operations *ops; | ||
| } vfile; | ||
|
|
||
| vfile *open_blkdev_as_vfile(struct block_device *blk, loff_t len); | ||
|
|
||
| vfile *zfile_open(struct vfile *file); | ||
|
|
||
| vfile *lsmt_open_files(vfile *zf[], int n); | ||
|
|
||
| #endif |
Oops, something went wrong.