Re: SATA access beyond end of device - How to fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dwaine Garden wrote:
I'm getting the following under Fedora 5 and 6 rawhide. Because of this situation, I can not use a kernel higher than 2.6.15-1.2041_FC5smp. 2064 kernal complains that device-mapper can not divide by chunk size. Logical volume was created by Fedora 5 test2 installation DVD.

How would some sorry soul resolve this?

PCI: Via IRQ fixup for 0000:00:0f.0, from 11 to 0
Mar 21 20:42:30 www kernel: sata_via 0000:00:0f.0: routed to hard irq line 0 Mar 21 20:42:30 www kernel: ata1: SATA max UDMA/133 cmd 0xBC00 ctl 0xC002 bmdma 0xCC00 irq 16 Mar 21 20:42:30 www kernel: ata2: SATA max UDMA/133 cmd 0xC400 ctl 0xC802 bmdma 0xCC08 irq 16
Mar 21 20:42:30 www kernel: ata1: SATA link up 1.5 Gbps (SStatus 113)
Mar 21 20:42:30 www kernel: ata1: dev 0 ATA-7, max UDMA/133, 156250000 sectors: LBA48
Mar 21 20:42:30 www kernel: ata1: dev 0 configured for UDMA/133
Mar 21 20:42:30 www kernel: scsi0 : sata_via
Mar 21 20:42:30 www kernel: ata2: SATA link up 1.5 Gbps (SStatus 113)
Mar 21 20:42:30 www kernel: ata2: dev 0 ATA-6, max UDMA/133, 156301488 sectors: LBA
Mar 21 20:42:30 www kernel: ata2: dev 0 configured for UDMA/133
Mar 21 20:42:30 www kernel: scsi1 : sata_via
Mar 21 20:42:30 www kernel: Vendor: ATA Model: WDC WD800JD-75LS Rev: 09.0 Mar 21 20:42:30 www kernel: Type: Direct-Access ANSI SCSI revision: 05 Mar 21 20:42:30 www kernel: SCSI device sda: 156250000 512-byte hdwr sectors (80000 MB)
Mar 21 20:42:30 www kernel: sda: Write Protect is off
Mar 21 20:42:30 www kernel: SCSI device sda: drive cache: write back
Mar 21 20:42:30 www kernel: SCSI device sda: 156250000 512-byte hdwr sectors (80000 MB)
Mar 21 20:42:30 www kernel: sda: Write Protect is off
Mar 21 20:42:30 www kernel: SCSI device sda: drive cache: write back
Mar 21 20:42:30 www kernel:  sda: sda1 sda2 sda3
Mar 21 20:42:30 www kernel: sd 0:0:0:0: Attached scsi disk sda
Mar 21 20:42:30 www kernel: Vendor: ATA Model: WDC WD800JD-22JN Rev: 05.0 Mar 21 20:42:30 www kernel: Type: Direct-Access ANSI SCSI revision: 05 Mar 21 20:42:30 www kernel: SCSI device sdb: 156301488 512-byte hdwr sectors (80026 MB)
Mar 21 20:42:30 www kernel: sdb: Write Protect is off
Mar 21 20:42:30 www kernel: SCSI device sdb: drive cache: write back
Mar 21 20:42:30 www kernel: SCSI device sdb: 156301488 512-byte hdwr sectors (80026 MB)
Mar 21 20:42:30 www kernel: sdb: Write Protect is off
Mar 21 20:42:30 www kernel: SCSI device sdb: drive cache: write back
Mar 21 20:42:30 www kernel:  sdb: unknown partition table
Mar 21 20:42:30 www kernel: sd 1:0:0:0: Attached scsi disk sdb
Mar 21 20:42:30 www kernel: device-mapper: 4.5.0-ioctl (2005-10-04) initialised: dm-devel@xxxxxxxxxx
Mar 21 20:42:30 www kernel: attempt to access beyond end of device
Mar 21 20:42:30 www kernel: sda: rw=0, want=156250010, limit=156250000
Mar 21 20:42:30 www kernel: Buffer I/O error on device dm-0, logical block 156249996
Mar 21 20:42:30 www kernel: attempt to access beyond end of device
Mar 21 20:42:30 www kernel: sda: rw=0, want=156250012, limit=156250000
Mar 21 20:42:30 www kernel: Buffer I/O error on device dm-0, logical block 156249997
Mar 21 20:42:30 www kernel: attempt to access beyond end of device
Mar 21 20:42:30 www kernel: sda: rw=0, want=156250014, limit=156250000
Mar 21 20:42:30 www kernel: Buffer I/O error on device dm-0, logical block 156249998
Mar 21 20:42:30 www kernel: attempt to access beyond end of device
Mar 21 20:42:30 www kernel: sda: rw=0, want=156250010, limit=156250000
Mar 21 20:42:30 www kernel: Buffer I/O error on device dm-0, logical block 156249996
Mar 21 20:42:30 www kernel: attempt to access beyond end of device
Mar 21 20:42:30 www kernel: sda: rw=0, want=156250012, limit=156250000
Mar 21 20:42:30 www kernel: Buffer I/O error on device dm-0, logical block 156249997
Mar 21 20:42:30 www kernel: attempt to access beyond end of device
Mar 21 20:42:30 www kernel: sda: rw=0, want=156250014, limit=156250000
Mar 21 20:42:30 www kernel: Buffer I/O error on device dm-0, logical block 156249998 Mar 21 20:42:30 www kernel: EXT3-fs: INFO: recovery required on readonly filesystem. Mar 21 20:42:30 www kernel: EXT3-fs: write access will be enabled during recovery. Mar 21 20:42:30 www kernel: kjournald starting. Commit interval 5 seconds
Mar 21 20:42:31 www kernel: EXT3-fs: dm-4: orphan cleanup on readonly fs
Mar 21 20:42:31 www kernel: EXT3-fs: dm-4: 5 orphan inodes deleted
Mar 21 20:42:31 www kernel: EXT3-fs: recovery complete.
Mar 21 20:42:31 www kernel: EXT3-fs: mounted filesystem with ordered data mode

