From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 08 Oct 2001 13:40:54 -0400 From: Chris Mason Message-ID: <28770000.1002562854@tiny> In-Reply-To: <20011008170549.3B15E76467@oscar.casa.dyndns.org> References: <20011003230330.508E91104F@oscar.casa.dyndns.org> <20011008155346.A741C76E3B@oscar.casa.dyndns.org> <4650000.1002560095@tiny> <20011008170549.3B15E76467@oscar.casa.dyndns.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: [linux-lvm] Re: [OOPS] full snapshot (with test vfs locking patch for reiserfs snapshots in 11-pre) Sender: linux-lvm-admin@sistina.com Errors-To: linux-lvm-admin@sistina.com Reply-To: linux-lvm@sistina.com List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: List-Id: Content-Type: text/plain; charset="us-ascii" To: Ed Tomlinson Cc: linux-lvm@sistina.com On Monday, October 08, 2001 01:05:48 PM -0400 Ed Tomlinson wrote: > On October 8, 2001 12:54 pm, Chris Mason wrote: >> On Monday, October 08, 2001 11:53:46 AM -0400 Ed Tomlinson >> >> 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); }