linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* report bug: System reboots when accessing a loop-device over a second  loop-device with 2.4.2-ac7
@ 2001-03-01 15:11 Mario Hermann
  2001-03-01 15:22 ` Jens Axboe
  2001-03-01 16:21 ` Jens Axboe
  0 siblings, 2 replies; 9+ messages in thread
From: Mario Hermann @ 2001-03-01 15:11 UTC (permalink / raw)
  To: linux-kernel

Hello!

I tried the following commands with 2.4.2-ac7:

losetup /dev/loop0 test.dat
losetup /dev/loop1 /dev/loop0
mke2fs /dev/loop1

My System reboots immediatly. I tried it with 2.4.2-ac4,ac5 too -> same
effect.

With 2.4.2 it hangs immediatly.

Hope that helps.


Thanks


Mario

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: report bug: System reboots when accessing a loop-device over a second loop-device with 2.4.2-ac7
  2001-03-01 15:11 report bug: System reboots when accessing a loop-device over a second loop-device with 2.4.2-ac7 Mario Hermann
@ 2001-03-01 15:22 ` Jens Axboe
  2001-03-01 16:21 ` Jens Axboe
  1 sibling, 0 replies; 9+ messages in thread
From: Jens Axboe @ 2001-03-01 15:22 UTC (permalink / raw)
  To: Mario Hermann; +Cc: linux-kernel

On Thu, Mar 01 2001, Mario Hermann wrote:
> Hello!
> 
> I tried the following commands with 2.4.2-ac7:
> 
> losetup /dev/loop0 test.dat
> losetup /dev/loop1 /dev/loop0
> mke2fs /dev/loop1
> 
> My System reboots immediatly. I tried it with 2.4.2-ac4,ac5 too -> same
> effect.

Oops, will take a look.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: report bug: System reboots when accessing a loop-device over a second loop-device with 2.4.2-ac7
  2001-03-01 15:11 report bug: System reboots when accessing a loop-device over a second loop-device with 2.4.2-ac7 Mario Hermann
  2001-03-01 15:22 ` Jens Axboe
@ 2001-03-01 16:21 ` Jens Axboe
  2001-03-01 17:00   ` Mario Hermann
  2001-03-02 14:26   ` Mario Hermann
  1 sibling, 2 replies; 9+ messages in thread
From: Jens Axboe @ 2001-03-01 16:21 UTC (permalink / raw)
  To: Mario Hermann; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 350 bytes --]

On Thu, Mar 01 2001, Mario Hermann wrote:
> I tried the following commands with 2.4.2-ac7:
> 
> losetup /dev/loop0 test.dat
> losetup /dev/loop1 /dev/loop0
> mke2fs /dev/loop1
> 
> My System reboots immediatly. I tried it with 2.4.2-ac4,ac5 too -> same
> effect.
> 
> With 2.4.2 it hangs immediatly.

This should make it work again.

-- 
Jens Axboe


[-- Attachment #2: loop-b_dev-1 --]
[-- Type: text/plain, Size: 435 bytes --]

--- /opt/kernel/linux-2.4.2-ac7/drivers/block/loop.c	Thu Mar  1 15:46:14 2001
+++ drivers/block/loop.c	Thu Mar  1 17:17:13 2001
@@ -397,10 +397,10 @@
 	if (!buffer_locked(rbh))
 		BUG();
 
-	if (MINOR(rbh->b_dev) >= max_loop)
+	if (MINOR(rbh->b_rdev) >= max_loop)
 		goto out;
 
-	lo = &loop_dev[MINOR(rbh->b_dev)];
+	lo = &loop_dev[MINOR(rbh->b_rdev)];
 	spin_lock_irq(&lo->lo_lock);
 	if (lo->lo_state != Lo_bound)
 		goto inactive;

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: report bug: System reboots when accessing a loop-device over a  second loop-device with 2.4.2-ac7
  2001-03-01 16:21 ` Jens Axboe
@ 2001-03-01 17:00   ` Mario Hermann
  2001-03-02 14:26   ` Mario Hermann
  1 sibling, 0 replies; 9+ messages in thread
From: Mario Hermann @ 2001-03-01 17:00 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel

Hello,

Jens Axboe wrote:

> 
> This should make it work again.

Yeah! Works fine.


> 
> --
> Jens Axboe
> 

Thx


Mario Hermann

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: report bug: System reboots when accessing a loop-device over a  second loop-device with 2.4.2-ac7
  2001-03-01 16:21 ` Jens Axboe
  2001-03-01 17:00   ` Mario Hermann
@ 2001-03-02 14:26   ` Mario Hermann
  2001-03-02 15:07     ` Jens Axboe
  2001-03-02 15:28     ` Jens Axboe
  1 sibling, 2 replies; 9+ messages in thread
From: Mario Hermann @ 2001-03-02 14:26 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel

Hello!

Jens Axboe wrote:
> 
> On Thu, Mar 01 2001, Mario Hermann wrote:
> > I tried the following commands with 2.4.2-ac7:
> >
> > losetup /dev/loop0 test.dat
> > losetup /dev/loop1 /dev/loop0
> > mke2fs /dev/loop1
> >
> > My System reboots immediatly. I tried it with 2.4.2-ac4,ac5 too -> same
> > effect.
> >
> > With 2.4.2 it hangs immediatly.
> 
> This should make it work again.

There is another small bug with the loop over loop problem. Now it works
fine for
files but not for Devices:

losetup /dev/loop0 /dev/sr1
losetup /dev/loop1 /dev/loop0
dd if=/dev/loop1 of=test.dat bs=2048 count=1024

Makes dd hang. (BTW: /dev/sr1 is a CD-ROM)

Tried the same on /dev/hda1, /dev/sda1 with 2.4.2-ac7-your_patch and
with 2.4.2-ac8.

BTW: Did extensiv testing with and without the crypto patches. And all
other tests worked fine! :-)

