diff options
author | Mike Snitzer <snitzer@redhat.com> | 2015-04-23 15:06:27 -0400 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2015-05-29 14:18:59 -0400 |
commit | 49f154c7327139c275c9392b5fd69cad82f106bc (patch) | |
tree | aaab9fc27b1d91ccb31ba148e0cd5fe8bd942ef1 /drivers/md/persistent-data | |
parent | f8ae75253e4174089ffe3046715c679183f1919f (diff) | |
download | talos-op-linux-49f154c7327139c275c9392b5fd69cad82f106bc.tar.gz talos-op-linux-49f154c7327139c275c9392b5fd69cad82f106bc.zip |
dm thin metadata: remove in-core 'read_only' flag
Leverage the block manager's read_only flag instead of duplicating it;
access with new dm_bm_is_read_only() method.
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/persistent-data')
-rw-r--r-- | drivers/md/persistent-data/dm-block-manager.c | 6 | ||||
-rw-r--r-- | drivers/md/persistent-data/dm-block-manager.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/drivers/md/persistent-data/dm-block-manager.c b/drivers/md/persistent-data/dm-block-manager.c index 087411c95ffc..4d6c9b689eaa 100644 --- a/drivers/md/persistent-data/dm-block-manager.c +++ b/drivers/md/persistent-data/dm-block-manager.c @@ -609,6 +609,12 @@ void dm_bm_prefetch(struct dm_block_manager *bm, dm_block_t b) dm_bufio_prefetch(bm->bufio, b, 1); } +bool dm_bm_is_read_only(struct dm_block_manager *bm) +{ + return bm->read_only; +} +EXPORT_SYMBOL_GPL(dm_bm_is_read_only); + void dm_bm_set_read_only(struct dm_block_manager *bm) { bm->read_only = true; diff --git a/drivers/md/persistent-data/dm-block-manager.h b/drivers/md/persistent-data/dm-block-manager.h index 1b95dfc17786..84330f59886d 100644 --- a/drivers/md/persistent-data/dm-block-manager.h +++ b/drivers/md/persistent-data/dm-block-manager.h @@ -123,6 +123,7 @@ void dm_bm_prefetch(struct dm_block_manager *bm, dm_block_t b); * Additionally you should not use dm_bm_unlock_move, however no error will * be returned if you do. */ +bool dm_bm_is_read_only(struct dm_block_manager *bm); void dm_bm_set_read_only(struct dm_block_manager *bm); void dm_bm_set_read_write(struct dm_block_manager *bm); |