linux/drivers/md
NeilBrown a646853991 md: fix two bugs when attempting to resize RAID0 array.
You cannot resize a RAID0 array (in terms of making the devices
bigger), but the code doesn't entirely stop you.
So:

 disable setting of the available size on each device for
 RAID0 and Linear devices.  This must not change as doing so
 can change the effective layout of data.

 Make sure that the size that raid0_size() reports is accurate,
 but rounding devices sizes to chunk sizes.  As the device sizes
 cannot change now, this isn't so important, but it is best to be
 safe.

Without this change:
  mdadm --grow /dev/md0 -z max
  mdadm --grow /dev/md0 -Z max
  then read to the end of the array

can cause a BUG in a RAID0 array.

These bugs have been present ever since it became possible
to resize any device, which is a long time.  So the fix is
suitable for any -stable kerenl.

Cc: stable@vger.kernel.org
Signed-off-by: NeilBrown <neilb@suse.de>
2013-02-26 11:55:40 +11:00
..
persistent-data Miscellaneous device-mapper fixes, cleanups and performance improvements. 2012-12-21 17:08:06 -08:00
Kconfig dm thin: move bio_prison code to separate module 2012-10-12 21:02:13 +01:00
Makefile dm thin: move bio_prison code to separate module 2012-10-12 21:02:13 +01:00
bitmap.c md/bitmap:Don't use IS_ERR to judge alloc_page(). 2012-10-11 13:45:36 +11:00
bitmap.h md/bitmap: record the space available for the bitmap in the superblock. 2012-05-22 13:55:34 +10:00
dm-bio-prison.c dm thin: replace dm_cell_release_singleton with cell_defer_except 2012-12-21 20:23:31 +00:00
dm-bio-prison.h dm thin: replace dm_cell_release_singleton with cell_defer_except 2012-12-21 20:23:31 +00:00
dm-bio-record.h
dm-bufio.c dm: use ACCESS_ONCE for sysfs values 2012-10-12 16:59:46 +01:00
dm-bufio.h dm bufio: prefetch 2012-03-28 18:41:29 +01:00
dm-crypt.c dm: remove map_info 2012-12-21 20:23:41 +00:00
dm-delay.c dm: remove map_info 2012-12-21 20:23:41 +00:00
dm-exception-store.c dm: replace simple_strtoul 2012-07-27 15:07:59 +01:00
dm-exception-store.h
dm-flakey.c dm: remove map_info 2012-12-21 20:23:41 +00:00
dm-io.c dm kcopyd: add WRITE SAME support to dm_kcopyd_zero 2012-12-21 20:23:37 +00:00
dm-ioctl.c dm ioctl: use kmalloc if possible 2012-12-21 20:23:36 +00:00
dm-kcopyd.c dm kcopyd: add WRITE SAME support to dm_kcopyd_zero 2012-12-21 20:23:37 +00:00
dm-linear.c dm: remove map_info 2012-12-21 20:23:41 +00:00
dm-log-userspace-base.c Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
dm-log-userspace-transfer.c connector/userns: replace netlink uses of cap_raised() with capable() 2012-05-10 23:21:39 -04:00
dm-log-userspace-transfer.h
dm-log.c dm: use memweight() 2012-07-30 17:25:16 -07:00
dm-mpath.c dm mpath: fix check for null mpio in end_io fn 2012-10-12 16:59:42 +01:00
dm-mpath.h
dm-path-selector.c md: Add module.h to all files using it implicitly 2011-10-31 19:31:18 -04:00
dm-path-selector.h
dm-queue-length.c dm: reject trailing characters in sccanf input 2012-03-28 18:41:26 +01:00
dm-raid.c DM RAID: Add support for MD's RAID10 "far" and "offset" algorithms 2013-02-26 11:55:36 +11:00
dm-raid1.c dm: remove map_info 2012-12-21 20:23:41 +00:00
dm-region-hash.c dm raid1: fix crash with mirror recovery and discard 2012-07-20 14:25:03 +01:00
dm-round-robin.c dm: reject trailing characters in sccanf input 2012-03-28 18:41:26 +01:00
dm-service-time.c dm: reject trailing characters in sccanf input 2012-03-28 18:41:26 +01:00
dm-snap-persistent.c md: Add in export.h for files using EXPORT_SYMBOL 2011-10-31 19:31:19 -04:00
dm-snap-transient.c md: Add in export.h for files using EXPORT_SYMBOL 2011-10-31 19:31:19 -04:00
dm-snap.c dm: remove map_info 2012-12-21 20:23:41 +00:00
dm-stripe.c dm stripe: add WRITE SAME support 2012-12-21 20:23:41 +00:00
dm-sysfs.c
dm-table.c dm: introduce per_bio_data 2012-12-21 20:23:38 +00:00
dm-target.c dm: remove map_info 2012-12-21 20:23:41 +00:00
dm-thin-metadata.c dm persistent data: fix nested btree deletion 2012-12-21 20:23:32 +00:00
dm-thin-metadata.h dm thin metadata: introduce dm_pool_abort_metadata 2012-07-27 15:08:15 +01:00
dm-thin.c dm thin: fix queue limits stacking 2013-01-31 14:11:14 +00:00
dm-uevent.c md: Add in export.h for files using EXPORT_SYMBOL 2011-10-31 19:31:19 -04:00
dm-uevent.h
dm-verity.c dm: remove map_info 2012-12-21 20:23:41 +00:00
dm-zero.c dm: remove map_info 2012-12-21 20:23:41 +00:00
dm.c dm: fix write same requests counting 2013-01-31 14:23:36 +00:00
dm.h dm: introduce per_bio_data 2012-12-21 20:23:38 +00:00
faulty.c md faulty: use disk_stack_limits() 2012-10-22 10:44:55 +11:00
linear.c md: linear supports TRIM 2012-10-11 13:08:44 +11:00
linear.h md/linear: typedef removal: linear_conf_t -> struct linear_conf 2011-10-11 16:48:54 +11:00
md.c md: fix two bugs when attempting to resize RAID0 array. 2013-02-26 11:55:40 +11:00
md.h md update for 3.8 2012-12-18 09:32:44 -08:00
multipath.c MD: change the parameter of md thread 2012-10-11 13:34:00 +11:00
multipath.h md/multipath: typedef removal: multipath_conf_t -> struct mpconf 2011-10-11 16:48:57 +11:00
raid0.c md: fix two bugs when attempting to resize RAID0 array. 2013-02-26 11:55:40 +11:00
raid0.h md: add proper merge_bvec handling to RAID0 and Linear. 2012-03-19 12:46:39 +11:00
raid1.c md: raid1,10: Handle REQ_WRITE_SAME flag in write bios 2013-02-26 11:55:21 +11:00
raid1.h md/raid1: prevent merging too large request 2012-07-31 10:03:53 +10:00
raid5.c md update for 3.8 2012-12-18 09:32:44 -08:00
raid5.h MD: raid5 trim support 2012-10-11 13:49:05 +11:00
raid10.c MD RAID10: Improve redundancy for 'far' and 'offset' algorithms (part 2) 2013-02-26 11:55:33 +11:00
raid10.h MD RAID10: Improve redundancy for 'far' and 'offset' algorithms (part 1) 2013-02-26 11:55:30 +11:00