--
Mario Hermann

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: report bug: System reboots when accessing a loop-device over a second loop-device with 2.4.2-ac7
  2001-03-02 14:26   ` Mario Hermann
@ 2001-03-02 15:07     ` Jens Axboe
  2001-03-02 15:28     ` Jens Axboe
  1 sibling, 0 replies; 9+ messages in thread
From: Jens Axboe @ 2001-03-02 15:07 UTC (permalink / raw)
  To: Mario Hermann; +Cc: linux-kernel

On Fri, Mar 02 2001, Mario Hermann wrote:
> > > I tried the following commands with 2.4.2-ac7:
> > >
> > > losetup /dev/loop0 test.dat
> > > losetup /dev/loop1 /dev/loop0
> > > mke2fs /dev/loop1
> > >
> > > My System reboots immediatly. I tried it with 2.4.2-ac4,ac5 too -> same
> > > effect.
> > >
> > > With 2.4.2 it hangs immediatly.
> > 
> > This should make it work again.
> 
> There is another small bug with the loop over loop problem. Now it works
> fine for
> files but not for Devices:
> 
> losetup /dev/loop0 /dev/sr1
> losetup /dev/loop1 /dev/loop0
> dd if=/dev/loop1 of=test.dat bs=2048 count=1024
> 
> Makes dd hang. (BTW: /dev/sr1 is a CD-ROM)
> 
> Tried the same on /dev/hda1, /dev/sda1 with 2.4.2-ac7-your_patch and
> with 2.4.2-ac8.

I must admit that I haven't tried loop-over-loop at all really,
I'll make a note to look at this tonight.

> BTW: Did extensiv testing with and without the crypto patches. And all
> other tests worked fine! :-)

Great.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: report bug: System reboots when accessing a loop-device over a second loop-device with 2.4.2-ac7
  2001-03-02 14:26   ` Mario Hermann
  2001-03-02 15:07     ` Jens Axboe
@ 2001-03-02 15:28     ` Jens Axboe
  2001-03-02 17:50       ` Mario Hermann
  1 sibling, 1 reply; 9+ messages in thread
From: Jens Axboe @ 2001-03-02 15:28 UTC (permalink / raw)
  To: Mario Hermann; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 328 bytes --]

On Fri, Mar 02 2001, Mario Hermann wrote:
> There is another small bug with the loop over loop problem. Now it works
> fine for
> files but not for Devices:
> 
> losetup /dev/loop0 /dev/sr1
> losetup /dev/loop1 /dev/loop0
> dd if=/dev/loop1 of=test.dat bs=2048 count=1024

Pending miscount, this should fix it.

-- 
Jens Axboe


[-- Attachment #2: loop-ac8-1 --]
[-- Type: text/plain, Size: 642 bytes --]

--- /opt/kernel/linux-2.4.2-ac8/drivers/block/loop.c	Fri Mar  2 14:48:24 2001
+++ drivers/block/loop.c	Fri Mar  2 16:27:31 2001
@@ -307,6 +307,7 @@
 		lo->lo_bh = lo->lo_bhtail = bh;
 	spin_unlock_irqrestore(&lo->lo_lock, flags);
 
+	atomic_inc(&lo->lo_pending);
 	up(&lo->lo_bh_mutex);
 }
 
@@ -404,7 +405,6 @@
 	spin_lock_irq(&lo->lo_lock);
 	if (lo->lo_state != Lo_bound)
 		goto inactive;
-	atomic_inc(&lo->lo_pending);
 	spin_unlock_irq(&lo->lo_lock);
 
 	if (rw == WRITE) {
@@ -452,8 +452,6 @@
 	return 0;
 
 err:
-	if (atomic_dec_and_test(&lo->lo_pending))
-		up(&lo->lo_bh_mutex);
 	loop_put_buffer(bh);
 out:
 	buffer_IO_error(rbh);

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: report bug: System reboots when accessing a loop-device over a  second loop-device with 2.4.2-ac7
  2001-03-02 15:28     ` Jens Axboe
