summaryrefslogtreecommitdiff
path: root/drivers/md/persistent-data/dm-transaction-manager.c
diff options
context:
space:
mode:
authorJoe Thornber <ejt@redhat.com>2012-07-27 18:07:58 +0400
committerAlasdair G Kergon <agk@redhat.com>2012-07-27 18:07:58 +0400
commit3caf6d73d4dc163b2d135e0b52b052a2b63e5216 (patch)
treedf766d38649d24d3e3967b74ae989251a1241a9c /drivers/md/persistent-data/dm-transaction-manager.c
parentaf7346ebbda5f4a95da71359231d32cb136bd246 (diff)
downloadlinux-3caf6d73d4dc163b2d135e0b52b052a2b63e5216.tar.xz
dm persistent data: remove debug space map checker
Remove debug space map checker from dm persistent data. The space map checker is a wrapper for other space maps that double checks the reference counts are correct. It holds all these reference counts in memory rather than on disk, so uses a lot of memory and is thus restricted to small pools. As yet, this checker hasn't found any issues, but has caused a few of its own due to people turning it on by default with larger pools. Removing. Signed-off-by: Joe Thornber <ejt@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/persistent-data/dm-transaction-manager.c')
-rw-r--r--drivers/md/persistent-data/dm-transaction-manager.c29
1 files changed, 7 insertions, 22 deletions
diff --git a/drivers/md/persistent-data/dm-transaction-manager.c b/drivers/md/persistent-data/dm-transaction-manager.c
index e5604b32d91f..86c3705052a4 100644
--- a/drivers/md/persistent-data/dm-transaction-manager.c
+++ b/drivers/md/persistent-data/dm-transaction-manager.c
@@ -5,7 +5,6 @@
*/
#include "dm-transaction-manager.h"
#include "dm-space-map.h"
-#include "dm-space-map-checker.h"
#include "dm-space-map-disk.h"
#include "dm-space-map-metadata.h"
#include "dm-persistent-data-internal.h"
@@ -319,15 +318,14 @@ static int dm_tm_create_internal(struct dm_block_manager *bm,
int create)
{
int r;
- struct dm_space_map *inner;
- inner = dm_sm_metadata_init();
- if (IS_ERR(inner))
- return PTR_ERR(inner);
+ *sm = dm_sm_metadata_init();
+ if (IS_ERR(*sm))
+ return PTR_ERR(*sm);
- *tm = dm_tm_create(bm, inner);
+ *tm = dm_tm_create(bm, *sm);
if (IS_ERR(*tm)) {
- dm_sm_destroy(inner);
+ dm_sm_destroy(*sm);
return PTR_ERR(*tm);
}
@@ -339,19 +337,13 @@ static int dm_tm_create_internal(struct dm_block_manager *bm,
goto bad1;
}
- r = dm_sm_metadata_create(inner, *tm, dm_bm_nr_blocks(bm),
+ r = dm_sm_metadata_create(*sm, *tm, dm_bm_nr_blocks(bm),
sb_location);
if (r) {
DMERR("couldn't create metadata space map");
goto bad2;
}
- *sm = dm_sm_checker_create(inner);
- if (IS_ERR(*sm)) {
- r = PTR_ERR(*sm);
- goto bad2;
- }
-
} else {
r = dm_bm_write_lock(dm_tm_get_bm(*tm), sb_location,
sb_validator, sblock);
@@ -360,19 +352,13 @@ static int dm_tm_create_internal(struct dm_block_manager *bm,
goto bad1;
}
- r = dm_sm_metadata_open(inner, *tm,
+ r = dm_sm_metadata_open(*sm, *tm,
dm_block_data(*sblock) + root_offset,
root_max_len);
if (r) {
DMERR("couldn't open metadata space map");
goto bad2;
}
-
- *sm = dm_sm_checker_create(inner);
- if (IS_ERR(*sm)) {
- r = PTR_ERR(*sm);
- goto bad2;
- }
}
return 0;
@@ -381,7 +367,6 @@ bad2:
dm_tm_unlock(*tm, *sblock);
bad1:
dm_tm_destroy(*tm);
- dm_sm_destroy(inner);
return r;
}