From owner-freebsd-bugs@freebsd.org Tue Apr 23 06:04:25 2019 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36AB7158F8E1 for ; Tue, 23 Apr 2019 06:04:25 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 830F790F36 for ; Tue, 23 Apr 2019 06:04:24 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: by mailman.ysv.freebsd.org (Postfix) id 4388B158F8DF; Tue, 23 Apr 2019 06:04:24 +0000 (UTC) Delivered-To: bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3122D158F8DE for ; Tue, 23 Apr 2019 06:04:24 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 94E5B90F34; Tue, 23 Apr 2019 06:04:23 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 2D4D3D64C; Tue, 23 Apr 2019 16:04:19 +1000 (AEST) Date: Tue, 23 Apr 2019 16:04:18 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: avg@FreeBSD.org cc: bugs@freebsd.org Subject: Re: [Bug 202712] [cam] [ata] System doesn't recognize older hdd after boot In-Reply-To: Message-ID: <20190423154851.A9443@besplex.bde.org> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=P6RKvmIu c=1 sm=1 tr=0 cx=a_idp_d a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=ipPpj3-S_67_RfYIve8A:9 a=h66O-ePhuWG8ggnJ:21 a=8h0Q_wugYnm_ldJ5:21 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-Rspamd-Queue-Id: 94E5B90F34 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.987,0] X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Apr 2019 06:04:25 -0000 On Mon, 22 Apr 2019 a bug that doesn't want replies@freebsd.org wrote: > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202712 > > --- Comment #21 from Andriy Gapon --- > (In reply to Domagoj Hranjec from comment #20) > And my point is that I am not sure if you have actually tested reading from the > end of the disk with the older FreeBSD. I am not sure that the older FreeBSD > reads sectors at the end for tasting and that any of the files you accessed > have blocks sufficiently close to the end. > But I do not insist that my hypothesis is correct. > Bruce has suggested another one, for instance. Old ATA also has, and sometimes uses, a feature of limiting the drive's size reported by the IDENTIFY command (IIRC, the struct contains the limited and unlimited sizes, but old drivers only look in the old parts of the struct which only have the limited size). Even without that, if the drive supports both CHS and LBA and the driver changes between them, there is a chance of getting different sizes depending only whether the last "cylinder" ink the fake geometry can be partial. Old CHS geometries are closer to physical. Not so old drives that support LBA usually have a non-physical geometry with 15 fake heads, and also round the total number of sectors so that the last cylinder in the fake geometry isn't partial. Usually the total number of sectors reported in the boot messages is the actual number of accessible sectors for the current configuration, so you can tell if there are unreadable blocks at the end are from this number changing. Bruce