Changeset 33680 in project for wiki/eggref/4/fuse


Ignore:
Timestamp:
09/26/16 11:48:40 (3 years ago)
Author:
evhan
Message:

wiki/fuse: Update documentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/fuse

    r33385 r33680  
    55[[toc:]]
    66
    7 === Description
     7== Description
    88
    99A [[http://fuse.sourceforge.net/|FUSE]] interface.
     
    1515[[http://git.foldling.org/chicken-fuse.git|here]].
    1616
    17 ==== Warning
    18 
    19 '''This extension is not yet stable.''' It may be broken in ways both
    20 subtle and not so subtle, and its interface is subject to change without
    21 warning.
    22 
    23 ==== Requirements
     17'''This extension's interface is subject to change without notice or
     18deprecation period.'''
     19
     20=== Requirements
    2421
    2522* [[/egg/concurrent-native-callbacks|concurrent-native-callbacks]]
     
    2724* [[/egg/matchable|matchable]]
    2825
    29 ==== Platform Notes
     26=== Platform Notes
    3027
    3128'''This extension is only officially supported on Linux and OpenBSD.'''
     
    3330tested far less thoroughly on those platforms.
    3431
    35 On OpenBSD, each filesystem's main loop is single-threaded, the
    36 '''{{ioctl:}}''' callback is not available, and stopping a filesystem
    37 via {{filesystem-stop!}} is significantly slower than stopping it via
    38 {{umount(2)}}.
    39 
    40 ==== Runtime Structure
     32On OpenBSD, each filesystem's main loop is single-threaded and the
     33'''{{{ioctl:}}}''' callback is not available.
     34
     35=== Runtime Structure
    4136
    4237Each filesystem is executed in a separate native thread that
    4338communicates with the (single, shared) CHICKEN runtime via Unix pipe,
    4439per [[/egg/concurrent-native-callbacks|concurrent-native-callbacks]].
    45 More than one filesystem can be run at once, but FUSE operations are
    46 synchronous across all filesystems so long-running callbacks should be
    47 avoided.
     40Multiple filesystems can be run at once from within a single process,
     41but FUSE operations are synchronous across all filesystems so
     42long-running callbacks should be avoided.
    4843
    4944More importantly, care must be taken not to deadlock the Scheme runtime
     
    5449whose sole responsibility is to service FUSE requests.
    5550
    56 === API
     51== API
    5752
    5853<record>filesystem</record>
     
    7368; {{chmod:}}:    {{(procedure path mode) -> value}}
    7469; {{chown:}}:    {{(procedure uid gid) -> value}}
    75 ; {{create:}}:   {{(procedure path mode) -> (or handle #f)}}
     70; {{create:}}:   {{(procedure path mode) -> (or handle false)}}
    7671; {{destroy:}}:  {{(procedure) -> void}}
    7772; {{flush:}}:    {{(procedure path) -> value}}
    7873; {{fsync:}}:    {{(procedure path) -> value}}
    79 ; {{getattr:}}:  {{(procedure path) -> (or (vector mode nlink uid gid size atime ctime mtime) #f)}}
     74; {{getattr:}}:  {{(procedure path) -> (or (vector mode nlink uid gid size atime ctime mtime) false)}}
    8075; {{init:}}:     {{(procedure) -> void}}
    8176; {{ioctl:}}:    {{(procedure path int pointer) -> value}}
     
    8378; {{mkdir:}}:    {{(procedure path mode) -> value}}
    8479; {{mknod:}}:    {{(procedure path mode) -> value}}
    85 ; {{open:}}:     {{(procedure path mode) -> (or handle #f)}}
     80; {{open:}}:     {{(procedure path mode) -> (or handle false)}}
    8681; {{readdir:}}:  {{(procedure path) -> (or (list path ...) value)}}
    87 ; {{readlink:}}: {{(procedure path) -> (or path #f)}}
     82; {{readlink:}}: {{(procedure path) -> (or path false)}}
    8883; {{read:}}:     {{(procedure handle size offset) -> (or size string value)}}
    8984; {{release:}}:  {{(procedure handle) -> value}}
    9085; {{rename:}}:   {{(procedure path path) -> value}}
    9186; {{rmdir:}}:    {{(procedure path) -> value}}
    92 ; {{statfs:}}:   {{(procedure path) -> (or (vector bsize blocks bfree bavail files ffree namemax) #f)}}
     87; {{statfs:}}:   {{(procedure path) -> (or (vector bsize blocks bfree bavail files ffree namemax) false)}}
    9388; {{symlink:}}:  {{(procedure path path) -> value}}
    9489; {{truncate:}}: {{(procedure path) -> value}}
     
    105100
    106101A {{value}} may be any Scheme object and indicates whether the
    107 filesystem operation was successful. When {{#f}}, the filesystem will
     102filesystem operation was successful. When false, the filesystem will
    108103indicate a nonexistent file ({{ENOENT}}); any other value indicates
    109104success. Callbacks should signal other types of failures by raising an
     
    116111'''{{create:}}'''callback, this value is provided to that file's
    117112subsequent '''{{read:}}''', '''{{write:}}''' and '''{{release:}}'''
    118 operations. Note that this object is evicted into static memory (via
    119 {{object-evict}}) until just before '''{{release:}}''', so it is more
    120 efficient (as well as memory-safe) to use simple values as file handles;
    121 the same caveats that apply to {{object-evict}} apply here.
    122 '''{{release:}}''' is guaranteed to be called once for every successful
    123 '''{{open:}}''', while '''{{read:}}''' and '''{{write:}}''' should be
    124 prepared to be called multiple times with diverse {{offset}} values.
    125 
    126 <procedure>(filesystem-start! path filesystem) -> (or #f undefined)</procedure>
     113operations. '''{{release:}}''' is guaranteed to be called once for every
     114successful '''{{open:}}''' or '''{{create:}}''', while '''{{read:}}'''
     115and '''{{write:}}''' should be prepared to be called multiple times with
     116diverse {{offset}} values.
     117
     118<procedure>(filesystem-start! path filesystem) -> (or false undefined)</procedure>
    127119
    128120Start {{filesystem}} at the given {{path}}.
     
    132124On successful startup, the filesystem is mounted, its '''{{init:}}'''
    133125callback is executed, any threads waiting for the filesystem to start
    134 are unblocked, and a non-{{#f}} value is returned. On failure, {{#f}} is
     126are unblocked, and a non-false value is returned. On failure, {{#f}} is
    135127returned immediately.
    136128
    137129{{filesystem-start!}} does not wait for filesystem initialization before
    138 returning. To block until the filesystem is becomes available, use
     130returning. To block until the filesystem becomes available, use
    139131{{filesystem-wait!}}.
    140132
     
    172164The optional {{status}} argument should be a symbol indicating the
    173165filesystem state for which to wait, either {{started}} or {{stopped}}.
    174 By default, {{(eq? status stopped)}}.
     166If not specified, {{stopped}} is used.
    175167
    176168<procedure>(filesystem-running? path filesystem) -> boolean</procedure>
     
    194186'''{{getattr:}}''' callbacks.
    195187
    196 === Examples
     188== Examples
    197189
    198190Usage examples can be found in the project's
     
    200192directory.
    201193
    202 === Author
     194== Author
    203195
    204196[[/users/evan-hanson|Evan Hanson]]
     
    210202helpful bug hunting.
    211203
    212 === License
    213 
    214 Copyright (c) 2013-2014, 3-Clause BSD.
     204== License
     205
     206Copyright (c) 2013-2016, 3-Clause BSD.
Note: See TracChangeset for help on using the changeset viewer.