From owner-cvs-all@FreeBSD.ORG Wed Feb 28 13:05:27 2007 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0B53D16A404; Wed, 28 Feb 2007 13:05:27 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from mh1.centtech.com (moat3.centtech.com [64.129.166.50]) by mx1.freebsd.org (Postfix) with ESMTP id C8AC513C48D; Wed, 28 Feb 2007 13:05:26 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh1.centtech.com (8.13.8/8.13.8) with ESMTP id l1SD5NYX085856; Wed, 28 Feb 2007 07:05:23 -0600 (CST) (envelope-from anderson@freebsd.org) Message-ID: <45E57E17.2040803@freebsd.org> Date: Wed, 28 Feb 2007 07:05:27 -0600 From: Eric Anderson User-Agent: Thunderbird 1.5.0.9 (X11/20070204) MIME-Version: 1.0 To: "M. Warner Losh" References: <20070228.033055.-135505832.imp@bsdimp.com> <43716.1172659622@critter.freebsd.dk> <20070228.035502.228971768.imp@bsdimp.com> In-Reply-To: <20070228.035502.228971768.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.88.4/2679/Wed Feb 28 05:58:10 2007 on mh1.centtech.com X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=8.0 tests=AWL,BAYES_00 autolearn=ham version=3.1.6 X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) on mh1.centtech.com Cc: cvs-src@freebsd.org, phk@phk.freebsd.dk, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/dev/usb umass.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Feb 2007 13:05:27 -0000 On 02/28/07 04:55, M. Warner Losh wrote: > In message: <43716.1172659622@critter.freebsd.dk> > "Poul-Henning Kamp" writes: > : In message <20070228.033055.-135505832.imp@bsdimp.com>, "M. Warner Losh" writes > : : > : > : >Others have observed that the number of sectors on a disk should be > : >even. Therefore if maxsectors returned is even, it implies an odd > : >number of sectors and should be adjusted. > : > : Hmm, although generally true for present day disks, I don't think > : it is universal enough that I would want to rely solely on it. > > Google just showed me there are at least two real scsi disks with an > odd number of sectors. It is a report about how Linux can't read the > last sector of those disks and notes in passing that FreeBSD 4.4 > can... > > It might be saner to just do this in the umass layer (eg, always > adjust there if maxsectors is even) rather than rely on a quirk. I think the trick is for it to read the last sector only on umass devices that have odd number of sectors. That should reduce the warnings, and reduce the checks down to only the subset that probably would have the problem anyway. That would nearly eliminate any other side issues or warnings. > : >number of sectors and should be adjusted. That might be an even > : >easier path to follow... I'm never sure when one can schedule > : >additional I/O inside of cam... > : > : Neither am I. > : > : Thinking about it, geom_disk might be a better place for it anyway. > : > : That way we could postpone announcment of the disk to GEOM tasting > : until we know it can actually answer a request. Spin-up and other > : long delays will not affect the system nearly as hard as they can > : today. > : > : Early on I thought about a mandatory "read first & last sector" > : check for all providers created in geom, but dropped it due to the > : excessive shake, rattle and roll of big diskfarms and complex > : layouts. But it might be a good idea to add it in a reduced form > : applied to all providers which come in at rank==1 (that way we > : would not do it for partitions, slices, mirrors etc). > > I'm not entirely sure that's the right place for it either. But the > invariant does seem sane. The tasting code seems to already be > reading it anyway (which is how I noticed the problem recently that > I'd missed when I used this device on 4.x systems), so I'm not sure > how much overhead there would really be... > > Warner > _______________________________________________ > cvs-src@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/cvs-src > To unsubscribe, send any mail to "cvs-src-unsubscribe@freebsd.org"