From owner-freebsd-stable@FreeBSD.ORG Wed Dec 26 23:58:17 2007 Return-Path: Delivered-To: stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8530716A417; Wed, 26 Dec 2007 23:58:17 +0000 (UTC) (envelope-from henrik@gulbra.net) Received: from av9-2-sn2.hy.skanova.net (av9-2-sn2.hy.skanova.net [81.228.8.180]) by mx1.freebsd.org (Postfix) with ESMTP id 0C9BE13C447; Wed, 26 Dec 2007 23:58:17 +0000 (UTC) (envelope-from henrik@gulbra.net) Received: by av9-2-sn2.hy.skanova.net (Postfix, from userid 502) id 808EF37ED4; Thu, 27 Dec 2007 00:58:15 +0100 (CET) Received: from smtp4-2-sn2.hy.skanova.net (smtp4-2-sn2.hy.skanova.net [81.228.8.93]) by av9-2-sn2.hy.skanova.net (Postfix) with ESMTP id 6ADC737E64; Thu, 27 Dec 2007 00:58:15 +0100 (CET) Received: from [192.168.0.2] (81-235-156-87-no29.tbcn.telia.com [81.235.156.87]) by smtp4-2-sn2.hy.skanova.net (Postfix) with ESMTP id CDF1337E44; Thu, 27 Dec 2007 00:58:14 +0100 (CET) From: Henrik Gulbrandsen To: "M. Warner Losh" In-Reply-To: <20071226.114812.1649771240.imp@bsdimp.com> References: <200712260038.11546@aldan> <20071226.003547.-932932005.imp@bsdimp.com> <1198689316.1119.382.camel@Particle> <20071226.114812.1649771240.imp@bsdimp.com> Content-Type: text/plain Date: Thu, 27 Dec 2007 00:56:43 +0100 Message-Id: <1198713403.1119.414.camel@Particle> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: stable@FreeBSD.org, freebsd-usb@FreeBSD.org, mi+kde@aldan.algebra.com Subject: Re: usb/umass, devfs: this sucks X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Dec 2007 23:58:17 -0000 On Wed, 2007-12-26 at 11:48 -0700, M. Warner Losh wrote: > In message: <1198689316.1119.382.camel@Particle> > Henrik Gulbrandsen writes: > : Look at it from my perspective: I would be happy to complete my fix for > : the infamous five-year-old usb/46176, so people can finally detach umass > : devices without having to manually unmount them first. However, it will > : undoubtedly take a non-trivial amount of time to reproduce and eliminate > : the remaining issues. > > There's no patches in this bug. Correct. I was hoping to have a complete fix before making any official announcements, especially since the approach may be a bit controversial. Fixing underlying issues one by one is not necessarily as clean as doing a complete redesign, but it's pretty efficient and good for merging too. The patches to CURRENT were described in this post to the USB list: http://lists.freebsd.org/pipermail/freebsd-usb/2007-November/004127.html > : I'm more likely to put in that effort if I believe > : that my patches may actually end up in CURRENT, but if a one-line fix > : such as that in usb/78984 has not been applied after more than a year, > : how long will it take for patches that involve multiple subsystems? > > The patch in this bug is wrong. There are devices that are an odd > number of sectors. This is one of the places where the obvious patch > isn't necessarily right. You're right. I realized that myself right after I sent the first email. The patch was already two years old when I submitted it, and I guess I must have focused a little too much on solid-state devices with "large" megabytes, where the sector count is very likely to be a power of two. The patch can be written as a quirk fix for this specific umass device, but (as I've mentioned elsewhere) I'd prefer something that handles the entire category of problems at once. Perhaps an extra line containing "if (is_power_of_two(maxsector))" could be a working compromise, but this can be discussed in a smaller setting than the current one. /Henrik