[linux-lvm] LVM and inactive snapshots.
Patrick Caulfield
patrick at tykepenguin.com
Fri Dec 15 10:00:28 UTC 2000
On Thu, Dec 14, 2000 at 03:10:05PM -0600, Jay Weber wrote:
> > No. The kernel should not unmount because this may cause
> > confusion and possibly corruption of user mode information
> > (eg. /etc/mtab).
> >
> > If a snapshot is dead the kernel could simply return an error
> > (EIO?) for any access to the snapshot (which no longer exists).
> > So the bahaviour would be well defined.
>
> Ah, yes, this does seem more reasonable and does address the issue of the
> bits that are left lying about.
THis patch should do that. It doesn't address the problem of remounting the
inactive snapshot though.
Patrick
--- drivers/md/lvm.c~ Thu Dec 14 14:31:21 2000
+++ drivers/md/lvm.c Fri Dec 15 09:46:15 2000
@@ -1678,6 +1678,8 @@
down(&lv->lv_snapshot_sem);
if (lv->lv_block_exception != NULL)
lvm_snapshot_remap_block(&rdev_tmp, &rsector_tmp, pe_start, lv);
+ else
+ ret = 1;
up(&lv->lv_snapshot_sem);
}
}
More information about the linux-lvm
mailing list