Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757158AbYKEAaK (ORCPT ); Tue, 4 Nov 2008 19:30:10 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754090AbYKEA36 (ORCPT ); Tue, 4 Nov 2008 19:29:58 -0500 Received: from nf-out-0910.google.com ([64.233.182.186]:50150 "EHLO nf-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751398AbYKEA35 (ORCPT ); Tue, 4 Nov 2008 19:29:57 -0500 Message-ID: Date: Wed, 5 Nov 2008 01:29:54 +0100 From: "Kay Sievers" To: "Michael Tokarev" Subject: Re: data corruption: revalidating a (removable) hdd/flash on re-insert Cc: "Pavel Machek" , "Kernel Mailing List" In-Reply-To: <4910BD2B.1020808@msgid.tls.msk.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <490B2659.9010304@msgid.tls.msk.ru> <20081104195728.GC5862@ucw.cz> <20081104202011.GA7135@ucw.cz> <4910BD2B.1020808@msgid.tls.msk.ru> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 736 Lines: 17 On Tue, Nov 4, 2008 at 22:22, Michael Tokarev wrote: > So for me, it's easy to deal with (not perfect but it works; it'd be > even better if i will be able to wait for umount using inotify, to > only wake when really needed), If I understand it right, what you are looking for, you could sleep in poll() of /proc/mounts, and will be woken up with POLLERR if anything in your mount tree changes. Then you check the state of your usb device and possibly invalidate it. Kay -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/