diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-21 20:08:06 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-21 20:08:06 -0500 |
commit | b49249d10324d0fd6fb29725c2807dfd80d0edbc (patch) | |
tree | 9a8fa724e6c9f9283530979c6e32a311c74999d5 /drivers/md/dm-raid.c | |
parent | 10532b560bacf23766f9c7dc09778b31b198ff45 (diff) | |
parent | 45e621d45e24ffc4cb2b2935e8438987b860063a (diff) |
Merge tag 'dm-3.8-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm
Pull dm update from Alasdair G Kergon:
"Miscellaneous device-mapper fixes, cleanups and performance
improvements.
Of particular note:
- Disable broken WRITE SAME support in all targets except linear and
striped. Use it when kcopyd is zeroing blocks.
- Remove several mempools from targets by moving the data into the
bio's new front_pad area(which dm calls 'per_bio_data').
- Fix a race in thin provisioning if discards are misused.
- Prevent userspace from interfering with the ioctl parameters and
use kmalloc for the data buffer if it's small instead of vmalloc.
- Throttle some annoying error messages when I/O fails."
* tag 'dm-3.8-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm: (36 commits)
dm stripe: add WRITE SAME support
dm: remove map_info
dm snapshot: do not use map_context
dm thin: dont use map_context
dm raid1: dont use map_context
dm flakey: dont use map_context
dm raid1: rename read_record to bio_record
dm: move target request nr to dm_target_io
dm snapshot: use per_bio_data
dm verity: use per_bio_data
dm raid1: use per_bio_data
dm: introduce per_bio_data
dm kcopyd: add WRITE SAME support to dm_kcopyd_zero
dm linear: add WRITE SAME support
dm: add WRITE SAME support
dm: prepare to support WRITE SAME
dm ioctl: use kmalloc if possible
dm ioctl: remove PF_MEMALLOC
dm persistent data: improve improve space map block alloc failure message
dm thin: use DMERR_LIMIT for errors
...
Diffstat (limited to 'drivers/md/dm-raid.c')
-rw-r--r-- | drivers/md/dm-raid.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c index 45d94a7e7f6d..3d8984edeff7 100644 --- a/drivers/md/dm-raid.c +++ b/drivers/md/dm-raid.c | |||
@@ -295,9 +295,11 @@ static int validate_region_size(struct raid_set *rs, unsigned long region_size) | |||
295 | * Choose a reasonable default. All figures in sectors. | 295 | * Choose a reasonable default. All figures in sectors. |
296 | */ | 296 | */ |
297 | if (min_region_size > (1 << 13)) { | 297 | if (min_region_size > (1 << 13)) { |
298 | /* If not a power of 2, make it the next power of 2 */ | ||
299 | if (min_region_size & (min_region_size - 1)) | ||
300 | region_size = 1 << fls(region_size); | ||
298 | DMINFO("Choosing default region size of %lu sectors", | 301 | DMINFO("Choosing default region size of %lu sectors", |
299 | region_size); | 302 | region_size); |
300 | region_size = min_region_size; | ||
301 | } else { | 303 | } else { |
302 | DMINFO("Choosing default region size of 4MiB"); | 304 | DMINFO("Choosing default region size of 4MiB"); |
303 | region_size = 1 << 13; /* sectors */ | 305 | region_size = 1 << 13; /* sectors */ |
@@ -1216,7 +1218,7 @@ static void raid_dtr(struct dm_target *ti) | |||
1216 | context_free(rs); | 1218 | context_free(rs); |
1217 | } | 1219 | } |
1218 | 1220 | ||
1219 | static int raid_map(struct dm_target *ti, struct bio *bio, union map_info *map_context) | 1221 | static int raid_map(struct dm_target *ti, struct bio *bio) |
1220 | { | 1222 | { |
1221 | struct raid_set *rs = ti->private; | 1223 | struct raid_set *rs = ti->private; |
1222 | struct mddev *mddev = &rs->md; | 1224 | struct mddev *mddev = &rs->md; |
@@ -1430,7 +1432,7 @@ static void raid_resume(struct dm_target *ti) | |||
1430 | 1432 | ||
1431 | static struct target_type raid_target = { | 1433 | static struct target_type raid_target = { |
1432 | .name = "raid", | 1434 | .name = "raid", |
1433 | .version = {1, 3, 1}, | 1435 | .version = {1, 4, 0}, |
1434 | .module = THIS_MODULE, | 1436 | .module = THIS_MODULE, |
1435 | .ctr = raid_ctr, | 1437 | .ctr = raid_ctr, |
1436 | .dtr = raid_dtr, | 1438 | .dtr = raid_dtr, |