From owner-freebsd-usb@FreeBSD.ORG Mon Jan 28 15:04:48 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D72EA16A419 for ; Mon, 28 Jan 2008 15:04:48 +0000 (UTC) (envelope-from petert@dcn.nord.nw.ru) Received: from dcn.infos.ru (gw-9cor.infos.ru [195.209.229.106]) by mx1.freebsd.org (Postfix) with ESMTP id 8444D13C468 for ; Mon, 28 Jan 2008 15:04:48 +0000 (UTC) (envelope-from petert@dcn.nord.nw.ru) Received: from dcn.research.dcn (localhost.research.dcn [127.0.0.1]) by dcn.research.dcn (Postfix) with SMTP id 494434ACBF for ; Mon, 28 Jan 2008 17:48:16 +0300 (MSK) Received: by dcn.infos.ru (Postfix, from userid 65534) id DFFCC4ACB4; Mon, 28 Jan 2008 17:48:15 +0300 (MSK) X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on dcn.research.dcn X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_40 autolearn=no version=3.2.3 Received: from kas30pipe.localhost (localhost.research.dcn [127.0.0.1]) by dcn.infos.ru (Postfix) with ESMTP id B52E84ACAF for ; Mon, 28 Jan 2008 17:48:07 +0300 (MSK) Received: from bullet (bullet.research.dcn [10.0.103.26]) by dcn.infos.ru (Postfix) with ESMTP id A68574AC70 for ; Mon, 28 Jan 2008 17:48:07 +0300 (MSK) From: "Peter Trifonov" To: Date: Mon, 28 Jan 2008 17:48:07 +0300 Message-ID: <000901c861bc$cb8b9e90$62a2dbb0$@nord.nw.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AchhvMpYNghcBmO/Rn++pJvgM7kDbg== Content-Language: ru x-cr-hashedpuzzle: BI6Z BKbZ B2ZR C7Bx ESM4 EmvY FT/S GvbN HIbI HmU0 IX0/ IiiW JcZi JwHb Km/7 KuZA; 1; ZgByAGUAZQBiAHMAZAAtAHUAcwBiAEAAZgByAGUAZQBiAHMAZAAuAG8AcgBnAA==; Sosha1_v1; 7; {D5FBAE1D-7B52-4980-B5FC-3189A95116C9}; cABlAHQAZQByAHQAQABkAGMAbgAuAG4AbwByAGQALgBuAHcALgByAHUA; Mon, 28 Jan 2008 14:48:05 GMT; TQBvAHUAbgB0AGkAbgBnACAAVQBTAEIAIABmAGwAYQBzAGgAIABkAHIAaQB2AGUA x-cr-puzzleid: {D5FBAE1D-7B52-4980-B5FC-3189A95116C9} X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0255], KAS30/Release X-SpamTest-Info: Not protected Subject: Mounting USB flash drive X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jan 2008 15:04:48 -0000 Hello everyone, I am trying to configure FreeBSD 6.3 to allow hot removal of USB flash cards without their manual unmounting. I have successfully used the patches by Henrik Gulbrandsen (http://www.freebsd.org/cgi/query-pr.cgi?pr=46176&cat= ) to avoid kernel panic after device removal, and the only problem remaining is cache management. If the device is mounted without the sync option, the performance is perfect, but hot removal sometimes causes data corruption on the flash disk. If sync option is used while mounting the device, write performance becomes terrible (20 KB/s). Is there any way to improve write performance with sync option or prevent data corruption without it? I understand that umount should be used to completely avoid these problems, but in my case it is not possible to invoke it, since the users will not be given shell access. With best regards, P. Trifonov