From olli@graal.camelot.de  Tue Jan  5 12:12:46 1999
Received: from mail.camelot.de (mail.camelot.de [195.30.224.10])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA00128
          for <FreeBSD-gnats-submit@freebsd.org>; Tue, 5 Jan 1999 12:12:44 -0800 (PST)
          (envelope-from olli@graal.camelot.de)
Received: from robin.camelot.de (uucp@robin.camelot.de [195.30.224.3])
	by mail.camelot.de (8.8.8/8.8.8) with ESMTP id VAA01112
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 5 Jan 1999 21:12:08 +0100 (CET)
	(envelope-from olli@graal.camelot.de)
Received: (from uucp@localhost)
	by robin.camelot.de (8.8.8/8.8.8) with UUCP id VAA01108
	for FreeBSD-gnats-submit@freebsd.org; Tue, 5 Jan 1999 21:12:07 +0100 (CET)
	(envelope-from olli@graal.camelot.de)
Received: from gradalis.local.net (gradalis [192.168.0.44])
	by graal.camelot.de (8.8.5/8.8.5) with ESMTP id SAA16036;
	Tue, 5 Jan 1999 18:55:32 +0100 (MET)
Received: (from olli@localhost)
	by gradalis.local.net (8.9.1/8.8.5) id SAA09555;
	Tue, 5 Jan 1999 18:55:32 +0100 (MET)
Message-Id: <199901051755.SAA09555@gradalis.local.net>
Date: Tue, 5 Jan 1999 18:55:32 +0100 (MET)
From: Oliver Nissen <olli@graal.camelot.de>
Reply-To: olli@graal.camelot.de
To: FreeBSD-gnats-submit@freebsd.org
Cc: olli@graal.camelot.de
Subject: cp fails for 2048 Bytes/sector media
X-Send-Pr-Version: 3.2

>Number:         9334
>Category:       kern
>Synopsis:       cp fails for 2048 Bytes/sector media
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan  5 12:20:00 PST 1999
>Closed-Date:    Mon Aug 14 00:15:31 PDT 2000
>Last-Modified:  Mon Aug 14 00:16:31 PDT 2000
>Originator:     Oliver Nissen
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
CameloT Online Services
>Environment:

avail memory = 127447040 (124460K bytes)
Programming 24 pins in IOAPIC #0
FreeBSD/SMP: Multiprocessor motherboard
 cpu0 (BSP): apic id:  0, version: 0x00030010, at 0xfee00000
 cpu1 (AP):  apic id:  1, version: 0x00030010, at 0xfee00000
 io0 (APIC): apic id:  2, version: 0x00170011, at 0xfec00000
