Skip to content

2.7.0

Choose a tag to compare

@james-pre james-pre released this 01 Sep 22:42
· 69 commits to main since this release
v2.7.0
e6b5f7e

This release introduces a couple of exciting features.

ioctl

In the 2.0.0 release notes, I hinted at the possibility of "custom" ioctl commands:

As of this release, there is not mechanism for file systems to register ioctl command handlers. This is planned for a future minor release.

This release overhauls ioctl, finally making that possible:

  • Added the ioctl and ioctlSync methods to FileSystem
    • These can be overriden to add new commands
    • You should fall back to super to not lose the built-in commands
  • Added the Ioctl, IoctlOps, and IoctlContext types
  • Added the following internals: ioctl_default_ops, ioctl_default_ops_async, ioctl_default_ops_sync, IoctlDefaultAsyncOps, IoctlDefaultSyncOps
  • Fixed ioctl not respecting vfs caching (vcache/vnode)

Per-context mount tables (#218)

  • Added FSContext.mounts
  • Added ContextInit.mounts
  • mount, umount, and resolveMount now use the context mount table
  • The "global" mounts map has been deprecated. It's functionality has been moved to defaultContext.mounts
  • Slightly unrelated, the default context id is now 1

Other changes

  • Added rdev to InodeLike, Inode, and _inode_fields
  • Fixed some mode checks not using isDirectory
    • Comparing directly with S_IFMT was problematic
  • Fixed toFD not incrementing fd
  • Fixed InMemoryStore.name being a string literal type
  • Fixed vfs.sync.open taking the context as this when it should be a regular parameter