fs-qnx6.so

QNX SDP8.0Utilities ReferenceUtilities

Shared object that supports the Power-Safe filesystem (QNX OS)

Syntax:

driver … qnx6 qnx6_options… &

Runs on:

QNX OS

Options:

The driver is any of the devb-* drivers, and qnx6_options is one or more of the following, separated by commas:

acl=enable|disable
This option is deprecated; ACLs always persist.
alignio
Attempt to align all reads and writes in sizes and offsets of the filesystem block size.
alimit=amount[b|K|M|G]
Set the low free space threshold. If you include a case-insensitive suffix of b, K, M, or G, the number is interpreted as the number of bytes, KB, MB, or GB, respectively; if there's no suffix, amount is interpreted as the number of blocks. When specifying amount, always use a decimal value. (For more information on how alimit can be used, see chemod).

This limit is useful for preventing unprivileged files from consuming all the available space on a volume. For example, when the allocation limit extended mode bit (QNX6FS_EMODE_ALIMIT) is set for a file, operations fail with ENOSPC if they attempt to grow a file to a size that would cause the mounted volume's free space to drop below its allocation limit value. (For information on setting this bit, see the description of the mkqnx6fsimg alimit attribute.)

crypto=enable|disable|qcrypto_tag
Enable or disable encryption support (disabled by default).
The qcrypto_tag variable is a tag defined in the QNX Cryptography Library (qcrypto) configuration file. This file maps the tag to one of the third-party libraries that the system supports. For more information, see QNX Cryptography Library in the System Security guide.

Use fsencrypt to manage the encryption.

Note:
To use filesystem encryption, download the Encrypted Filesystem package from the QNX Software Center.
dirgest=min_entries[:max_entries]
(Directory digest) Create digests for directories whose number of entries falls in the specified range. Directory digests are in-memory representations of the contents of the eligible directories. They improve the performance of directory operations for medium-sized (a few hundred files) and large (thousands or tens of thousands of files) directories. If you don't specify this option, directory digests are disabled.
fs-alloc-strategy=0|1
Specify the filesystem's allocation strategy:
  • 0 — the default strategy
  • 1 — forward allocation
hold=allow|root|deny
Control which users (if any) can suspend the taking of snapshots (via a flag in the DCMD_FSYS_FILE_FLAGS devctl() command). The default is root.
hold-eagain=0|1
If you specify 0 (the default), sync operations that happen when snapshots are disabled or there's a hold count return EAGAIN. If you specify 1, such sync operations return EOK.
icheck=enable|disable
Perform integrity checks on the inodes.

By default, the fs-qnx6.so module checks to see if integrity checks were enabled at format time.

This option specifically enables or disables integrity checks at runtime by overriding the flag saved on disk in the superblock that determines whether inodes are verified. Enabling the feature permanently enables inode checksums on the volume.

If no value is specified, the verification of inodes is determined by the flag saved on disk in the superblock.

If there is a mix of files written with the icheck enabled and ones with it disabled, the filesystem determines which inodes have valid checksums and skips the verification if a checksum was not stored.

lnk=lnk_mode
Set the handling of symbolic links. The options are:
  • ignore — treat a symlink as a regular file, but remove any execute permissions.
  • all — if a segment of a path is a symlink, replace the segment with the symlink's content (the default).
nosparse
Don't create sparse files.
As of QNX OS 7.1, fs-qnx6.so creates sparse files by default. The nosparse option prevents sparse files from being created, but allows any existing ones to remain accessible.
A filesystem that contains sparse files won't work with previous versions of fs-qnx6.so, but a filesystem without sparse files remains compatible with previous versions.
overalloc
Enable a block overallocation heuristic for small file writes.
sbcopy==enable|disable
Allows users to enable/disable superblock copies. Users can enable or disable sbcopy as follows:
mount -t qnx6 -o sbcopy=enable /dev/hd0t177 /mnt
mount -t qnx6 -o sbcopy=disable /dev/hd0t177 /mnt
If the sbcopy option is not specified, the default option depends on the type of disk the file system resides on. If the file system resides on a hard disk drive (HDD), sbcopy will be disabled by default. If the file system resides on another type of disk, sbcopy will be enabled by default.
snapshot=freq
Set the frequency of automatic snapshots; the default is 10 seconds. A filesystem snapshot is explicitly made when you call sync() or fsync(), or from this periodic timer.
sync=mode
Specify the required disk synchronization capability. The mode mode must be one of the following:
  • mandatory (the default) — the drive must support synchronization to allow a filesystem to be mounted read/write. If it doesn't, the mount fails and returns EROFS. You might see an error like this:
    Mount: Can’t mount mountpoint (type qnx6)
    Mount: Possible reason: Read-only file system
    

    A read-only mount (mount -r) can always be performed on any device.

  • optional — attempt synchronization, but ignore any error if the drive doesn't support such an operation. The driver might be incorrectly advertising the capabilities, or the physical media might not require explicit synchronization (write-through).
  • none — never issue a synchronization command to the disk, and don't drain dirty blocks from the filesystem cache (until an explicit umount). This mode is suitable only for use with a UPS.
CAUTION:
If the drive doesn't support synchronizing, fs-qnx6.so can't guarantee that the filesystem is power-safe. You can use the sync option to override this requirement at your own risk. Before using this filesystem, check to make sure that your device meets the filesystem's requirements. For more information, see Required properties of the device, below.
trim=disable|enable|discard
Disable or enable support for TRIM, or use discard instead.

A managed NAND block device can't overwrite in-place and has no idea of whether content in a block is even valid or meaningful to a mounted filesystem. So the management layers have no choice but to preserve all written content, which can be a lot of wear-leveling overhead if in fact those blocks belonged to say a deleted file, or if the partition was freshly formatted.

The TRIM command is thus a hint to the managed NAND device from the filesystem that certain sectors are no longer live and can be discarded (i.e., the content doesn't have to be preserved or copied by wear-leveling, and/or logical blocks can be erased rather than be reclaimed from elsewhere).

Using the discard option gives better performance than enabling trim. When the filesystem tells the driver to discard a set of blocks, the driver simply marks them as discarded and returns, queuing them up for garbage collection later. If the filesystem requests the driver to trim a set of blocks, they're cleaned immediately, which may result in heavy disk I/O, depending on the current state of the system. In the end they do the same thing, just with different timing.

Note:
SSDs don't support the discard option.
trim-limit=X:Y:Z
Set trim/discard constraints:
  • X is the minimum number of total bytes to trim/discard.
  • Y is the maximum number of total bytes to trim/discard.
  • Z is the minimum number of contiguous bytes to trim/discard.

You can append a case-insensitive suffix of K, M, or G to these numbers, to make fs-qnx6.so interpret them as KB, MB, or GB, respectively. Any nonzero value is rounded up to the nearest multiple of the filesystem's block size.

Description:

The fs-qnx6.so shared object provides support for Power-Safe (copy-on-write/snapshot) filesystems. It's automatically loaded by the devb-* drivers when mounting a Power-Safe filesystem.

Note:
This filesystem uses UTF-8 encoding for presentation of its filenames; attempts to specify a filename not using UTF-8 encoding will fail (with an error of EILSEQ).

Required properties of the device

The Power-Safe filesystem operates by moving the on-disk filesystem state from one stable view to another stable view using copy-on-write (COW) to relocate modified blocks. To finalize this transition, all dirty blocks involved in the new view must be committed to persistent storage, and then a new filesystem superblock/root referencing the relocated blocks is committed.

This provides power-safe robustness, because at any point in time either the old version is completely accessible or the new version is completely accessible (with no live data being overwritten in between). Thus to mount as read-write on a given device, that device must have the following properties:

  • one of the following:
    • The device may buffer write data for performance reasons, and the return from a WRITE may not necessarily indicate the data is committed to permanent storage. But such a device must implement a FLUSH/SYNC command that forces any cached or buffered write data to persistent storage, and doesn't return until it's guaranteed that all data is stable across a power-loss.

      or:

    • The device doesn't buffer write data, and operates in a strict write-through manner, where return from a WRITE is a guarantee that the data was immediately committed to persistent storage. Such a device doesn't require an additional FLUSH/SYNC command.
  • and both of the following:
    • The action of writing to one data region (an advertised device sector) can in no way damage the contents of any other region, even under conditions such as power-loss, vibration, temperature, etc.

      and:

    • Data that has previously been reported as committed to persistent storage remains stable until explicitly overwritten. The device may implement facilities such as bad-block remapping or wear-leveling to support this requirement, provided that such activity never causes loss of persistent data, even under conditions such as power-loss, etc.

You can create Power-Safe images with the mkqnx6fsimg utility.

For details on filesystems that QNX OS supports, including their drivers and tool set, see the Filesystems chapter of the System Architecture guide.

Page updated: