Go to the documentation of this file.
8 #define INODE_VERSION(inode) minix_sb(inode->i_sb)->s_version
9 #define MINIX_V1 0x0001
10 #define MINIX_V2 0x0002
11 #define MINIX_V3 0x0003
90 static inline unsigned minix_blocks_needed(
unsigned bits,
unsigned blocksize)
95 #if defined(CONFIG_MINIX_FS_NATIVE_ENDIAN) && \
96 defined(CONFIG_MINIX_FS_BIG_ENDIAN_16BIT_INDEXED)
98 #error Minix file system byte order broken
100 #elif defined(CONFIG_MINIX_FS_NATIVE_ENDIAN)
107 #define minix_test_and_set_bit(nr, addr) \
108 __test_and_set_bit((nr), (unsigned long *)(addr))
109 #define minix_set_bit(nr, addr) \
110 __set_bit((nr), (unsigned long *)(addr))
111 #define minix_test_and_clear_bit(nr, addr) \
112 __test_and_clear_bit((nr), (unsigned long *)(addr))
113 #define minix_test_bit(nr, addr) \
114 test_bit((nr), (unsigned long *)(addr))
115 #define minix_find_first_zero_bit(addr, size) \
116 find_first_zero_bit((unsigned long *)(addr), (size))
118 #elif defined(CONFIG_MINIX_FS_BIG_ENDIAN_16BIT_INDEXED)
133 while (*p++ == 0xffff) {
135 return (p - addr) << 4;
139 return ((p - addr) << 4) +
ffz(num);
142 #define minix_test_and_set_bit(nr, addr) \
143 __test_and_set_bit((nr) ^ 16, (unsigned long *)(addr))
144 #define minix_set_bit(nr, addr) \
145 __set_bit((nr) ^ 16, (unsigned long *)(addr))
146 #define minix_test_and_clear_bit(nr, addr) \
147 __test_and_clear_bit((nr) ^ 16, (unsigned long *)(addr))
151 const unsigned short *p =
vaddr;
152 return (p[nr >> 4] & (1
U << (nr & 15))) != 0;
161 #define minix_test_and_set_bit __test_and_set_bit_le
162 #define minix_set_bit __set_bit_le
163 #define minix_test_and_clear_bit __test_and_clear_bit_le
164 #define minix_test_bit test_bit_le
165 #define minix_find_first_zero_bit find_first_zero_bit_le