aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/the_nilfs.h
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2011-03-08 21:05:07 -0500
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2011-03-08 21:05:07 -0500
commit3b2ce58b0f3c1633750529713be0e467282abd78 (patch)
tree48c0111adadf00e67933fb5d9883296754fca6ce /fs/nilfs2/the_nilfs.h
parentbe667377a8b8cd73e1b923f33fb5be4034aa4bfa (diff)
nilfs2: move mount options to nilfs object
This moves mount_opt local variable to nilfs object from nilfs_sb_info struct. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2/the_nilfs.h')
-rw-r--r--fs/nilfs2/the_nilfs.h18
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)
180THE_NILFS_FNS(GC_RUNNING, gc_running) 184THE_NILFS_FNS(GC_RUNNING, gc_running)
181THE_NILFS_FNS(SB_DIRTY, sb_dirty) 185THE_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