From owner-freebsd-hackers Wed Dec 11 19:26:50 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7161637B401 for ; Wed, 11 Dec 2002 19:26:48 -0800 (PST) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id D9C6643E4A for ; Wed, 11 Dec 2002 19:26:47 -0800 (PST) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.12.6/8.12.5) with SMTP id gBC3QeBF017864; Wed, 11 Dec 2002 22:26:41 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Wed, 11 Dec 2002 22:26:40 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: Marco Molteni Cc: hackers@freebsd.org Subject: Re: kernel/userland ssh filesystem for FreeBSD? In-Reply-To: <20021211090406.13023.qmail@cobweb.example.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 11 Dec 2002, Marco Molteni wrote: > as you might know, both kde (via kio-fish) and gnome (via gnome virtual > file system) provide a userland filesystem-like API that allows to > "mount" a remote filesystem using ssh. What I don't like about those > solutions is that they require the application to use a particular API > (kio slave or gnome vfs). > > Another approach, that provides a real filesystem interface, is the > Linux Userspace File System. > > Quoting from http://lufs.sourceforge.net/lufs/intro.html: > > LUFS is a hybrid userspace filesystem framework supporting an > indefinite > number of filesystems transparently for any application. It consists > of > a kernel module and an userspace daemon. Basically it delegates most > of > the VFS calls to a specialized daemon which handles them. > > Now the question: if I wanted to do something similar for FreeBSD, how > would I do it? Any high-level hints? FreeBSD actually includes a module for this very purpose to support the Coda file system, which uses a userspace cache manager to interact with directory services, manage the on-disk local cache, etc. I actually slightly prefer the Arla XFS kernel module, which behaves in an almost identical manner. Both create /dev nodes and communicate their needs via what are effectively RPC upcalls. They both follow the model that a daemon exists in userspace to support a file system mount, and will update the kernel with namespace information, as well as providing referenced to cache files locally. Usually the userland daemon is threaded, and matches worker threads with kernel threads/processes currently blocked in file system activity. I know there was discussion of getting the XFS module to support more than one mountpoint at a time, but I'm not sure if that happened or not. The Arla code is separately distributed from FreeBSD, but there's a port I believe. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Network Associates Laboratories To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message