diff options
Diffstat (limited to 'fs/nilfs2/the_nilfs.h')
-rw-r--r-- | fs/nilfs2/the_nilfs.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/fs/nilfs2/the_nilfs.h b/fs/nilfs2/the_nilfs.h index fd85e4c05c6b..438278041d80 100644 --- a/fs/nilfs2/the_nilfs.h +++ b/fs/nilfs2/the_nilfs.h | |||
@@ -72,6 +72,7 @@ enum { | |||
72 | * @ns_cptree: rb-tree of all mounted checkpoints (nilfs_root) | 72 | * @ns_cptree: rb-tree of all mounted checkpoints (nilfs_root) |
73 | * @ns_cptree_lock: lock protecting @ns_cptree | 73 | * @ns_cptree_lock: lock protecting @ns_cptree |
74 | * @ns_gc_inodes: dummy inodes to keep live blocks | 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_bits: bit length of block size |
76 | * @ns_blocksize: block size | 77 | * @ns_blocksize: block size |
77 | * @ns_nsegments: number of segments in filesystem | 78 | * @ns_nsegments: number of segments in filesystem |
@@ -148,6 +149,9 @@ struct the_nilfs { | |||
148 | /* GC inode list */ | 149 | /* GC inode list */ |
149 | struct list_head ns_gc_inodes; | 150 | struct list_head ns_gc_inodes; |
150 | 151 | ||
152 | /* Mount options */ | ||
153 | unsigned long ns_mount_opt; | ||
154 | |||
151 | /* Disk layout information (static) */ | 155 | /* Disk layout information (static) */ |
152 | unsigned int ns_blocksize_bits; | 156 | unsigned int ns_blocksize_bits; |
153 | unsigned int ns_blocksize; | 157 | unsigned int ns_blocksize; |
@@ -180,6 +184,20 @@ THE_NILFS_FNS(DISCONTINUED, discontinued) | |||
180 | THE_NILFS_FNS(GC_RUNNING, gc_running) | 184 | THE_NILFS_FNS(GC_RUNNING, gc_running) |
181 | THE_NILFS_FNS(SB_DIRTY, sb_dirty) | 185 | THE_NILFS_FNS(SB_DIRTY, sb_dirty) |
182 | 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 | /** | 201 | /** |
184 | * struct nilfs_root - nilfs root object | 202 | * struct nilfs_root - nilfs root object |
185 | * @cno: checkpoint number | 203 | * @cno: checkpoint number |