27 #include <linux/types.h>
29 #include <linux/rbtree.h>
33 #include <linux/slab.h>
193 #define THE_NILFS_FNS(bit, name) \
194 static inline void set_nilfs_##name(struct the_nilfs *nilfs) \
196 set_bit(THE_NILFS_##bit, &(nilfs)->ns_flags); \
198 static inline void clear_nilfs_##name(struct the_nilfs *nilfs) \
200 clear_bit(THE_NILFS_##bit, &(nilfs)->ns_flags); \
202 static inline int nilfs_##name(struct the_nilfs *nilfs) \
204 return test_bit(THE_NILFS_##bit, &(nilfs)->ns_flags); \
215 #define nilfs_clear_opt(nilfs, opt) \
216 do { (nilfs)->ns_mount_opt &= ~NILFS_MOUNT_##opt; } while (0)
217 #define nilfs_set_opt(nilfs, opt) \
218 do { (nilfs)->ns_mount_opt |= NILFS_MOUNT_##opt; } while (0)
219 #define nilfs_test_opt(nilfs, opt) ((nilfs)->ns_mount_opt & NILFS_MOUNT_##opt)
220 #define nilfs_write_opt(nilfs, mask, opt) \
221 do { (nilfs)->ns_mount_opt = \
222 (((nilfs)->ns_mount_opt & ~NILFS_MOUNT_##mask) | \
223 NILFS_MOUNT_##opt); \
249 #define NILFS_CPTREE_CURRENT_CNO 0
252 #define NILFS_SB_FREQ 10
254 static inline int nilfs_sb_need_update(
struct the_nilfs *nilfs)
260 static inline int nilfs_sb_will_flip(
struct the_nilfs *nilfs)
263 return (flip_bits != 0x08 && flip_bits != 0x0F);
284 static inline void nilfs_get_root(
struct nilfs_root *root)
289 static inline int nilfs_valid_fs(
struct the_nilfs *nilfs)
310 nilfs_get_segment_start_blocknr(
struct the_nilfs *nilfs,
__u64 segnum)
333 static inline void nilfs_shift_to_next_segment(
struct the_nilfs *nilfs)
351 static inline int nilfs_segment_is_active(
struct the_nilfs *nilfs,
__u64 n)