4 * Function : qnx6 global filesystem definitions
5 * History : 17-01-2012 created
7 #ifndef _LINUX_QNX6_FS_H
8 #define _LINUX_QNX6_FS_H
10 #include <linux/types.h>
11 #include <linux/magic.h>
13 #define QNX6_ROOT_INO 1
16 #define QNX6_FILE_DIRECTORY 0x01
17 #define QNX6_FILE_DELETED 0x02
18 #define QNX6_FILE_NORMAL 0x03
20 #define QNX6_SUPERBLOCK_SIZE 0x200 /* superblock always is 512 bytes */
21 #define QNX6_SUPERBLOCK_AREA 0x1000 /* area reserved for superblock */
22 #define QNX6_BOOTBLOCK_SIZE 0x2000 /* heading bootblock area */
23 #define QNX6_DIR_ENTRY_SIZE 0x20 /* dir entry size of 32 bytes */
24 #define QNX6_INODE_SIZE 0x80 /* each inode is 128 bytes */
25 #define QNX6_INODE_SIZE_BITS 7 /* inode entry size shift */
27 #define QNX6_NO_DIRECT_POINTERS 16 /* 16 blockptrs in sbl/inode */
28 #define QNX6_PTR_MAX_LEVELS 5 /* maximum indirect levels */
31 #define QNX6_SHORT_NAME_MAX 27
32 #define QNX6_LONG_NAME_MAX 510
34 /* list of mount options */
35 #define QNX6_MOUNT_MMI_FS 0x010000 /* mount as Audi MMI 3G fs */
38 * This is the original qnx6 inode layout on disk.
39 * Each inode is 128 byte long.
41 struct qnx6_inode_entry {
51 __fs32 di_block_ptr[QNX6_NO_DIRECT_POINTERS];
59 * Each directory entry is maximum 32 bytes long.
60 * If more characters or special characters required it is stored
61 * in the longfilenames structure.
63 struct qnx6_dir_entry {
66 char de_fname[QNX6_SHORT_NAME_MAX];
70 * Longfilename direntries have a different structure
72 struct qnx6_long_dir_entry {
80 struct qnx6_long_filename {
82 __u8 lf_fname[QNX6_LONG_NAME_MAX];
85 struct qnx6_root_node {
87 __fs32 ptr[QNX6_NO_DIRECT_POINTERS];
93 struct qnx6_super_block {
97 __fs32 sb_ctime; /* time the fs was created */
98 __fs32 sb_atime; /* last access time */
100 __fs16 sb_version1; /* filesystem version information */
101 __fs16 sb_version2; /* filesystem version information */
102 __u8 sb_volumeid[16];
104 __fs32 sb_num_inodes;
105 __fs32 sb_free_inodes;
106 __fs32 sb_num_blocks;
107 __fs32 sb_free_blocks;
108 __fs32 sb_allocgroup;
109 struct qnx6_root_node Inode;
110 struct qnx6_root_node Bitmap;
111 struct qnx6_root_node Longfile;
112 struct qnx6_root_node Unknown;
115 /* Audi MMI 3G superblock layout is different to plain qnx6 */
116 struct qnx6_mmi_super_block {
123 __fs32 sb_num_inodes;
124 __fs32 sb_free_inodes;
125 __fs32 sb_num_blocks;
126 __fs32 sb_free_blocks;
128 struct qnx6_root_node Inode;
129 struct qnx6_root_node Bitmap;
130 struct qnx6_root_node Longfile;
131 struct qnx6_root_node Unknown;