the_nilfs.h (1cc26bada9f6807814806db2f0d78792eecdac71) | the_nilfs.h (3b2ce58b0f3c1633750529713be0e467282abd78) |
---|---|
1/* 2 * the_nilfs.h - the_nilfs shared structure. 3 * 4 * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation. 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 58 unchanged lines hidden (view full) --- 67 * @ns_prev_seq: base sequence number used to decide if advance log cursor 68 * @ns_segctor_sem: segment constructor semaphore 69 * @ns_dat: DAT file inode 70 * @ns_cpfile: checkpoint file inode 71 * @ns_sufile: segusage file inode 72 * @ns_cptree: rb-tree of all mounted checkpoints (nilfs_root) 73 * @ns_cptree_lock: lock protecting @ns_cptree 74 * @ns_gc_inodes: dummy inodes to keep live blocks | 1/* 2 * the_nilfs.h - the_nilfs shared structure. 3 * 4 * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation. 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 58 unchanged lines hidden (view full) --- 67 * @ns_prev_seq: base sequence number used to decide if advance log cursor 68 * @ns_segctor_sem: segment constructor semaphore 69 * @ns_dat: DAT file inode 70 * @ns_cpfile: checkpoint file inode 71 * @ns_sufile: segusage file inode 72 * @ns_cptree: rb-tree of all mounted checkpoints (nilfs_root) 73 * @ns_cptree_lock: lock protecting @ns_cptree 74 * @ns_gc_inodes: dummy inodes to keep live blocks |
75 * @ns_mount_opt: mount options |
|
75 * @ns_blocksize_bits: bit length of block size 76 * @ns_blocksize: block size 77 * @ns_nsegments: number of segments in filesystem 78 * @ns_blocks_per_segment: number of blocks per segment 79 * @ns_r_segments_percentage: reserved segments percentage 80 * @ns_nrsvsegs: number of reserved segments 81 * @ns_first_data_block: block number of first data block 82 * @ns_inode_size: size of on-disk inode --- 60 unchanged lines hidden (view full) --- 143 144 /* Checkpoint tree */ 145 struct rb_root ns_cptree; 146 spinlock_t ns_cptree_lock; 147 148 /* GC inode list */ 149 struct list_head ns_gc_inodes; 150 | 76 * @ns_blocksize_bits: bit length of block size 77 * @ns_blocksize: block size 78 * @ns_nsegments: number of segments in filesystem 79 * @ns_blocks_per_segment: number of blocks per segment 80 * @ns_r_segments_percentage: reserved segments percentage 81 * @ns_nrsvsegs: number of reserved segments 82 * @ns_first_data_block: block number of first data block 83 * @ns_inode_size: size of on-disk inode --- 60 unchanged lines hidden (view full) --- 144 145 /* Checkpoint tree */ 146 struct rb_root ns_cptree; 147 spinlock_t ns_cptree_lock; 148 149 /* GC inode list */ 150 struct list_head ns_gc_inodes; 151 |
152 /* Mount options */ 153 unsigned long ns_mount_opt; 154 |
|
151 /* Disk layout information (static) */ 152 unsigned int ns_blocksize_bits; 153 unsigned int ns_blocksize; 154 unsigned long ns_nsegments; 155 unsigned long ns_blocks_per_segment; 156 unsigned long ns_r_segments_percentage; 157 unsigned long ns_nrsvsegs; 158 unsigned long ns_first_data_block; --- 16 unchanged lines hidden (view full) --- 175 return test_bit(THE_NILFS_##bit, &(nilfs)->ns_flags); \ 176} 177 178THE_NILFS_FNS(INIT, init) 179THE_NILFS_FNS(DISCONTINUED, discontinued) 180THE_NILFS_FNS(GC_RUNNING, gc_running) 181THE_NILFS_FNS(SB_DIRTY, sb_dirty) 182 | 155 /* Disk layout information (static) */ 156 unsigned int ns_blocksize_bits; 157 unsigned int ns_blocksize; 158 unsigned long ns_nsegments; 159 unsigned long ns_blocks_per_segment; 160 unsigned long ns_r_segments_percentage; 161 unsigned long ns_nrsvsegs; 162 unsigned long ns_first_data_block; --- 16 unchanged lines hidden (view full) --- 179 return test_bit(THE_NILFS_##bit, &(nilfs)->ns_flags); \ 180} 181 182THE_NILFS_FNS(INIT, init) 183THE_NILFS_FNS(DISCONTINUED, discontinued) 184THE_NILFS_FNS(GC_RUNNING, gc_running) 185THE_NILFS_FNS(SB_DIRTY, sb_dirty) 186 |
187/* 188 * Mount option operations 189 */ 190#define nilfs_clear_opt(nilfs, opt) \ 191 do { (nilfs)->ns_mount_opt &= ~NILFS_MOUNT_##opt; } while (0) 192#define nilfs_set_opt(nilfs, opt) \ 193 do { (nilfs)->ns_mount_opt |= NILFS_MOUNT_##opt; } while (0) 194#define nilfs_test_opt(nilfs, opt) ((nilfs)->ns_mount_opt & NILFS_MOUNT_##opt) 195#define nilfs_write_opt(nilfs, mask, opt) \ 196 do { (nilfs)->ns_mount_opt = \ 197 (((nilfs)->ns_mount_opt & ~NILFS_MOUNT_##mask) | \ 198 NILFS_MOUNT_##opt); \ 199 } while (0) 200 |
|
183/** 184 * struct nilfs_root - nilfs root object 185 * @cno: checkpoint number 186 * @rb_node: red-black tree node 187 * @count: refcount of this structure 188 * @nilfs: nilfs object 189 * @ifile: inode file 190 * @root: root inode --- 123 unchanged lines hidden --- | 201/** 202 * struct nilfs_root - nilfs root object 203 * @cno: checkpoint number 204 * @rb_node: red-black tree node 205 * @count: refcount of this structure 206 * @nilfs: nilfs object 207 * @ifile: inode file 208 * @root: root inode --- 123 unchanged lines hidden --- |