Revision 1: stripe_width should be sector_t to support large devices. Signed-Off-By: Alasdair G Kergon [Included upstream] Revision 2: Fix some bugs in device-mapper handling of 64-bit values, replacing dm_div_up() and dm_round_up() inlines with macros and removing some avoidable divisions of 64-bit numbers. The mirror region size is the granularity used to manage and monitor the data copying, typically 512KB, so 32 bits (of sectors) should be plenty to hold this. Taken together with the two earlier patches: "fix TB stripe data corruption" (a missing cast) and "stripe_width should be sector_t", I've now had 3 independent reports that this fixes device-mapper for devices with large stripes. Still awaiting test results for dm-crypt and dm-raid1. Signed-Off-By: Alasdair G Kergon [Included upstream] Revision 3: Use %llu not %Lu in sscanf/printf format strings. Signed-Off-By: Alasdair G Kergon Revision 4: Add a name field to struct dm_dev so we don't have to use format_dev_t() all over the place for informative error messages. Signed-Off-By: Alasdair G Kergon From: Lars Marowsky-Bree [Submitted upstream] Revision 5: Simple functions to record and restore bio state so we can resubmit a bio that returned an error. DM multipath (following shortly) uses this. This patch has it private to device-mapper: is it any use elsewhere? Signed-Off-By: Alasdair G Kergon [Submitted upstream] Revision 6: Export map_info (part of bio->bi_private) for targets like multipath to use for storing context. Signed-Off-By: Alasdair G Kergon [Submitted upstream] Revision 7: The core multipath and path-selector code. Signed-Off-By: Alasdair G Kergon Revision 8: A very basic path selector: round-robin. It uses in turn each path that has not been disabled. By default, it instructs core multipath to use each path it supplies for 1000 bios, but a different repeat_count can be set against any path to provide primitive load-balancing across unequal paths. Signed-Off-By: Alasdair G Kergon Revision 9: Hardware-handler. Revision 10: EMC Hardware-handler. Revision 11: Flakey. Revision 12: Handle writes to a snapshot-origin device that has been extended since the snapshot was taken. Revision 13: More snapshot metadata reading into separate function. Revision 14: Move snapshot metadata loading to happen when table is created instead of when device is resumed. Origin writes don't trigger exceptions until snapshot table becomes active (when resume() is called on snapshot). NB This patch may break some existing LVM2 and EVMS operations. Revision 15: The patch adds new interfaces to bio.c that support the creation of local bio and bvec pools. This is important for layered drivers that need to allocate new bio and bvec structures in response to bio's submitted to it from higher up. The layered drivers can allocate local pools of bio structures to preclude deadlock under global bio pool exhaustion. The device mapper source files have been modified to remove duplicate bio code, and to use the new interfaces to create local bio pools. From: Dave Olien Revision 16: mm kgdb