From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S267452AbUIVAih (ORCPT ); Tue, 21 Sep 2004 20:38:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S267429AbUIVAih (ORCPT ); Tue, 21 Sep 2004 20:38:37 -0400 Received: from open.hands.com ([195.224.53.39]:59021 "EHLO open.hands.com") by vger.kernel.org with ESMTP id S267452AbUIVAif (ORCPT ); Tue, 21 Sep 2004 20:38:35 -0400 Date: Wed, 22 Sep 2004 01:49:42 +0100 From: Luke Kenneth Casson Leighton To: linux-kernel@vger.kernel.org Subject: FUSE fusexmp proxy example solves umount problem! Message-ID: <20040922004941.GC14303@lkcl.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.5.1+cvs20040105i X-hands-com-MailScanner: Found to be clean X-hands-com-MailScanner-SpamScore: s X-MailScanner-From: lkcl@lkcl.net Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org what do people think about a filesystem proxy kernel module? has anyone heard of such a beast already? (which can also do xattrs) fusexmp.c (in file system in userspace package) does stateless filesystem proxy redirection. this is a PERFECT solution to the problem of users removing media from drives without warning. when i say perfect i mean it doesn't cause kernel hang-ups, it doesn't involve modifications to userspace programs such as KDE or Gnome, it doesn't involve any extra work to HAL, nor UDEV. it just... _works_. but, doing file system proxying in userspace introduces an additional and unnecessary level of inefficiency. i was wondering therefore if anyone had attempted to do filesystem proxying before. ta, l. -- -- Truth, honesty and respect are rare commodities that all spring from the same well: Love. If you love yourself and everyone and everything around you, funnily and coincidentally enough, life gets a lot better. -- lkcl.net
lkcl@lkcl.net
From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262605AbUIVJdh (ORCPT ); Wed, 22 Sep 2004 05:33:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S263100AbUIVJdh (ORCPT ); Wed, 22 Sep 2004 05:33:37 -0400 Received: from mx1.redhat.com ([66.187.233.31]:23722 "EHLO mx1.redhat.com") by vger.kernel.org with ESMTP id S262605AbUIVJdf (ORCPT ); Wed, 22 Sep 2004 05:33:35 -0400 Subject: Re: FUSE fusexmp proxy example solves umount problem! From: Arjan van de Ven Reply-To: arjanv@redhat.com To: Luke Kenneth Casson Leighton Cc: linux-kernel@vger.kernel.org In-Reply-To: <20040922004941.GC14303@lkcl.net> References: <20040922004941.GC14303@lkcl.net> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-5izmu5A37EXwJTTcRzf/" Organization: Red Hat UK Message-Id: <1095845610.2613.4.camel@laptop.fenrus.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Wed, 22 Sep 2004 11:33:30 +0200 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org --=-5izmu5A37EXwJTTcRzf/ Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Wed, 2004-09-22 at 02:49, Luke Kenneth Casson Leighton wrote: > what do people think about a filesystem proxy kernel module? > has anyone heard of such a beast already? > (which can also do xattrs) >=20 > fusexmp.c (in file system in userspace package) does stateless > filesystem proxy redirection. >=20 > this is a PERFECT solution to the problem of users removing media > from drives without warning.=20 eh and the 2.6 kernel doesn't deal with it? It really is supposed to deal with it nicely already... --=-5izmu5A37EXwJTTcRzf/ Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQBBUUbqxULwo51rQBIRApOuAJ9ofF+DpIH0c61g3GQtcblaXjCURwCgoDED L08ZpZEGxvMP0+YWSUW9peY= =n0rR -----END PGP SIGNATURE----- --=-5izmu5A37EXwJTTcRzf/-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S263795AbUIVKSQ (ORCPT ); Wed, 22 Sep 2004 06:18:16 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S263818AbUIVKSQ (ORCPT ); Wed, 22 Sep 2004 06:18:16 -0400 Received: from open.hands.com ([195.224.53.39]:28056 "EHLO open.hands.com") by vger.kernel.org with ESMTP id S263795AbUIVKSN (ORCPT ); Wed, 22 Sep 2004 06:18:13 -0400 Date: Wed, 22 Sep 2004 11:29:17 +0100 From: Luke Kenneth Casson Leighton To: Arjan van de Ven Cc: linux-kernel@vger.kernel.org Subject: Re: FUSE fusexmp proxy example solves umount problem! Message-ID: <20040922102917.GA20688@lkcl.net> References: <20040922004941.GC14303@lkcl.net> <1095845610.2613.4.camel@laptop.fenrus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1095845610.2613.4.camel@laptop.fenrus.com> User-Agent: Mutt/1.5.5.1+cvs20040105i X-hands-com-MailScanner: Found to be clean X-hands-com-MailScanner-SpamScore: s X-MailScanner-From: lkcl@lkcl.net Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 22, 2004 at 11:33:30AM +0200, Arjan van de Ven wrote: > On Wed, 2004-09-22 at 02:49, Luke Kenneth Casson Leighton wrote: > > what do people think about a filesystem proxy kernel module? > > has anyone heard of such a beast already? > > (which can also do xattrs) > > > > fusexmp.c (in file system in userspace package) does stateless > > filesystem proxy redirection. > > > > this is a PERFECT solution to the problem of users removing media > > from drives without warning. > > eh and the 2.6 kernel doesn't deal with it? nope. not in the slightest bit: i wish it did!!! i'm using 2.6.8 [.1-selinux1 from http://sf.net/projects/selinux] > It really is supposed to > deal with it nicely already... please tell me how i enable such functionality! i remove a usb media, HAL does a umount -lf, konqueror still has directory handles open (see report i sent earlier with the little program opendir.c which duplicates what konqueror does), then HAL does an ioctl("/dev/sdc1", Block_Re_Read_PARTition) which returns an error message "Device or Resource Busy". david (hal developer) considers this to be a serious bug in the linux kernel because a user action can cause hotplug events to not be generated. the above ioctl is supposed to cause a hotplug event that will allow HAL to remove the volume from its records. and it can't. l. -- -- Truth, honesty and respect are rare commodities that all spring from the same well: Love. If you love yourself and everyone and everything around you, funnily and coincidentally enough, life gets a lot better. -- lkcl.net
lkcl@lkcl.net
From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S264500AbUIVLLR (ORCPT ); Wed, 22 Sep 2004 07:11:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S264571AbUIVLLQ (ORCPT ); Wed, 22 Sep 2004 07:11:16 -0400 Received: from open.hands.com ([195.224.53.39]:38810 "EHLO open.hands.com") by vger.kernel.org with ESMTP id S264500AbUIVLK4 (ORCPT ); Wed, 22 Sep 2004 07:10:56 -0400 Date: Wed, 22 Sep 2004 12:21:59 +0100 From: Luke Kenneth Casson Leighton To: Arjan van de Ven Cc: linux-kernel@vger.kernel.org Subject: Re: FUSE fusexmp proxy example solves umount problem! Message-ID: <20040922112159.GD20688@lkcl.net> References: <20040922004941.GC14303@lkcl.net> <1095845610.2613.4.camel@laptop.fenrus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1095845610.2613.4.camel@laptop.fenrus.com> User-Agent: Mutt/1.5.5.1+cvs20040105i X-hands-com-MailScanner: Found to be clean X-hands-com-MailScanner-SpamScore: s X-MailScanner-From: lkcl@lkcl.net Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 22, 2004 at 11:33:30AM +0200, Arjan van de Ven wrote: > On Wed, 2004-09-22 at 02:49, Luke Kenneth Casson Leighton wrote: > > what do people think about a filesystem proxy kernel module? > > has anyone heard of such a beast already? > > (which can also do xattrs) > > > > fusexmp.c (in file system in userspace package) does stateless > > filesystem proxy redirection. > > > > this is a PERFECT solution to the problem of users removing media > > from drives without warning. > > eh and the 2.6 kernel doesn't deal with it? It really is supposed to > deal with it nicely already... okay. the reason that fusexmp works is because it doesn't actually touch the filesystem except on an operation: there's no state information stored, no file handles kept open, no directory handles kept open. an implementation of this same functionality (a filesystem proxy) in the linux kernel would involve: - creating proxy inodes - reconstructing the full path name d_path(dentry, mnt, full_path, sizeof(full_path)); then prefixing that with the mount point and then issuing a proxy command. now, if the solution to this problem in the linux kernel is broken because someone forgot to deal with opendir() then _great_. in the meantime... l. -- -- Truth, honesty and respect are rare commodities that all spring from the same well: Love. If you love yourself and everyone and everything around you, funnily and coincidentally enough, life gets a lot better. -- lkcl.net
lkcl@lkcl.net
From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S264984AbUIVNPa (ORCPT ); Wed, 22 Sep 2004 09:15:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S265106AbUIVNPa (ORCPT ); Wed, 22 Sep 2004 09:15:30 -0400 Received: from main.gmane.org ([80.91.229.2]:2198 "EHLO main.gmane.org") by vger.kernel.org with ESMTP id S264984AbUIVNPN (ORCPT ); Wed, 22 Sep 2004 09:15:13 -0400 X-Injected-Via-Gmane: http://gmane.org/ To: linux-kernel@vger.kernel.org From: "Mario R. Carro" Subject: Re: FUSE fusexmp proxy example solves umount problem! Date: Wed, 22 Sep 2004 10:15:05 -0300 Message-ID: References: <20040922004941.GC14303@lkcl.net> X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 200.80.238.173 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org I had exactly the same idea. I've setup an little project on SourceForge (http://sf.net/projects/rmvfs). It's just a crude proof of concept by now. I was thinking in cdroms and diskettes, but I suppose that it applies also to usb sticks. My original motivation was the cdroms and zip disks being kept locked in the drives. I wanted to be able to: - use the media without needing an explicit mount op (as autofs does). - be able to extract the media at any time, without an explicit umount and without being blokced by any lagging process. - Avoid the risk of corruption. So: - the rmvfs mountpoint is always mounted, no explicit mount required. - rmvfs maintains the target drive always unmounted (unless there's an operation in progress) so it is safe to extract the media at any time. - And finally, as you say, by virtue of the proxing, you are always free to extract the media without problems. It's performance is very bad but for accessing already slow media (diskettes and zips) it's fine. The added confort of use it's what it counts, I think, anyway. Regards, MRC -- "Luke Kenneth Casson Leighton" escribió en el mensaje news:20040922004941.GC14303@lkcl.net... > what do people think about a filesystem proxy kernel module? > has anyone heard of such a beast already? > (which can also do xattrs) > > fusexmp.c (in file system in userspace package) does stateless > filesystem proxy redirection. > > this is a PERFECT solution to the problem of users removing media > from drives without warning. when i say perfect i mean it doesn't > cause kernel hang-ups, it doesn't involve modifications to userspace > programs such as KDE or Gnome, it doesn't involve any extra work > to HAL, nor UDEV. > > it just... _works_. > > but, doing file system proxying in userspace introduces an additional > and unnecessary level of inefficiency. > > i was wondering therefore if anyone had attempted to do filesystem > proxying before. > > ta, > > l. > > -- > -- > Truth, honesty and respect are rare commodities that all spring from > the same well: Love. If you love yourself and everyone and everything > around you, funnily and coincidentally enough, life gets a lot better. > -- > lkcl.net
> lkcl@lkcl.net
>