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: Only call format_dev_t once. Revision 5: Functions to record and restore bio state. Revision 6: Export map info for multipath. Revision 7: Multipath. Revision 8: Round-robin path selector. 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