Power-Safe filesystem

Updated: May 06, 2022

The Power-Safe filesystem is a reliable disk filesystem that can withstand power failures without losing or corrupting data.

This filesystem is supported by the fs-qnx6.so shared object.

Expandable filesystem

For the Power-safe filesystem type, you can create an expandable filesystem, which is a filesystem with a maximum storage capacity that can exceed its specified size. You can do so using the host-side mkqnx6fsimg tool or the target-side mkqnx6fs tool; these tools use different units to indicate the filesystem size.

For the mkqnx6fsimg tool that builds Power-Safe filesystem images, you must set the num_sectors attribute to indicate the number of sectors needed to store the image, and the max_sectors attribute to indicate the maximum number of sectors that the filesystem supports. For an explanation of how the maximum capacity is then determined, see the max_sectors attribute for the mkqnx6fsimg entry in the Utilities Reference.

For the mkqnx6fs tool that formats Power-Safe filesystems, you must set the -x option to request an expandable filesystem, and the -n option to indicate the maximum number of logical blocks (i.e., allocatable units) you want to be supported by the filesystem. For details on the required calculation, see the mkqnx6fs -n option.

Bitmap and inodes files

In a Power-Safe filesystem, space must be reserved for the bitmap and inodes files.

The bitmap file is a large bitfield that covers as many memory blocks as necessary to represent each block in the filesystem image as a single bit. This bit is 1 if the block is allocated and 0 if not. The bitmap file size is calculated from the maximum number of sectors (max_sectors).

The inodes file is a table containing information about particular files in the system. If provided to mkqnx6fsimg, the num_inodes attribute determines the information nodes (inodes) count. This count is the number of entries in the inodes table. If this attribute isn't provided, mkqnx6fsimg determines the inodes count based on other attributes, including num_sectors. For more information on this calculation, see the mkqnx6fsimg num_inodes attribute. For more details about inodes, see Links and inodes in the “Working with Filesystems” chapter of the QNX Neutrino User's Guide.

Because these two system files occupy some space in the image, the amount of user-accessible memory is slightly less than the filesystem's maximum capacity.