From owner-freebsd-arm@freebsd.org Sun Nov 20 18:46:11 2016 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6DD1BC4C23A for ; Sun, 20 Nov 2016 18:46:11 +0000 (UTC) (envelope-from embaudarm@gmail.com) Received: from mail-qt0-x231.google.com (mail-qt0-x231.google.com [IPv6:2607:f8b0:400d:c0d::231]) (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 2B6979E1 for ; Sun, 20 Nov 2016 18:46:11 +0000 (UTC) (envelope-from embaudarm@gmail.com) Received: by mail-qt0-x231.google.com with SMTP id p16so190367603qta.0 for ; Sun, 20 Nov 2016 10:46:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=HZfe2ntmIttstwv0KyPzdqZEV6MztR94K8+VlR7NOwE=; b=MEaF8Iob/Uz9OgqdLMvMfYdsf6vY5PVX7fMQDuhMoPHWtvF2s+GfM79Rk2leSsZy0C b4rn9fdBqhHuwwixgc0CCEO5qUTRUfzQl8rHmdo2iruMeb/9A2/PXUFPq74LTXlyFLQK qp9Vsm0WSRgMTjWbnnPyRqADY7WeSdrAGzI3aZp1KQt4r98JV2b6dg5+jAqUVQlHBB7U 5awi3fPiy1KG6cjetKff73ogjKcXSMnkAmsKy+fG/1y2bfBO9W1v0RqsG5mnlCZjHx1H 4+wBlVWOIj5m0qzQFMW3ISC3bjFQGdry+0yWjbrCyGrhhUUCUc2bltgeT4MMJ6OZrv8P 6khQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=HZfe2ntmIttstwv0KyPzdqZEV6MztR94K8+VlR7NOwE=; b=R+FS1NGce2Gnrc+JgWWeBYa0SVa5Pusc+C81nGZYYl5tkBGTiPxr9tm7hxT1CKGFeW m4za9cEv5xG1/MqW8r1WcSXROK9XFouws0p3E8euJr3jx4f1sA3I38SjFJlHFM8HZRVW pLWSK0mN512DVo0CLSZLsmGJjZWSgt3MIG3jKgPjAAD/ipwlRDBxSdRJZm0X92P5m0vy tWDf2oMKJwKG4l+CN76pSlutHtUcgXrkSei7GTuMKpFPchtZjAw8p4pNMDsFnldgSEb2 jn40vgEY9w1mS2+c7OnQblQ6ATQjPdKTyDhA9XQE2OA2RWqMX4Hmq089aNVm2/yEBebH N7vg== X-Gm-Message-State: AKaTC02FDtGVuk3XdxzmGDF4V6kkboOMcAItzAsZ9bfIQxVXGk4r3xSGxta3ySAj210LpS67QKTi5liiW44v0A== X-Received: by 10.237.62.202 with SMTP id o10mr5911890qtf.2.1479667570255; Sun, 20 Nov 2016 10:46:10 -0800 (PST) MIME-Version: 1.0 Received: by 10.200.41.210 with HTTP; Sun, 20 Nov 2016 10:46:09 -0800 (PST) From: Lee D Date: Sun, 20 Nov 2016 13:46:09 -0500 Message-ID: Subject: SD-Card bug, eject without umount To: freebsd-arm Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 18:46:11 -0000 I am running 10.3 on Xilinx Zynq. I've noticed an SD-Card bug. If I am writing to an SD-Card, and then eject the SD-Card without unmounting, everything appears to be fine. However if I then try to umount the SD-Card, the umount program hangs. The rest of the system keeps running. If I eject the SD-Card while NOT writing, but mounted, then I can later umount OK. This is a problem because the user can eject the card at any time, even while the application is writing to it. It's OK to lose data, but the situation needs to be recoverable, and apparently it is not. I noticed a post on FreeBSD.org here: http://freebsdfoundation.blogspot.com/2009/08/safe-removal-of-active-disk-devices.html They talk about fixing the kernel so that SD-Cards may be ejected while mounted without causing a kernel panic. However they don't say anything about what happens if you interrupt a write operation. Does anybody know if there is anything I can do to make it so that umount doesn't hang in this situation? Thanks.