Revision 1: 2.5 backport Revision 2: The locking when leaving __request was broken. Split off __deferring() Revision 3: s->table wasn't being set in the snapshot contructor Revision 4: I don't know why dm-ioctl.c was including rather than Revision 5: Four constants: DM_DIR, DM_MAX_TYPE_NAME, DM_NAME_LEN, DM_UUID_LEN Were being declared in device-mapper.h, these are all specific to the ioctl interface, so they've been moved to dm-ioctl.h. Nobody in userland should ever include so remove ifdef __KERNEL guards. Revision 6: No need to validate the parameters if we are doing a REMOVE_ALL command. Revision 7: Fluff Revision 8: Mempool version by Christoph Hellwig that holds the free objects in an array rather than a list. This prevents the objects getting dirtied, eg, people maybe expecting them to come out of a slab with a particular state. Revision 9: Return -ENOTBLK if lookup_device() finds the inode, but it is not a block device. [Cristoph Hellwig] Revision 10: get_kdev() was locking _minor_lock rather than &_minor_lock. [Heinz Mauelshagen] Revision 11: minor change for dm-strip.c. Tests for correct chunksize before it allocates the stripe context. [Heinz Mauelshagen] Revision 12: There's a bug in the dm-stripe.c constructor failing top check if enough destinations are handed in. [Heinz Mauelshagen] Revision 13: Give each device its own io mempool to avoid a potential deadlock with stacked devices. [HM + EJT] Revision 14: Let the persistent/non persistent arg to the snapshot constructor be case insensitive. [Heinz Mauelshagen] Revision 15: queue_io() was checking the DMF_SUSPENDED flag rather than the new DMF_BLOCK_IO flag. This meant suspend could deadlock under load. Revision 16: dm_suspend(): Stop holding the read lock around the while loop that waits for pending io to complete. Revision 17: Add a run_task_queue(&tq_disk) to encourage pending io to flush when we're doing a dm_suspend(). Revision 18: Don't hook the io until after the target->map function has been called. Revision 19: Lift the dm_io allocation out of __map_buffer so that it is outside of the read lock. Hook all io, not just simple mappings. Revision 20: Use a rw_semaphore in dm_target.c rather than a rwlock_t, just to keep in line with dm.c Revision 21: Don't let the ioctl interface drop a suspended device. Revision 22: Call dm_put_target_type() *after* calling the destructor. Revision 23: Fluff Revision 24: printk tgt->error if dm_table_add_target() fails. Revision 25: Just return an error from the error targets map function, rather than erroring the buffer_head. Revision 26: Export dm_table_get_mode() Revision 27: If an alloc_page() call fails in init_pages(), unlock all locked pages before freeing them. [Kevin Corry] Revision 28: The calls to calc_block_sizes() in kcopyd_write_pages() and kcopyd_copy() are redundant, since kcopyd_io() already calls calc_block_sizes(). Revision 29: Remove the line in dispatch_bh() that sets bh->b_dev to B_FREE, since it sets bh->b_dev to job->disk.dev a few lines later. [Kevin Corry] Revision 30: Move a set_bit() into the preceeding assignment statement. [Kevin Corry] Revision 31: Set bh->b_count to 1 in dispatch_bh(). [Kevin Corry] Revision 32: Comment fix in run_pages_job(). [Kevin Corry] Revision 33: In copy_write(), don't need to set job->context = info, since it is already set to that when the function is called. [Kevin Corry] Revision 34: Always halt a copy if the read part failed, not just when there is a notify_fn (fix coding error). [Kevin Corry] Revision 35: 'Persistent' flag checking in the snapshot target constructor had a coding error which meant that it was always invalid. Revision 36: Introduce an end_io method to the target types. Revision 37: Allow the map method to pass some context to the endio method. Revision 38: When reloading a device the ioctl interface was forgetting to drop a reference on the new table. Revision 39: alloc_io() cannot fail, so stop checking the return value. Revision 40: Fix problem with devfs when unloading the dm module. dm-ioctl.c: deregister the misc device, and its associated symlink *before* removing the /dev/mapper dir. [Alasdair Kergon] Revision 41: Hook the io before we call the targets map function, this allows us to implement little things like the zero target. Revision 42: Silly mistake in error path when an unknown target type is requested. Revision 43: Define SECTOR_SHIFT and SECTOR_SIZE in dm.h so each individual DM source file doesn't have to define them. Revision 44: When generating STATUSTYPE_TABLE strings, use bdevname() instead of kdevname() so the device-name will match the ones generated in the 2.5 kernels. This should keep the user-space tools simpler, since they will only have to parse one form of the device-name strings. [Kevin Corry] Revision 45: Allow slashes ('/') within a DM device name, but not at the beginning. Devfs will automatically create all necessary sub-directories if a name with embedded slashes is registered. [Kevin Corry] Revision 46: When initializing the ioctl interface, always print the info message, instead of only when devfs is not present. [Kevin Corry] Revision 47: When running on ppc64, sparc64, or x86-64, register ioctls with the ioctl32 translation layer. [Don Mulvey]