public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Problem loopmounting CD on 2.6.0
@ 2003-12-19 13:10 Niels Elgaard Larsen
  2003-12-19 22:00 ` Randy.Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: Niels Elgaard Larsen @ 2003-12-19 13:10 UTC (permalink / raw)
  To: linux-kernel

A similar (probably the same) problem have been reported for cryptoloop.
With a ISO9660 CD (actually Knoppix) in drive /dev/hdc, no SCSI emulation:

amigos20:/mnt# losetup /dev/loop5 /dev/hdc
amigos20:/mnt# mount -r /dev/loop5 /mnt/foo

Gives kernel output:

===
hdc: cdrom_read_intr: data underrun (2 blocks)
end_request: I/O error, dev hdc, sector 64
isofs_fill_super: bread failed, dev=loop5, iso_blknum=16, block=32
===

It works in 2.4.20

Also

dd if=/dev/hdc of=/tmp/foo
losetup /dev/loop5 /tmp/foo
mount -r /dev/loop5 /mnt/foo

works

-- 
Niels Elgaard Larsen
elgaard@agol.dk
http://www.agol.dk/elgaard


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

* Re: Problem loopmounting CD on 2.6.0
  2003-12-19 13:10 Problem loopmounting CD on 2.6.0 Niels Elgaard Larsen
@ 2003-12-19 22:00 ` Randy.Dunlap
  2003-12-22 14:27   ` OGAWA Hirofumi
  0 siblings, 1 reply; 3+ messages in thread
From: Randy.Dunlap @ 2003-12-19 22:00 UTC (permalink / raw)
  To: elgaard; +Cc: linux-kernel

On Fri, 19 Dec 2003 14:10:44 +0100 Niels Elgaard Larsen <elgaard@agol.dk> wrote:

| A similar (probably the same) problem have been reported for cryptoloop.
| With a ISO9660 CD (actually Knoppix) in drive /dev/hdc, no SCSI emulation:
| 
| amigos20:/mnt# losetup /dev/loop5 /dev/hdc
| amigos20:/mnt# mount -r /dev/loop5 /mnt/foo
| 
| Gives kernel output:
| 
| ===
| hdc: cdrom_read_intr: data underrun (2 blocks)
| end_request: I/O error, dev hdc, sector 64
| isofs_fill_super: bread failed, dev=loop5, iso_blknum=16, block=32
| ===
| 
| It works in 2.4.20
| 
| Also
| 
| dd if=/dev/hdc of=/tmp/foo
| losetup /dev/loop5 /tmp/foo
| mount -r /dev/loop5 /mnt/foo
| 
| works

I see differing sector size and block size reports by blockdev
as follows.  Is this OK/expected or does it hint at a problem?

(all without ide-scsi:)

2.6.0, non-loopback case:

# mount
/dev/hdd on /mnt/disk type iso9660 (ro)

[root@gargoyle rddunlap]# blockdev --getss /dev/hdd
2048
[root@gargoyle rddunlap]# blockdev --getbsz  /dev/hdd
2048


2.6.0, loopback case:

I usually see the same error that you reported.
I did mount the cdrom successfully one time, with about 50
error messages like below[1], and saw this blocksize difference:
Is this OK or indicative of a (the) problem?


[root@gargoyle rddunlap]# blockdev --getss /dev/hdd
2048
[root@gargoyle rddunlap]# blockdev --getbsz  /dev/hdd
4096


[1]
hdd: cdrom_read_intr: data underrun (2 blocks)
end_request: I/O error, dev hdd, sector 64
hdd: cdrom_read_intr: data underrun (2 blocks)
end_request: I/O error, dev hdd, sector 68
hdd: cdrom_read_intr: data underrun (2 blocks)
end_request: I/O error, dev hdd, sector 72
...
hdd: cdrom_read_intr: data underrun (2 blocks)
end_request: I/O error, dev hdd, sector 388
hdd: cdrom_read_intr: data underrun (2 blocks)
end_request: I/O error, dev hdd, sector 392
hdd: cdrom_read_intr: data underrun (2 blocks)
end_request: I/O error, dev hdd, sector 396

2.4.2x:

[root@gargoyle rddunlap]# blockdev --getss /dev/hdd
512
[root@gargoyle rddunlap]# blockdev --getbsz  /dev/hdd
2048


--
~Randy
MOTD:  Always include version info.

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

* Re: Problem loopmounting CD on 2.6.0
  2003-12-19 22:00 ` Randy.Dunlap
@ 2003-12-22 14:27   ` OGAWA Hirofumi
  0 siblings, 0 replies; 3+ messages in thread
From: OGAWA Hirofumi @ 2003-12-22 14:27 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: elgaard, linux-kernel

"Randy.Dunlap" <rddunlap@osdl.org> writes:

> On Fri, 19 Dec 2003 14:10:44 +0100 Niels Elgaard Larsen <elgaard@agol.dk> wrote:
> 
> | A similar (probably the same) problem have been reported for cryptoloop.
> | With a ISO9660 CD (actually Knoppix) in drive /dev/hdc, no SCSI emulation:
> | 
> | amigos20:/mnt# losetup /dev/loop5 /dev/hdc
> | amigos20:/mnt# mount -r /dev/loop5 /mnt/foo
> | 
> | Gives kernel output:
> | 
> | ===
> | hdc: cdrom_read_intr: data underrun (2 blocks)
> | end_request: I/O error, dev hdc, sector 64
> | isofs_fill_super: bread failed, dev=loop5, iso_blknum=16, block=32
> | ===
> | 
> | It works in 2.4.20
> | 
> | Also
> | 
> | dd if=/dev/hdc of=/tmp/foo
> | losetup /dev/loop5 /tmp/foo
> | mount -r /dev/loop5 /mnt/foo
> | 
> | works
> 
> I see differing sector size and block size reports by blockdev
> as follows.  Is this OK/expected or does it hint at a problem?

Probably we need to set the hardsect_size of real device to loop.
At least, it seems this problem was fixed.

What do you think of the following patch?

 drivers/block/loop.c |    1 +
 1 files changed, 1 insertion(+)

diff -puN drivers/block/loop.c~loop-fix-hardsect_size drivers/block/loop.c
--- linux-2.6.0/drivers/block/loop.c~loop-fix-hardsect_size	2003-12-22 22:36:50.000000000 +0900
+++ linux-2.6.0-hirofumi/drivers/block/loop.c	2003-12-22 22:37:19.000000000 +0900
@@ -752,6 +752,7 @@ static int loop_set_fd(struct loop_devic
 		blk_queue_max_sectors(lo->lo_queue, q->max_sectors);
 		blk_queue_max_phys_segments(lo->lo_queue,q->max_phys_segments);
 		blk_queue_max_hw_segments(lo->lo_queue, q->max_hw_segments);
+		blk_queue_hardsect_size(lo->lo_queue, queue_hardsect_size(q));
 		blk_queue_max_segment_size(lo->lo_queue, q->max_segment_size);
 		blk_queue_segment_boundary(lo->lo_queue, q->seg_boundary_mask);
 		blk_queue_merge_bvec(lo->lo_queue, q->merge_bvec_fn);

_

-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

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

end of thread, other threads:[~2003-12-22 14:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-19 13:10 Problem loopmounting CD on 2.6.0 Niels Elgaard Larsen
2003-12-19 22:00 ` Randy.Dunlap
2003-12-22 14:27   ` OGAWA Hirofumi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox