summaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/the_nilfs.h
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2011-03-09 11:05:08 +0900
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2011-03-09 11:05:08 +0900
commit9b1fc4e4973469dd3fab27ba5d78eca1cd5c13fe (patch)
tree0f51872d41cbc1e43db2fafab0074c107dfce7e7 /fs/nilfs2/the_nilfs.h
parent693dd321222f03b17668f88ceb0f7d518900191e (diff)
downloadblackbird-op-linux-9b1fc4e4973469dd3fab27ba5d78eca1cd5c13fe.tar.gz
blackbird-op-linux-9b1fc4e4973469dd3fab27ba5d78eca1cd5c13fe.zip
nilfs2: move next generation counter into nilfs object
Moves s_next_generation counter and a spinlock protecting it to nilfs object from nilfs_sb_info structure. 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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/nilfs2/the_nilfs.h b/fs/nilfs2/the_nilfs.h
index 6106ec5ad89a..3ecc968f2123 100644
--- a/fs/nilfs2/the_nilfs.h
+++ b/fs/nilfs2/the_nilfs.h
@@ -74,6 +74,8 @@ enum {
* @ns_dirty_files: list of dirty files
* @ns_inode_lock: lock protecting @ns_dirty_files
* @ns_gc_inodes: dummy inodes to keep live blocks
+ * @ns_next_generation: next generation number for inodes
+ * @ns_next_gen_lock: lock protecting @ns_next_generation
* @ns_mount_opt: mount options
* @ns_resuid: uid for reserved blocks
* @ns_resgid: gid for reserved blocks
@@ -159,6 +161,10 @@ struct the_nilfs {
/* GC inode list */
struct list_head ns_gc_inodes;
+ /* Inode allocator */
+ u32 ns_next_generation;
+ spinlock_t ns_next_gen_lock;
+
/* Mount options */
unsigned long ns_mount_opt;
OpenPOWER on IntegriCloud