Skip to content

sandboxfs-0.2.0

Latest
Compare
Choose a tag to compare
@jmmv jmmv released this 20 Apr 18:48
· 4 commits to master since this release

Released on 2020-04-20.

  • The reconfiguration protocol has completely changed in order to support
    more efficient reconfigurations. If you are using sandboxfs with Bazel,
    you will need to upgrade to Bazel 3.0.0 to use this version. See below for
    more details on how the protocol has changed.

  • Made sandboxfs process reconfiguration requests in parallel, which has a
    significant performance impact when those requests are large.

  • Fixed a bug where writes on a file descriptor that had been duplicated and
    closed did not update the file size, resulting in bad data being returned
    on future reads.

  • Fixed timestamp updates so that the birthtime rolls back to an older
    mtime to mimic BSD semantics.

  • Fixed hardlink counts so that they are zero for handles that point to
    deleted files or directories.

  • Added support for extended attributes. Must be explicitly enabled by
    passing the --xattrs option.

  • Added support to change the timestamps of a symlink on systems that have
    this feature.

  • Disabled the path-based node cache by default and added a --node_cache
    flag to reenable it. This fixes crashes when running Java within a
    sandboxfs instance where the Java toolchain is mapped under multiple
    locations and the first mapped location vanishes. See
    The OSXFUSE, hard links, and dladdr puzzle
    for details.

The following are the highlights of the changes to the reconfiguration protocol
in this release. You can read the full specification in the sandboxfs(1)
manual page:

  • Use JSON streams for both the requests and the responses, instead of
    the previous ad-hoc line-oriented protocol.

  • Each map and unmap request carries a list of mappings to map and
    unmap, respectively, along with the "root" path where all those mappings
    start. This is to allow sandboxfs to process the requests more
    efficiently.

  • Each request contains a tag, which is then propagated to the response
    for that request. This is to allow sandboxfs to process requests in
    parallel.

  • Work at the level of sandboxes, not paths, where a sandbox is defined
    as a top-level directory with a collection of mappings beneath it.

    This essentially makes reconfigurations less powerful than they were, but
    also makes them infinitely simpler to understand and manage. Furthermore,
    this lines up better with the needs of Bazel, our primary customer, and
    with sandboxfs' own name.

  • Take prefix-encoded paths to minimize the size of the reconfiguration
    requests. This has shown to significantly reduce the CPU consumption of
    both sandboxfs and Bazel during a build, as the size of the reconfiguration
    messages is drastically smaller.

  • Accept short aliases for all fields, thus further minimizing the size
    of reconfiguration requests, and also to accept omitting optional fields.