From owner-freebsd-scsi@FreeBSD.ORG Fri Feb 2 21:32:23 2007 Return-Path: X-Original-To: scsi@freebsd.org Delivered-To: freebsd-scsi@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 30E6D16A408 for ; Fri, 2 Feb 2007 21:32:23 +0000 (UTC) (envelope-from nate@root.org) Received: from root.org (root.org [67.118.192.226]) by mx1.freebsd.org (Postfix) with ESMTP id F137F13C441 for ; Fri, 2 Feb 2007 21:32:22 +0000 (UTC) (envelope-from nate@root.org) Received: (qmail 74773 invoked from network); 2 Feb 2007 21:32:23 -0000 Received: from adsl-67-119-74-222.dsl.sntc01.pacbell.net (HELO ?10.0.0.44?) (nate-mail@67.119.74.222) by root.org with ESMTPA; 2 Feb 2007 21:32:23 -0000 Message-ID: <45C3ADDE.6040407@root.org> Date: Fri, 02 Feb 2007 13:32:14 -0800 From: Nate Lawson User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: mjacob@freebsd.org References: <20070123173026.E692416A4CD@hub.freebsd.org> <45B65710.4060607@root.org> <20070123105009.G41619@ns1.feral.com> <45B67401.9070102@samsco.org> <20070201150111.B77236@ns1.feral.com> <45C27965.1010803@samsco.org> <45C2E7DB.30204@root.org> <20070202080329.L17850@ns1.feral.com> <45C3860C.3000206@root.org> <20070202123728.C36488@ns1.feral.com> In-Reply-To: <20070202123728.C36488@ns1.feral.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: scsi@freebsd.org Subject: Re: cvs commit: src/sys/cam/scsi scsi_da.c X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Feb 2007 21:32:23 -0000 mjacob@freebsd.org wrote: >> As long as it's specific to a known external device (USB), and the >> user knows that running some command (device_eject umass0) will make >> sure it's safe, I'm ok. > > Mmm. > >>>> From a silly semantic point of view to get around this, we should still >>> support and require SYNC_CACHE on close except where devices don't >>> support it (and any device that hangs on a SYNC_CACHE doesn't support >>> it- period). On detach, devices that still need to have data commited >>> via an opcode that looks remarkably like SYNC_CACHE can and should >>> have that happen- with all the infrastructure changes that go along >>> with allowing devices to be detached (w/o complaint) with a live >>> command. >>> >>> Or have I missed something it what you're suggesting? >> >> Actually, that's a different idea I had where you set a timeout() >> before running SYNC_CACHE, then cancel the command if it hangs. Not >> sure how to implement the idea of a cancellable device call but maybe >> by creating a temporary thread? > > Why not just quiet SYNC_CACHE timeouts? That's for a device that still works after a timeout. Something about either GEOM, CAM, or USB hangs (or loops infinitely) and refuses to continue the boot if the device times out. -- Nate