The QNX4 file system is the default operating system for QNX Neutrion, which uses the same disk structure as the QNX4 file system, provided by fs-qnx4.so, and is automatically loaded when using the devc- * load QNX4 file system. It uses extent-based, with fingerprint bitmap allocation, effectively preventing data loss, and easier to recover.
POSIX file system advantages:
Robustness: All sensitive information is written on disk
Disk signatures and special key information can recover data even when the disk is damaged
Support 505 text file names
Consistent with QNX4 disk structure
QNX 4 disk structure
A QNX 4 file system can occupy a single disk (such as floppy disk), it can be a partition on the disk.
loader block: The first data block in the disk partition. It contains the boot code for loading the BIOS and loads the OS image from the partition. But the disk does not contain the partition that is the first physical block in the disk.
root block：It is the second block in the partition. It has a directory structure and contains the following files:
The root directory of the filesystem(usuall /) ：The root of the file system (usually /)
.boot ：The boot OS image is stored in this file
altboot ：alternative OS images
bitmap block: A group of consecutive blocks after the rook block. It contains one of the partitions for the image. A bit corresponds to a block (usually 2M). When this bit is 0, it means that the block is not being used.
root directory：An ordinary directory, but contains the following characteristics. It contains the following specific files:
/. and /.. ：A point to the connection with the directory
/.bitmap ：A read-only file that contains a partitioned bitmap image ( same as bitmap block) 。
/.inodes ：A collection of inode objects. The first object is reserved for the information area. The first is
IamTHE.inodeFILE 。In the floppy disk / RAM accounted for a block in the disk accounted for 16 blocks.
/.logfilenames ：An optional file that holds more than 48 characters for the file name/.boot ：system image
/.altboot ：system alternative image
・ other directories ， files ， free blocks ， etc ：Other directories, files, free blocks, etc.
A directory is an ordinary file that contains a set of directory objects.
Usually the first object is /. file, the second is / .. file etc. Each directory object either correspond to a file or point to an object in the /.inodes file.
In the QNX 4 file system, ordinary files and directories are stored on a set of consecutive disk blocks. The directory entry that keeps the file will track the extension. The file system will use a linked list to save the extent of the information. When a file requires more space, the file system will attempt to expand the disk continuously. If not, it will be assigned in other places a new extent. The file system will allocate more space than the required space to prevent multiple files at the same time when writing a number of non-continuous space. When the file is closed, the extra space will be released.