[linux-lvm] Re: [OOPS] full snapshot (with test vfs locking patch for reiserfs snapshots in 11-pre)

Ed Tomlinson tomlins at CAM.ORG
Tue Oct 9 11:42:58 UTC 2001


On October 8, 2001 10:29 pm, Chris Mason wrote:

> We've got a write lock on the lv semaphore, so nobody else should be
> calling lvm_drop_snapshot on us.  I hate to ask, but are you sure you did
> an rmmod before the modules_install?

my root is lvm so the only way to reload the module is to boot.  In this case
I rebuilt from scratch (clean, dep, bzImage, modules, modules_install, stuff, 
lvmcreate_initrd <kernel>, lilo, reboot).  After I got the oops I rebooted
and rechecked the source...

> Regardless, we can fix the oops in _disable_snapshot, I just don't see how
> the locking allows it to happen.  This incremental fix should do it:

I will try this tonight.  Was off yesterday.

Thanks Chris
Ed

> --- 0.21/drivers/md/lvm-snap.c Sat, 06 Oct 2001 00:07:22 -0400
> +++ 0.21(w)/drivers/md/lvm-snap.c Mon, 08 Oct 2001 22:39:54 -0400
> @@ -687,6 +694,10 @@
>
>  static void _disable_snapshot(vg_t *vg, lv_t *lv) {
>  	const char *err;
> +	if (!lv->lv_block_exception) {
> +		printk(KERN_ERR "%s -- snapshot already disabled\n", lvm_name);
> +		return ;
> +	}
>  	lv->lv_block_exception[0].rsector_org = LVM_SNAPSHOT_DROPPED_SECTOR;
>  	if(_write_COW_table_block(vg, lv, 0, &err) < 0) {
>  		printk(KERN_ERR "%s -- couldn't disable snapshot: %s\n",




More information about the linux-lvm mailing list