Here is the patch which does not allow me to boot. I would be grateful for any help where a reformat and install is not needed.


[PATCH] dm stripe: Fix bounds <http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=8ba32fde2c5be52865b2fd7e5e3752a46971fabe>
author 	Kevin Corry <kevcorry@xxxxxxxxxx>

	Fri, 17 Mar 2006 07:04:03 +0000 (23:04 -0800)
committer 	Linus Torvalds <torvalds@xxxxxxxxxxx>

	Fri, 17 Mar 2006 15:51:25 +0000 (07:51 -0800)
commit 	8ba32fde2c5be52865b2fd7e5e3752a46971fabe
tree 91988d69b76b1d142117b0ed827fc20eb11c9360 <http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=tree;h=91988d69b76b1d142117b0ed827fc20eb11c9360;hb=8ba32fde2c5be52865b2fd7e5e3752a46971fabe> tree <http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=tree;h=91988d69b76b1d142117b0ed827fc20eb11c9360;hb=8ba32fde2c5be52865b2fd7e5e3752a46971fabe> parent 82c3c03a4096badd026c6e337f3c5dde020e9ec6 <http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=82c3c03a4096badd026c6e337f3c5dde020e9ec6> commit <http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=82c3c03a4096badd026c6e337f3c5dde020e9ec6> | commitdiff <http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=8ba32fde2c5be52865b2fd7e5e3752a46971fabe;hp=82c3c03a4096badd026c6e337f3c5dde020e9ec6>

[PATCH] dm stripe: Fix bounds

The dm-stripe target currently does not enforce that the size of a stripe
device be a multiple of the chunk-size.  Under certain conditions, this can
lead to I/O requests going off the end of an underlying device.  This
test-case shows one example.

echo "0 100 linear /dev/hdb1 0" | dmsetup create linear0
echo "0 100 linear /dev/hdb1 100" | dmsetup create linear1
echo "0 200 striped 2 32 /dev/mapper/linear0 0 /dev/mapper/linear1 0" | \
   dmsetup create stripe0
dd if=/dev/zero of=/dev/mapper/stripe0 bs=1k

This will produce the output:
dd: writing '/dev/mapper/stripe0': Input/output error
97+0 records in
96+0 records out

And in the kernel log will be:
attempt to access beyond end of device
dm-0: rw=0, want=104, limit=100

The patch will check that the table size is a multiple of the stripe
chunk-size when the table is created, which will prevent the above striped
device from being created.

This should not affect tools like LVM or EVMS, since in all the cases I can
think of, striped devices are always created with the sizes being a
multiple of the chunk-size.

The size of a stripe device must be a multiple of its chunk-size.

(akpm: that typecast is quite gratuitous)

Signed-off-by: Kevin Corry <kevcorry@xxxxxxxxxx>
Signed-off-by: Alasdair G Kergon <agk@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
Signed-off-by: Linus Torvalds <torvalds@xxxxxxxx>

--
fedora-test-list mailing list
fedora-test-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-test-list

[Index of Archives]     [Fedora Desktop]     [Fedora SELinux]     [Photo Sharing]     [Yosemite Forum]     [KDE Users]