• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
guadec_rlove_fuse_2006
 

guadec_rlove_fuse_2006

on

  • 514 views

 

Statistics

Views

Total Views
514
Views on SlideShare
512
Embed Views
2

Actions

Likes
2
Downloads
7
Comments
0

2 Embeds 2

http://www.techgig.com 1
http://www.techgig.com 1

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    guadec_rlove_fuse_2006 guadec_rlove_fuse_2006 Presentation Transcript

    • FUSE perhaps the Future of Us and Everyone else Robert Love Claude Elwood Shannon Senior Engineer Linux Desktop Group rml at novell dot com
    • FUSE
      • User-space filesystems
      • Accessible as real kernel mounts
      • Access via POSIX I/O
      • A regular kernel filesystem module that runs in user-space
        • Very microkernel-esque!
    • Why FUSE over the Kernel?
      • Easier to develop, debug, and deploy
      • FUSE modules can run as a non-privileged user
      • FUSE modules can do anything a normal process can
        • Communicate with other processes
        • Spawn threads
        • Utilize libraries
      • Many filesystems make more sense in user-space
        • Network, for example
        • The Gmail filesystem, a real FUSE module, as another
    • State of the FUSE
      • Linux
        • Merged into 2.6 kernel
        • Patch available for 2.4 kernel
      • FreeBSD
        • Patch available
      • OpenSolaris
        • Discussions on porting
      • FUSE modules work on all platforms
      • FUSE is stable, feature-complete, maintained
    • Why FUSE over GNOME-VFS?
      • Real kernel mounts
      • POSIX I/O
      • ISVs like it better
        • No high-level requirement
        • Works with CLI
      • Better performance
      • Memory Mappings
      • Leverage new kernel features
    • Kernel Mounts and POSIX I/O
      • With Unix:
        • Unix files are accessible via file paths
        • The first-class object in Unix is the file descriptor
      • GNOME-VFS replaces these concepts:
        • Files are referenced via URI
        • The first-class object is a GNOMEVFSHandle
      • Applications must speak GNOME-VFS
      • Impossible to use an fd-based interface
      • Even within GNOME, results are uneven
      • ISV story: What about CLI? KDE? Gtk-only apps?
    • Mmmm, maps
      • Can mmap() files on a FUSE filesystem
      • Can never do memory mappings without the kernel
      • Just Works
        • (Except shared-writable mappings, which can introduce a deadlock, but a solution is possible)
    • Goldy Flocks
      • Can do kernel-assisted file locking via flock()
        • Advisory and Mandatory
      • Faster than any user-space solution
      • Not merged as of 2.6.17 but can easily add
    • Leverage New Kernel Features
      • As kernel features and new system calls are added, they will just work with a FUSE-based filesystem
      • No need to wrap or abstract
      • Example: inotify, xattrs, & ACLs automatically work
    • API
      • API is very simple
      • Fill out a v-table and call fuse_main()
      • Simple: open, read, write, getattr, readdir, unlink
      • Advanced: getxattr, setxattr, chown, chmod, truncate
      • The “rules” and “behavior” for implementing each interface is essentially “follow POSIX”
      • All are optional
        • Although you really want getattr()
    • Hello World! static const char *hello_str = “Hello GUADEC!”; static const char *hello_path = “/hello”; static int hello_open(const char *path, struct fuse_file_info *fi) { if (strcmp (path, hello_path) != 0) return -ENOENT; if ((fi->flags & 3) != O_RDONLY) return -EACCES; return 0; } static int hello_read (const char *path, char *buf, size_t size, off_t offset, struct fuse_file_info *fi) { size_t len; if (strcmp (path, hello_path) != 0) return -ENOENT; len = strlen (hello_str); if (offset < len) { if (offset + size > len) size = len - offset; memcpy (buf, hello_str + offset, size); } else size = 0; return size; }
    • beaglefs
      • Exports a Beagle Query as a filesystem
      • Filesystem is composed of symlinks to query hits
      • Extended Attributes contain hit metadata
      • Wrote it in a few hours to learn FUSE
        • Simple, easy, powerful
          • also, I am damn good
            • and libbeagle is really nice
              • not to mention FUSE, which is great
      • See Joey's (see photo, right) talk for more on Beagle and beaglefs
    • FUSE and GNOME
      • GNOME can benefit immensely from FUSE
      • Use FUSE as GNOME's filesystem abstraction
      • Replace GNOME-VFS fs modules with FUSE?
        • Unofficially? We can encourage new modules to use FUSE
        • Officially? We can adopt FUSE and leverage its greatness
      • GNOME-VFS, of course, is not going anywhere
        • Much larger, broader API (which also needs work!)
        • There already exists a gnome-vfs-to-fuse wrapper
    • Potent Portable Potables
      • “But FUSE is Linux-specific and GNOME is not”
      • Really two levels of portability
        • Can we require FUSE if $OS does not provide FUSE?
          • FreeBSD and Linux both supported. OpenSolaris someday?
        • What does “require FUSE” even mean?
          • We don't need a special API to access FUSE
          • We can wrap the few calls for manipulating FUSE (mount, unmount)
            • Leave the implementation of the abstraction to the OS
            • Never actually depend on “FUSE” proper
    • The Itty Gritty on Contributing
      • Homepage: http://fuse.sf.net/
      • I am not the maintainer
      • Maintainer: Miklos Szeredi
      • Mailing list: [email_address]
      • Kernel list: [email_address]
      • TODO FUSE module: File locks (I have start of patch) and shared writable mappings
      • TODO filesystem modules: NetworkManagerFS?
      • TODO GNOME: The discussion starts here. FUSE as our future?
    • FUSE perhaps the Future of Us and Everyone else Robert Love Claude Elwood Shannon Senior Engineer Linux Desktop Group rml at novell dot com
      • Unpublished Work of Novell, Inc. All Rights Reserved.
      • This work is an unpublished work and contains confidential, proprietary, and trade secret information of Novell, Inc. Access to this work is restricted to Novell employees who have a need to know to perform tasks within the scope of their assignments. No part of this work may be practiced, performed, copied, distributed, revised, modified, translated, abridged, condensed, expanded, collected, or adapted without the prior written consent of Novell, Inc. Any use or exploitation of this work without authorization could subject the perpetrator to criminal and civil liability.
      • General Disclaimer
      • This document is not to be construed as a promise by any participating company to develop, deliver, or market a product. Novell, Inc., makes no representations or warranties with respect to the contents of this document, and specifically disclaims any express or implied warranties of merchantability or fitness for any particular purpose. Further, Novell, Inc., reserves the right to revise this document and to make changes to its content, at any time, without obligation to notify any person or entity of such revisions or changes. All Novell marks referenced in this presentation are trademarks or registered trademarks of Novell, Inc. in the United States and other countries. All third-party trademarks are the property of their respective owners.