summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-raid1.c
diff options
context:
space:
mode:
authorMilan Broz <mbroz@redhat.com>2009-01-06 03:05:01 +0000
committerAlasdair G Kergon <agk@redhat.com>2009-01-06 03:05:01 +0000
commit2045e88edb4e0c9ce62d317f77dc59d27d9c530e (patch)
tree324eeea271b889263d0141fe0c82d4b0e43d0079 /drivers/md/dm-raid1.c
parent6f3af01cb0eda0ec50fe1e4cbdf028269dc396fe (diff)
downloadlinux-2045e88edb4e0c9ce62d317f77dc59d27d9c530e.tar.bz2
dm log: move region_size validation
Move log size validation from mirror target to log constructor. Removed PAGE_SIZE restriction we no longer think necessary. Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-raid1.c')
-rw-r--r--drivers/md/dm-raid1.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c
index 250f401668d5..4d6bc101962e 100644
--- a/drivers/md/dm-raid1.c
+++ b/drivers/md/dm-raid1.c
@@ -808,12 +808,6 @@ static void free_context(struct mirror_set *ms, struct dm_target *ti,
kfree(ms);
}
-static inline int _check_region_size(struct dm_target *ti, uint32_t size)
-{
- return !(size % (PAGE_SIZE >> 9) || !is_power_of_2(size) ||
- size > ti->len);
-}
-
static int get_mirror(struct mirror_set *ms, struct dm_target *ti,
unsigned int mirror, char **argv)
{
@@ -872,12 +866,6 @@ static struct dm_dirty_log *create_dirty_log(struct dm_target *ti,
return NULL;
}
- if (!_check_region_size(ti, dl->type->get_region_size(dl))) {
- ti->error = "Invalid region size";
- dm_dirty_log_destroy(dl);
- return NULL;
- }
-
return dl;
}