Probing for devices on PCI bus 0:
chip0: <Intel 82439> rev 0x03 on pci0.0.0
chip1: <Intel 82371SB PCI to ISA bridge> rev 0x01 on pci0.7.0
vga0: <Matrox MGA 2064W graphics accelerator> rev 0x01 int a irq 17 on pci0.9.0
bktr0: <BrookTree 848> rev 0x12 int a irq 18 on pci0.10.0
bti2c0: <bt848 Hard/Soft I2C controller>
iicbb0: <I2C generic bit-banging driver> on bti2c0
iicbus0: <Philips I2C bus> on iicbb0 master-only
Probing for devices on iicbus0: <c0> <c1> <c2> <c3>
smbus0: <System Management Bus> on bti2c0
smb0: <SMBus general purpose I/O> on smbus0
Miro TV, Temic PAL tuner.
ahc0: <Adaptec aic7880 Ultra SCSI adapter> rev 0x00 int a irq 19 on pci0.12.0
ahc0: Using left over BIOS settings
ahc0: aic7880 Wide Channel A, SCSI Id=7, 16/255 SCBs
Probing for devices on the ISA bus:
sc0 at 0x60-0x6f irq 1 on motherboard
sc0: VGA color <16 virtual consoles, flags=0x0>
ed0 at 0x280-0x29f irq 15 maddr 0xd8000 msize 16384 on isa
ed0: address 00:00:c0:a7:a1:a2, type SMC8216/SMC8216C (16 bit) 
sio0 at 0x3f8-0x3ff irq 4 flags 0x10 on isa
sio0: type 16550A
sio1 at 0x2f8-0x2ff irq 3 on isa
sio1: type 16550A
lpt0 at 0x378-0x37f irq 7 on isa
lpt0: Interrupt-driven port
lp0: TCP/IP capable interface
psm0 at 0x60-0x64 irq 12 on motherboard
psm0: model Generic PS/2 mouse, device ID 0
fdc0 at 0x3f0-0x3f7 irq 6 drq 2 on isa
fdc0: FIFO enabled, 8 bytes threshold
fd0: 1.44MB 3.5in
isic0 at 0xd80 irq 10 flags 0x3 on isa
isic0: Teles S0/16.3
isic0: ISAC 2085 Version A1/A2 or 2086/2186 Version 1.1 (IOM-2) (Addr=0x960)
isic0: HSCX 82525 or 21525 Version 2.1 (AddrA=0x160, AddrB=0x560)
npx0 on motherboard
npx0: INT 16 interface
apm0 flags 0x31 on isa
apm: found APM BIOS version 1.2
sb0 at 0x220 irq 5 drq 1 on isa
snd0: <SoundBlaster 16 4.4> 
sbxvi0 at drq 5 on isa
snd0: <SoundBlaster 16 4.4> 
sbmidi0 at 0x330 on isa
snd0: <SoundBlaster MPU-401> 
opl0 at 0x388 on isa
snd0: <Yamaha OPL3 FM> 
Intel Pentium detected, installing workaround for F00F bug
IP packet filtering initialized, divert enabled, rule-based forwarding enabled, logging limited to 100 packets/entry
i4b: ISDN call control device attached
i4bisppp: 4 ISDN SyncPPP device(s) attached
i4bctl: ISDN system control port attached
i4bipr: 4 IP over raw HDLC ISDN device(s) attached (VJ header compression)
i4btel: 2 ISDN telephony interface device(s) attached
i4brbch: 4 raw B channel access device(s) attached
i4btrc: 4 ISDN trace device(s) attached
Waiting 10 seconds for SCSI devices to settle
SMP: AP CPU #1 Launched!
pass4 at ahc0 bus 0 target 5 lun 0
pass4: <HP C5110A 3638> Fixed Processor SCSI-2 device 
pass4: 3.300MB/s transfers
changing root device to da0s1a
cd0 at ahc0 bus 0 target 4 lun 0
cd0: <PIONEER CD-ROM DR-U12X 1.06> Removable CD-ROM SCSI-2 device 
cd0: 10.0MB/s transfers (10.0MHz, offset 15)
cd0: cd present [198888 x 2048 byte records]
da1 at ahc0 bus 0 target 2 lun 0
da1: <FUJITSU M2513E 0040> Removable Optical SCSI-2 device 
da1: 10.0MB/s transfers (10.0MHz, offset 15)
da1: Attempt to query device size failed: NOT READY, Medium not present
da0 at ahc0 bus 0 target 0 lun 0
da0: <IBM DCAS-34330 S61A> Fixed Direct Access SCSI-2 device 
da0: 20.0MB/s transfers (20.0MHz, offset 15), Tagged Queueing Enabled
da0: 4134MB (8467200 512 byte sectors: 64H 32S/T 4134C)
(da0:ahc0:0:0:0): tagged openings now 64
dscheck: b_bcount 25600 is not on a sector boundary (ssize 2048)
spec_getpages: I/O read failure: (error code=22)
               size: 25600, resid: 25600, a_count: 24830, valid: 0x0
               nread: 0, reqpage: 0, pindex: 200, pcount: 7
vm_fault: pager read error, pid 1201 (cp)
dscheck: b_bcount 512 is not on a sector boundary (ssize 2048)
dscheck: b_bcount 512 is not on a sector boundary (ssize 2048)
dscheck: b_bcount 25600 is not on a sector boundary (ssize 2048)
spec_getpages: I/O read failure: (error code=22)
               size: 25600, resid: 25600, a_count: 24830, valid: 0x0
               nread: 0, reqpage: 0, pindex: 200, pcount: 7
vm_fault: pager read error, pid 9225 (cp)

>Description:

	When I insert a 640 MB (2048 Bytes/sector) OD into the drive, mount it on /od and try to copy a file from the OD to the harddisk I potentially get:

[101] gradalis:~> cp /od/sane-1.00.tar.gz .
cp: ./sane-1.00.tar.gz: Bad address
[102] gradalis:~>

The console then shows:

dscheck: b_bcount 25600 is not on a sector boundary (ssize 2048)
spec_getpages: I/O read failure: (error code=22)
               size: 25600, resid: 25600, a_count: 24830, valid: 0x0
               nread: 0, reqpage: 0, pindex: 200, pcount: 7
vm_fault: pager read error, pid 9518 (cp)


>How-To-Repeat:

	see error description

>Fix:
	
	None. Well, if it is really important ro get (a few) files then you can use dd.

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed 
State-Changed-By: n_hibma 
State-Changed-When: Fri Jul 23 06:21:54 PDT 1999 
State-Changed-Why:  
If I remember correctly this problem has been fixed, or at least partially. 
Otherwise, the people working on the OD driver, might know more or have proper 
fixes. 
Responsible-Changed-From-To: freebsd-bugs->n_hibma 
Responsible-Changed-By: n_hibma 
Responsible-Changed-When: Fri Jul 23 06:22:58 PDT 1999 
Responsible-Changed-Why:  
For now, remind me to answer this one and close it if it indeed has been fixed 
or will be fixed in the next few weeks with the new OD driver. 

