From owner-freebsd-hackers@FreeBSD.ORG Thu May 7 06:23:15 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9CED9334 for ; Thu, 7 May 2015 06:23:15 +0000 (UTC) Received: from mail-la0-x22e.google.com (mail-la0-x22e.google.com [IPv6:2a00:1450:4010:c03::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 199C71C8B for ; Thu, 7 May 2015 06:23:15 +0000 (UTC) Received: by labbd9 with SMTP id bd9so23264205lab.2 for ; Wed, 06 May 2015 23:23:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=4uUZgLeCaUkO5FdNs/obo45yqDggAeNOimjwB6U3Svg=; b=lRixrYJuSst+vNSMAwi4EnLSz+kWRJbZbh5VR9lHRQ6ctChTyiee9pb27CZ07yyEza ecfqSeOjSCDbrASLQ88nNtS0rhaJNjEyKPEXIdNYuKb98gKvD+B0k2e/Ukvq/bQ04fkz 2Kh0rVWlpylSBfghQc24ELRC3KhB05AnmfKyHyM+ONZd8yK/k/AZOGQi5VDeK0wAToks Aa7DYBfi6vuNA94aqYN5pslRpAuJycuKtCXxki4B5oQgqUogbdkg8SJZD1IC16yFa1nc gNeZuD3/GR4tgrbC44BX6hf+B+5Jy9kfytLRlxGhuKdaUyWuy9OZqJ3RUEJ7KK9nVIJz p8xQ== X-Received: by 10.112.230.37 with SMTP id sv5mr1722685lbc.85.1430979793020; Wed, 06 May 2015 23:23:13 -0700 (PDT) Received: from [100.71.79.86] ([5.172.252.86]) by mx.google.com with ESMTPSA id u10sm210924lbb.30.2015.05.06.23.23.12 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 06 May 2015 23:23:12 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) Subject: Re: What's required to make removal of a mounted USB stick safe? From: =?utf-8?Q?Edward_Tomasz_Napiera=C5=82a?= X-Mailer: iPhone Mail (12F70) In-Reply-To: Date: Thu, 7 May 2015 08:23:10 +0200 Cc: "freebsd-hackers@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <1306708F-0872-4D02-9C88-70F683018C39@FreeBSD.org> References: To: Ryan Stone X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2015 06:23:15 -0000 Dnia 6 maj 2015 o godz. 22:49 Ryan Stone napisa=C5=82(a)= : > Currently FreeBSD stands a fair chance at panicking if a mounted USB drive= > is removed while I/O is in flight. Does anybody know what work is involve= d > to have the kernel safely recover from this case? Losing data from the > drive is expected of course but there's no reason that the entire kernel > has to crash. I've spent some time on this few years ago, and got it to work, except for o= ne case: UFS with softupdates. It's possible that some regressions have bee= n introduced since then. What's the filesystem? Do you have a backtrace?