Revision 1: cvs dm 1.0 Revision 2: Only every other metadata area was being read when loading a snapshot! [Kevin Corry] Revision 3: Don't initialise static variables to zero/NULL. Revision 4: Change resume/suspend to do_resume/do_suspend to avoid name clash. Revision 5: Hello all, The current version of the VFS locking patch adds a new semaphore to fs/super.c. This is used to make sure a filesystem does not get mounted on a logical volume while a snapshot is being taken. It also results in all mounts on the system being serialized, and isn't in line with the VFS locking scheme in general. I've been meaning to fix it forever, here's an updated version that adds a super with s->s_dev set to the source volume if nothing is currently mounted on the source volume. This allows me to use the s_umount semaphore in the super block to keep things safe, which is cleaner overall. The other benefit over the existing patch is this one has zero footprint outside the lockfs calls. You're only running new code if you take a snapshot. I've done some testing here, but wanted to let LVM people review it before going further. Patch is below against 2.4.21-rc6. This provides zero new functionality over the existing VFS locking patch, and is experimental. Do not apply this on production servers, and do not apply unless you want to help test. -chris ===== drivers/md/lvm.c 1.19 vs edited ===== Revision 6: missing parts of the previous vfs patch (merge). Revision 7: Lift vfs locking to dm_suspend/resume. Revision 8: Correct error message when start a dm-daemon. Revision 9: When multiple load ioctls are issued the reference count on older 'new_tables' wasn't being dropped. [Christophe Saout] Revision 10: Stop labelling dm as 'experimental'. Revision 11: Move retrieve_status up so dev_wait() can use it. Revision 12: dev_wait was meant to return table status not dev status. [Alasdair Kergon] Revision 13: Fix error message when linear targets gets handed more than 2 arguments. [Alasdair Kergon] Revision 14: Support an arbitrary number of target parameters. [Alasdair Kergon] Revision 15: Fix VFS patch Revision 16: The ioctl interface always knows how many targets are going to be in the table, so remove the dynamic array sizing code in dm-table.c. This fixes a problem with large tables where the dm_target pointer passed to the target ctr was becoming invalid.