From owner-freebsd-stable@FreeBSD.ORG Fri Jul 20 06:41:35 2007 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3EE1E16A419 for ; Fri, 20 Jul 2007 06:41:35 +0000 (UTC) (envelope-from cptsalek@gmail.com) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.187]) by mx1.freebsd.org (Postfix) with ESMTP id C154F13C480 for ; Fri, 20 Jul 2007 06:41:34 +0000 (UTC) (envelope-from cptsalek@gmail.com) Received: by mu-out-0910.google.com with SMTP id w9so855684mue for ; Thu, 19 Jul 2007 23:41:33 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=eYr/p8N28YENDt+XjLFI/zoGxGRlwfe1xo7AeXN3BsDrfylWsksh/xA3Ylk5l/v2VYf31q3ZRjuH6aMs9LAWWH0+dsIlSZSIvxzKdvFzOgAUAb5umZ4pt1UXEVcknVqL0mIE140Uy8A6Y+MEk5eUXcA4dVNO0Hzv6jrfHWkxpiE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=go2lqe0/IB+/f3JUrF77hPRZOKj8y3qTAiuVFG8wujcgZPAPhLLqEsX6y3fPdNnxmquYmSMnSm+7GywQ3D0AM5WSywjMgmvkJhyYfkA1X190u0TYSpsuXVMQwpwh1GR52SY5ljTHQL5DVYzrgn1q9pLiIyKmtmXG1+YBXxblB/s= Received: by 10.82.174.20 with SMTP id w20mr48351bue.1184912171874; Thu, 19 Jul 2007 23:16:11 -0700 (PDT) Received: by 10.82.158.11 with HTTP; Thu, 19 Jul 2007 23:16:11 -0700 (PDT) Message-ID: <14989d6e0707192316p4bd1393dj1c9f73ea0686e40@mail.gmail.com> Date: Fri, 20 Jul 2007 08:16:11 +0200 From: "Christian Walther" To: "M. Warner Losh" In-Reply-To: <20070719.084821.-202614780.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200707181541.l6IFf4ht051775@lurza.secnetix.de> <200707181830.48727.idiotbg@gmail.com> <20070718170559.GA11915@eos.sc1.parodius.com> <20070719.084821.-202614780.imp@bsdimp.com> Cc: freebsd-stable@freebsd.org Subject: Re: removing external usb hdd without unmounting causes reboot? 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: Fri, 20 Jul 2007 06:41:35 -0000 On 19/07/07, M. Warner Losh wrote: [...] > > The best one can do without massive buffer cache work is what firewire > does: it has one attachment to handle all umass devices. When the > device goes away, it pauses all operations to that device. If the > device comes back, it resumes the I/O . If the device never comes > back, then the I/O never finishes. > Is this safe? I don't know where locking occurs in this case, but if locking occurs on a very low level it's potentially dangerous. If a device is removed (either on purpose or by accident) the kernel can't determine the state of the filesystem anymore. So the user could plug the device into another machine, start some write operations on the device, and put it back into the FreeBSD machine. This wouldn't know anything about the changes done, and just flush its buffer, probably using blocks that have been filled previously. It's a pity that FreeBSD can't handle these situations. Since no one here on this list has enough money to get development on the road, maybe we could try collecting money? Everyone interested in seeing this issue fixed offers the amount of money he/she likes to spend... I guess for a "Summer of Code" project this issue would be to big to fix, wouldn't it?