@ 2001-03-02 17:50       ` Mario Hermann
  2001-03-03  3:19         ` Jens Axboe
  0 siblings, 1 reply; 9+ messages in thread
From: Mario Hermann @ 2001-03-02 17:50 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel

Hello!

Jens Axboe wrote:
> 
> On Fri, Mar 02 2001, Mario Hermann wrote:
> > There is another small bug with the loop over loop problem. Now it works
> > fine for
> > files but not for Devices:
> >
> > losetup /dev/loop0 /dev/sr1
> > losetup /dev/loop1 /dev/loop0
> > dd if=/dev/loop1 of=test.dat bs=2048 count=1024
> 
> Pending miscount, this should fix it.


Ok, I did some testing again. What I found:

Without crypto: Everything works good!

With crypto:

I used the ciphers: idea,serbent, aes, blowfish(with small patch in
cipher-blowfish send somewhere in the past)

Only 2.4.2-ac8 Material: Everything is ok. 

With  old 2.2-Material:

Encrypted in the way: 

 losetup -e blowfish /dev/loop0 ./test.file
 losetup -e serpent /dev/loop1 /dev/loop0

It works perfect too! :-)

But with old 2.2 - Material stored on DVD-RAM. 

  losetup -e blowfish /dev/loop0 /dev/sr3
  lsoetup -e serpent /dev/loop1 /dev/loop0

it doesn't work.

Just garbage comes out of the loop-device.
Both, the file on the harddisk and the DVD-RAM are made with 2.2.16 an
patch-int-2.2.16.9 and are working
there perfectly. 

I guess that the problem has maybe something to do with the logical
block number.

Well, for me was the HD-File important to work under 2.4 (DB-on it...)

So great thx from me!

Hope my testing will help in some way. (will do some more monday
afternoon)


---
Mario Hermann

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: report bug: System reboots when accessing a loop-device over a second loop-device with 2.4.2-ac7
  2001-03-02 17:50       ` Mario Hermann
@ 2001-03-03  3:19         ` Jens Axboe
  0 siblings, 0 replies; 9+ messages in thread
From: Jens Axboe @ 2001-03-03  3:19 UTC (permalink / raw)
  To: Mario Hermann; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 429 bytes --]

On Fri, Mar 02 2001, Mario Hermann wrote:
> But with old 2.2 - Material stored on DVD-RAM. 
> 
>   losetup -e blowfish /dev/loop0 /dev/sr3
>   lsoetup -e serpent /dev/loop1 /dev/loop0
> 
> it doesn't work.

(replied to Mario earlier, for reference here's the patch).

Yet another miscount and IV off, I apparently missed the latter
when the other IV calculations were fixed. I've verified block
crypto here now.

-- 
Jens Axboe


[-- Attachment #2: loop-ac10-1 --]
[-- Type: text/plain, Size: 561 bytes --]

--- /opt/kernel/linux-2.4.2-ac10/drivers/block/loop.c	Sat Mar  3 04:16:23 2001
+++ drivers/block/loop.c	Sat Mar  3 04:18:54 2001
@@ -345,8 +345,6 @@
 		struct buffer_head *rbh = bh->b_private;
 
 		rbh->b_end_io(rbh, uptodate);
-		if (atomic_dec_and_test(&lo->lo_pending))
-			up(&lo->lo_bh_mutex);
 		loop_put_buffer(bh);
 	} else
 		loop_add_bh(lo, bh);
@@ -479,6 +477,7 @@
 
 		IV = (bh->b_rsector / (bh->b_size >> 9));
 		IV += lo->lo_offset / bh->b_size;
+		IV >>= 2;
 
 		ret = lo_do_transfer(lo, READ, bh->b_data, rbh->b_data,
 				     bh->b_size, IV);

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2001-03-03  3:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-01 15:11 report bug: System reboots when accessing a loop-device over a second loop-device with 2.4.2-ac7 Mario Hermann
2001-03-01 15:22 ` Jens Axboe
2001-03-01 16:21 ` Jens Axboe
2001-03-01 17:00   ` Mario Hermann
2001-03-02 14:26   ` Mario Hermann
2001-03-02 15:07     ` Jens Axboe
2001-03-02 15:28     ` Jens Axboe
2001-03-02 17:50       ` Mario Hermann
2001-03-03  3:19         ` Jens Axboe

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).