Lines Matching +full:full +full:- +full:bit

1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * the_nilfs.h - the_nilfs shared structure.
5 * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
19 #include <linux/backing-dev.h>
35 * struct the_nilfs - struct to supervise multiple nilfs mount points
42 * @ns_sbh: buffer heads of on-disk super blocks
50 * @ns_segnum: index number of the latest full segment.
51 * @ns_nextnum: index number of the full segment index to be used next
52 * @ns_pseg_offset: offset of next partial segment in the current full segment
68 * @ns_cptree: rb-tree of all mounted checkpoints (nilfs_root)
80 * @ns_blocksize_bits: bit length of block size
87 * @ns_inode_size: size of on-disk inode
88 * @ns_first_ino: first not-special inode number
105 * - loading the latest checkpoint exclusively.
106 * - allocating a new full segment.
117 * The following fields are updated by a writable FS-instance.
193 #define THE_NILFS_FNS(bit, name) \ argument
196 set_bit(THE_NILFS_##bit, &(nilfs)->ns_flags); \
200 clear_bit(THE_NILFS_##bit, &(nilfs)->ns_flags); \
204 return test_bit(THE_NILFS_##bit, &(nilfs)->ns_flags); \
216 ((nilfs)->ns_mount_opt &= ~NILFS_MOUNT_##opt)
218 ((nilfs)->ns_mount_opt |= NILFS_MOUNT_##opt)
219 #define nilfs_test_opt(nilfs, opt) ((nilfs)->ns_mount_opt & NILFS_MOUNT_##opt)
221 ((nilfs)->ns_mount_opt = \
222 (((nilfs)->ns_mount_opt & ~NILFS_MOUNT_##mask) | \
226 * struct nilfs_root - nilfs root object
228 * @rb_node: red-black tree node
263 return t < nilfs->ns_sbwtime || in nilfs_sb_need_update()
264 t > nilfs->ns_sbwtime + nilfs->ns_sb_update_freq; in nilfs_sb_need_update()
269 int flip_bits = nilfs->ns_sbwcount & 0x0FL; in nilfs_sb_will_flip()
294 refcount_inc(&root->count); in nilfs_get_root()
301 down_read(&nilfs->ns_sem); in nilfs_valid_fs()
302 valid_fs = (nilfs->ns_mount_state & NILFS_VALID_FS); in nilfs_valid_fs()
303 up_read(&nilfs->ns_sem); in nilfs_valid_fs()
311 *seg_start = (sector_t)nilfs->ns_blocks_per_segment * segnum; in nilfs_get_segment_range()
312 *seg_end = *seg_start + nilfs->ns_blocks_per_segment - 1; in nilfs_get_segment_range()
314 *seg_start = nilfs->ns_first_data_block; in nilfs_get_segment_range()
320 return (segnum == 0) ? nilfs->ns_first_data_block : in nilfs_get_segment_start_blocknr()
321 (sector_t)nilfs->ns_blocks_per_segment * segnum; in nilfs_get_segment_start_blocknr()
329 sector_div(segnum, nilfs->ns_blocks_per_segment); in nilfs_get_segnum_of_block()
337 /* terminate the current full segment (used in case of I/O-error) */ in nilfs_terminate_segment()
338 nilfs->ns_pseg_offset = seg_end - seg_start + 1; in nilfs_terminate_segment()
343 /* move forward with a full segment */ in nilfs_shift_to_next_segment()
344 nilfs->ns_segnum = nilfs->ns_nextnum; in nilfs_shift_to_next_segment()
345 nilfs->ns_pseg_offset = 0; in nilfs_shift_to_next_segment()
346 nilfs->ns_seg_seq++; in nilfs_shift_to_next_segment()
353 spin_lock(&nilfs->ns_last_segment_lock); in nilfs_last_cno()
354 cno = nilfs->ns_last_cno; in nilfs_last_cno()
355 spin_unlock(&nilfs->ns_last_segment_lock); in nilfs_last_cno()
361 return n == nilfs->ns_segnum || n == nilfs->ns_nextnum; in nilfs_segment_is_active()
368 if (!nilfs_test_opt(nilfs, BARRIER) || nilfs->ns_flushed_device) in nilfs_flush_device()
371 nilfs->ns_flushed_device = 1; in nilfs_flush_device()
378 err = blkdev_issue_flush(nilfs->ns_bdev, GFP_KERNEL); in nilfs_flush_device()
379 if (err != -EIO) in nilfs_flush_device()