linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Chris Mason <mason@suse.com>
To: Ed Tomlinson <tomlins@CAM.ORG>
Cc: linux-lvm@sistina.com
Subject: [linux-lvm] Re: [OOPS] full snapshot (with test vfs locking patch for reiserfs snapshots in 11-pre)
Date: Mon, 08 Oct 2001 13:40:54 -0400	[thread overview]
Message-ID: <28770000.1002562854@tiny> (raw)
In-Reply-To: <20011008170549.3B15E76467@oscar.casa.dyndns.org>


On Monday, October 08, 2001 01:05:48 PM -0400 Ed Tomlinson <tomlins@CAM.ORG> wrote:

> On October 8, 2001 12:54 pm, Chris Mason wrote:
>> On Monday, October 08, 2001 11:53:46 AM -0400 Ed Tomlinson
>> 
>> <tomlins@CAM.ORG> wrote:
>> > Hi Chris,
>> > 
>> > To summerize, with 2.4.11-pre5 and lvm-1.01-rc4 + your test vfslocking
>> > patch  for 2.4.11-pre I, unlike you, was able to make snapshots and
>> > reiserfsck them without  problems.  Then I tried a debench 50 run and
>> > got an oops.
>> 
>> Confirmed, similar oops here.  Do you get this with rc4 in 2.4.10?
> 
> Funny you should ask...  Guess what was runing when this email arrived?
> The  answer is that with 2.4.10 + lvm 1.01-rc4 the snapshot deactivates
> correctly -  I do not see an oops.
>

Hmmm, looks like pure luck then.  It does not look like all the callers of lvm_snapshot_remap_block are properly checking to make sure the snapshot is still valid (hasn't been run through lvm_snapshot_release).

Try this:

-chris

Index: 0.21/drivers/md/lvm-snap.c
--- 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 13:35:41 -0400 
@@ -108,6 +108,9 @@
 	lv_block_exception_t * ret;
 	int i = 0;
 
+	if (!hash_table || !lv->lv_block_exception)
+		return NULL ;
+
 	hash_table = &hash_table[hashfn(org_dev, org_start, mask, chunk_size)];
 	ret = NULL;
 	for (next = hash_table->next; next != hash_table; next = next->next)
@@ -140,6 +143,8 @@
 	unsigned long mask = lv->lv_snapshot_hash_mask;
 	int chunk_size = lv->lv_chunk_size;
 
+	if (!hash_table)
+		BUG() ;
 	hash_table = &hash_table[hashfn(org_dev, org_start, mask, chunk_size)];
 	list_add(&exception->hash, hash_table);
 }
 

  reply	other threads:[~2001-10-08 17:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20011003230330.508E91104F@oscar.casa.dyndns.org>
     [not found] ` <20011008012906.D790A11069@oscar.casa.dyndns.org>
     [not found]   ` <77260000.1002507094@tiny>
2001-10-08 15:53     ` [linux-lvm] [OOPS] full snapshot (with test vfs locking patch for reiserfs snapshots in 11-pre) Ed Tomlinson
2001-10-08 16:54       ` [linux-lvm] " Chris Mason
2001-10-08 17:05         ` Ed Tomlinson
2001-10-08 17:40           ` Chris Mason [this message]
2001-10-08 19:51           ` Chris Mason
2001-10-09  1:57             ` Ed Tomlinson
2001-10-09  2:29               ` Chris Mason
2001-10-09 11:42                 ` Ed Tomlinson
2001-10-10 21:28                 ` Ed Tomlinson
2001-10-10 23:21                   ` Chris Mason
2001-10-11  0:37                     ` Ed Tomlinson
2001-10-11  1:27                       ` Chris Mason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=28770000.1002562854@tiny \
    --to=mason@suse.com \
    --cc=linux-lvm@sistina.com \
    --cc=tomlins@CAM.ORG \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).