diff options
Diffstat (limited to 'drivers/md/persistent-data/dm-block-manager.h')
-rw-r--r-- | drivers/md/persistent-data/dm-block-manager.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/md/persistent-data/dm-block-manager.h b/drivers/md/persistent-data/dm-block-manager.h index 924833d2dfa6..be5bff61be28 100644 --- a/drivers/md/persistent-data/dm-block-manager.h +++ b/drivers/md/persistent-data/dm-block-manager.h | |||
@@ -97,14 +97,6 @@ int dm_bm_write_lock_zero(struct dm_block_manager *bm, dm_block_t b, | |||
97 | int dm_bm_unlock(struct dm_block *b); | 97 | int dm_bm_unlock(struct dm_block *b); |
98 | 98 | ||
99 | /* | 99 | /* |
100 | * An optimisation; we often want to copy a block's contents to a new | ||
101 | * block. eg, as part of the shadowing operation. It's far better for | ||
102 | * bufio to do this move behind the scenes than hold 2 locks and memcpy the | ||
103 | * data. | ||
104 | */ | ||
105 | int dm_bm_unlock_move(struct dm_block *b, dm_block_t n); | ||
106 | |||
107 | /* | ||
108 | * It's a common idiom to have a superblock that should be committed last. | 100 | * It's a common idiom to have a superblock that should be committed last. |
109 | * | 101 | * |
110 | * @superblock should be write-locked on entry. It will be unlocked during | 102 | * @superblock should be write-locked on entry. It will be unlocked during |
@@ -116,6 +108,19 @@ int dm_bm_unlock_move(struct dm_block *b, dm_block_t n); | |||
116 | int dm_bm_flush_and_unlock(struct dm_block_manager *bm, | 108 | int dm_bm_flush_and_unlock(struct dm_block_manager *bm, |
117 | struct dm_block *superblock); | 109 | struct dm_block *superblock); |
118 | 110 | ||
111 | /* | ||
112 | * Switches the bm to a read only mode. Once read-only mode | ||
113 | * has been entered the following functions will return -EPERM. | ||
114 | * | ||
115 | * dm_bm_write_lock | ||
116 | * dm_bm_write_lock_zero | ||
117 | * dm_bm_flush_and_unlock | ||
118 | * | ||
119 | * Additionally you should not use dm_bm_unlock_move, however no error will | ||
120 | * be returned if you do. | ||
121 | */ | ||
122 | void dm_bm_set_read_only(struct dm_block_manager *bm); | ||
123 | |||
119 | u32 dm_bm_checksum(const void *data, size_t len, u32 init_xor); | 124 | u32 dm_bm_checksum(const void *data, size_t len, u32 init_xor); |
120 | 125 | ||
121 | /*----------------------------------------------------------------*/ | 126 | /*----------------------------------------------------------------*/ |