From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Mike Snitzer" Subject: Re: forced umount? Date: Sun, 18 Mar 2007 16:20:33 -0400 Message-ID: <170fa0d20703181320j59ee759dtbc0e3c7c916cd190@mail.gmail.com> References: <170fa0d20703162106v47dc13e1u1ae5381576f372ed@mail.gmail.com> <1174245379.3538.252.camel@laptopd505.fenrus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: "Arjan van de Ven" Return-path: Received: from ug-out-1314.google.com ([66.249.92.170]:12463 "EHLO ug-out-1314.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751010AbXCRUUg (ORCPT ); Sun, 18 Mar 2007 16:20:36 -0400 Received: by ug-out-1314.google.com with SMTP id 44so1140538uga for ; Sun, 18 Mar 2007 13:20:35 -0700 (PDT) In-Reply-To: <1174245379.3538.252.camel@laptopd505.fenrus.org> Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On 3/18/07, Arjan van de Ven wrote: > On Fri, 2007-03-16 at 23:06 -0500, Mike Snitzer wrote: > > I'm interested in understanding the state of Linux with regard to > > _really_ forcing a filesystem to unmount. > > > > There is a (stale) project at OSDL that has various implementations: > > http://developer.osdl.org/dev/fumount/ > > > the problem with the people who say they want forced umount is.. that > most of the time they either want > 1) get rid of the namespace entry > or > 2) want to stop any and all IO to a certain device/partition > > 1) is already supported with lazy umount (umount -l) > for 2), it's not forced umount that they want, it's really an IO > disconnect (which scsi supports btw in 2.6 kernels). > > So.. depending on which of the 2 you are, it's there. Just it's not > called "forced umount"..... I'd be interested to know more about the IO disconnect support. Do you have any pointers on what interfaces are exposed to trigger such an event? The problem I'd like to solve is this: A mounted blockdevice is considered "bad". Given the device is "bad" I don't care about flushing any outstanding IO. I'd like the ability to purge that blockdevice from the system; dropping all IOs on the floor. This would have to include invalidating inodes and more no? Ultimately the superblock would need to be released too right? Would this happen for free with IO disconnect? Does IO disconnect reliably and cleanly sever all associations a mounted blockdevice has with Linux?