From: Nick Hibma <nick.hibma@jrc.it>
To: freebsd-gnats-submit@freebsd.org
Cc: olli@graal.camelot.de
Subject: Re: kern/9334: cp fails for 2048 Bytes/sector media
Date: Sat, 24 Jul 1999 12:13:01 +0200 (MET DST)

 The patch is against current.
 
 Nick
 
 >----- Forwarded message
 
 
 I'm using DVD-RAM(2048 bytes/sect) with this patch.
 
 Index: ufs/ufs_readwrite.c
 ===================================================================
 RCS file: /pub/FreeBSD-CVS/src/sys/ufs/ufs/ufs_readwrite.c,v
 retrieving revision 1.60
 diff -u -r1.60 ufs_readwrite.c
 --- ufs_readwrite.c	1999/07/13 18:20:12	1.60
 +++ ufs_readwrite.c	1999/07/20 06:49:20
 @@ -712,6 +712,12 @@
  		obj->un_pager.vnp.vnp_size)
  		size = obj->un_pager.vnp.vnp_size -
  			IDX_TO_OFF(ap->a_m[firstpage]->pindex);
 +	/*
 +	 * XXX Round up physical size
 +	 * This should be done in VOP_GETPAGES.
 +	 */
 +	bsize = vp->v_mount->mnt_stat.f_bsize;
 +	size = (size + bsize - 1) & ~(bsize - 1);
  
  	physoffset -= foff;
  	rtval = VOP_GETPAGES(dp, &ap->a_m[firstpage], size,
 
 -- 
 /\ Hidetoshi Shimokawa
 \/  simokawa@sat.t.u-tokyo.ac.jp
 PGP public key: finger -l simokawa@sat.t.u-tokyo.ac.jp
 
 

From: Nick Hibma <nick.hibma@jrc.it>
To: freebsd-gnats-submit@freebsd.org
Cc: olli@graal.camelot.de
Subject: Re: kern/9334: cp fails for 2048 Bytes/sector media (fwd)
Date: Sat, 24 Jul 1999 13:02:08 +0200 (MET DST)

 ---------- Forwarded message ----------
 Date: Sat, 24 Jul 1999 03:00:39 +1000
 From: Bruce Evans <bde@zeta.org.au>
 To: n_hibma@FreeBSD.ORG
 Subject: Re: kern/9334: cp fails for 2048 Bytes/sector media
 
 This looks like a vm or fs problem (nothing to do with od or da).
 
 I know of the following bugs in 2KB-sector support:
 - dssize() is broken; it returns the size in sectors instead of in
   512-blocks.  thus swapping and dumping are broken.  Perhaps they
   are only limited to using 1/4 of the partition.
 - msdosfs assumes 512-byte sectors.
 
 Bruce
 
 
 
Responsible-Changed-From-To: n_hibma->freebsd-bugs 
Responsible-Changed-By: n_hibma 
Responsible-Changed-When: Sun Aug 6 16:46:04 PDT 2000 
Responsible-Changed-Why:  
Nothing additional I can do on this bug. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=9334 
State-Changed-From-To: analyzed->feedback 
State-Changed-By: sheldonh 
State-Changed-When: Mon Aug 7 05:23:25 PDT 2000 
State-Changed-Why:  
AThere have been some pretty extensive changes in both 
the VM and ffs (not to mention the SCSI subsystem) since 
3.0-CURRENT (Jan 1999). 

Is this still a problem?  If so, could we have a backtrace 
from a kernel with debugging symbols?  You'll need a  
debugging kernel (``makeoptions DEBUG=-g'' in the kernel  
config file and config'd with config -g). 

Once you have one, have a look at the instructions at: 

http://www.freebsd.org/handbook/kerneldebug.html 

Be sure to send your follow-up to 
<freebsd-gnats-submit@freebsd.org>, preserving the Subject      
line of this e-mail message. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=9334 

From: Oliver Nissen <olli@graal.camelot.de>
To: sheldonh@FreeBSD.org, freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: kern/9334: cp fails for 2048 Bytes/sector media
Date: Sun, 13 Aug 2000 14:34:06 +0200

 sheldonh@FreeBSD.org wrote:
 > 
 > Synopsis: cp fails for 2048 Bytes/sector media
 > 
 > State-Changed-From-To: analyzed->feedback
 > State-Changed-By: sheldonh
 > State-Changed-When: Mon Aug 7 05:23:25 PDT 2000
 > State-Changed-Why:
 > AThere have been some pretty extensive changes in both
 > the VM and ffs (not to mention the SCSI subsystem) since
 > 3.0-CURRENT (Jan 1999).
 > 
 > Is this still a problem?  If so, could we have a backtrace
 > from a kernel with debugging symbols?  You'll need a
 > debugging kernel (``makeoptions DEBUG=-g'' in the kernel
 > config file and config'd with config -g).
 > 
 > Once you have one, have a look at the instructions at:
 > 
 >         http://www.freebsd.org/handbook/kerneldebug.html
 > 
 > Be sure to send your follow-up to
 > <freebsd-gnats-submit@freebsd.org>, preserving the Subject
 > line of this e-mail message.
 > 
 > http://www.freebsd.org/cgi/query-pr.cgi?pr=9334
 
 The problem is gone at least with 3.1-STABLE.
 
 
State-Changed-From-To: feedback->closed 
State-Changed-By: sheldonh 
State-Changed-When: Mon Aug 14 00:15:31 PDT 2000 
State-Changed-Why:  
Believed to be fixed prior to 3.2-RELEASE. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=9334 
>Unformatted:
