github zen-fs/core v2.1.0
2.1.0

latest releases: v2.4.4, v2.4.3, v2.4.2...
8 months ago

This release took much longer that planned due to #210— more details below.

Memory

How ZenFS handles linear memory has been significantly changed. First off, everything linear memory related was split off from Utilium into a new package called Memium. A number of changes were made, like structs becoming "live" views, rather than the buffers and values only changing at (de)serialization. The "live" structs change was made in order to fix #210, since prior to the change, SingleBuffer would not update when changes were made in another realm. Numerous parts of ZenFS have also been rewritten in order to work with the new behavior. This includes Inode being changed to a fixed size of 4096 bytes and changes to the Port backend's serialization and deserialization logic. The inode format is now version 5.

Errors and Logging

Since Memium has some error handling and logging, the error and logging code has been split off into the Kerium package, which allows for multiple packages to work with the log and share similar errors. Additionally, many ZenFS errors now have the same behavior and messages as libuv errors on Linux, better emulating native behavior. You can read more about changes to exceptions and logging in Kerium's release notes. Some other changes to errors include a fix for readlink not throwing EINVAL if the path was not a symlink (#215) and a fix for rename not throwing EISDIR/ENOTDIR correctly.

Flags and FS Attributes

This release changes InodeFlags to follow S_* instead of FS_*_FL, since this better follows on things are done on Linux. The FS_*_FL-style flags have been added to ioctl.ts as the FileFlag enum.

FileSystem attributes have also had some minor changes:

  • Removed no_buffer_resize (unused)
  • Renamed no_async to no_async_preload
  • Added no_atime
  • Added no_suid
  • Added sync (immediate changes)

Also, the no_id_tables attribute has been added to StoreFS. This forces all inode lookups to use the file system instead of the ID tables. This is much slower, but required for cross-realm file systems.

Tests

  • Tests have been cleaned up a lot.
  • A new SingleBuffer test has been added for use with SharedArrayBuffer (#211)
  • The short verbose flag for zenfs-test has been changed from -w to -v
    • Originally, -v wasn't used to allow for a potential short version option or to alleviate confusion. -v ended up being less ambiguous.
  • Slightly improved the read tests
  • Missing awaits have been added to assert.rejects calls
  • The default log level for tests has been changed to ERR

Misc

  • The sync and syncSync methods of FileSystem weren't actually changed in 2.0. This release fixes that.

  • Calls to touch in xattr functions used pick to only change attributes. This had a bad side effect and was removed.

  • IndexFS now checks if directories are empty before removing them. If not, ENOTEMPTY is thrown.

  • CopyOnWrite would change the mode of files stated or copied to the writable file system to be writable by everyone (i.e. |= 0o222). This behavior was removed.

  • The long argument to MetadataEntry's toString method has been removed, since it was only used by MetadataBlock and had special behavior.

  • The timeout created for Port RPC requests is now cleared when the request is settled.

  • A check for whether a directory is being renamed to a file inside itself has been added to the VFS.

  • CreationOptions now extends Partial<InodeLike>, which reflects the actual behavior of StoreFS.

  • A use-after-free style overwrite in SingleBuffer has been fixed.

  • The ordering of paths in mkdirSync has been fixed.

  • Incorrect path string slicing in mkdir and mkdirSync was fixed.

  • Incorrect usage of Atomics.wait was fixed.

Don't miss a new core release

NewReleases is sending notifications on new releases.