macOS#

System Configuration#

macOS is one of several supported platforms. xNVMe is likely to work on multiple versions of macOS, however to ensure compatibility we recommend using a version listed in the Toolchain section.

Device Identifiers#

macOS exposes NVMe devices as files using the following naming schemes:

/dev/disk{ctrlr_id}

NVMe Controller device node

/path/to/file

A regular file, opened by the emu_file and thrpool_file backend configs, and created when the open asks for it

Backend Configs#

The macOS platform provides the following backend configs. Some of these use cross-platform implementations, each in a directory of its own under lib/backend/. For these, links point to the cross-platform section. For the macOS-specific interfaces, descriptions are available in the corresponding subsections.

  • Memory Allocators

  • Asynchronous Interfaces

  • Synchronous Interfaces

    • macos, Use pread()/write() for synchronous I/O

    • psync, Use pread()/write() on a regular file, see Sync. I/O via psync

  • Admin Interfaces

    • macos, Use macOS NVMe SMART Interface admin commands

    • file_as_ns, Answer admin commands for a regular file as a namespace

  • Device Interfaces

    • macos, Use macOS file/dev handles and enumerate NVMe devices