diff options
-rw-r--r-- | fs/nilfs2/alloc.h | 14 | ||||
-rw-r--r-- | fs/nilfs2/bmap.h | 7 | ||||
-rw-r--r-- | fs/nilfs2/btnode.h | 8 | ||||
-rw-r--r-- | fs/nilfs2/dat.c | 6 | ||||
-rw-r--r-- | fs/nilfs2/export.h | 8 | ||||
-rw-r--r-- | fs/nilfs2/ifile.c | 6 | ||||
-rw-r--r-- | fs/nilfs2/inode.c | 7 | ||||
-rw-r--r-- | fs/nilfs2/mdt.h | 7 | ||||
-rw-r--r-- | fs/nilfs2/nilfs.h | 17 | ||||
-rw-r--r-- | fs/nilfs2/sufile.c | 8 | ||||
-rw-r--r-- | fs/nilfs2/the_nilfs.h | 3 |
11 files changed, 81 insertions, 10 deletions
diff --git a/fs/nilfs2/alloc.h b/fs/nilfs2/alloc.h index f5fde36b9e28..fb7238100548 100644 --- a/fs/nilfs2/alloc.h +++ b/fs/nilfs2/alloc.h | |||
@@ -76,15 +76,23 @@ int nilfs_palloc_freev(struct inode *, __u64 *, size_t); | |||
76 | #define nilfs_clear_bit_atomic ext2_clear_bit_atomic | 76 | #define nilfs_clear_bit_atomic ext2_clear_bit_atomic |
77 | #define nilfs_find_next_zero_bit find_next_zero_bit_le | 77 | #define nilfs_find_next_zero_bit find_next_zero_bit_le |
78 | 78 | ||
79 | /* | 79 | /** |
80 | * persistent object allocator cache | 80 | * struct nilfs_bh_assoc - block offset and buffer head association |
81 | * @blkoff: block offset | ||
82 | * @bh: buffer head | ||
81 | */ | 83 | */ |
82 | |||
83 | struct nilfs_bh_assoc { | 84 | struct nilfs_bh_assoc { |
84 | unsigned long blkoff; | 85 | unsigned long blkoff; |
85 | struct buffer_head *bh; | 86 | struct buffer_head *bh; |
86 | }; | 87 | }; |
87 | 88 | ||
89 | /** | ||
90 | * struct nilfs_palloc_cache - persistent object allocator cache | ||
91 | * @lock: cache protecting lock | ||
92 | * @prev_desc: blockgroup descriptors cache | ||
93 | * @prev_bitmap: blockgroup bitmap cache | ||
94 | * @prev_entry: translation entries cache | ||
95 | */ | ||
88 | struct nilfs_palloc_cache { | 96 | struct nilfs_palloc_cache { |
89 | spinlock_t lock; | 97 | spinlock_t lock; |
90 | struct nilfs_bh_assoc prev_desc; | 98 | struct nilfs_bh_assoc prev_desc; |
diff --git a/fs/nilfs2/bmap.h b/fs/nilfs2/bmap.h index 40d9f453d31c..b89e68076adc 100644 --- a/fs/nilfs2/bmap.h +++ b/fs/nilfs2/bmap.h | |||
@@ -135,6 +135,13 @@ struct nilfs_bmap { | |||
135 | /* state */ | 135 | /* state */ |
136 | #define NILFS_BMAP_DIRTY 0x00000001 | 136 | #define NILFS_BMAP_DIRTY 0x00000001 |
137 | 137 | ||
138 | /** | ||
139 | * struct nilfs_bmap_store - shadow copy of bmap state | ||
140 | * @data: cached raw block mapping of on-disk inode | ||
141 | * @last_allocated_key: cached value of last allocated key for data block | ||
142 | * @last_allocated_ptr: cached value of last allocated ptr for data block | ||
143 | * @state: cached value of state field of bmap structure | ||
144 | */ | ||
138 | struct nilfs_bmap_store { | 145 | struct nilfs_bmap_store { |
139 | __le64 data[NILFS_BMAP_SIZE / sizeof(__le64)]; | 146 | __le64 data[NILFS_BMAP_SIZE / sizeof(__le64)]; |
140 | __u64 last_allocated_key; | 147 | __u64 last_allocated_key; |
diff --git a/fs/nilfs2/btnode.h b/fs/nilfs2/btnode.h index 3a4dd2d8d3fc..d876b565ce64 100644 --- a/fs/nilfs2/btnode.h +++ b/fs/nilfs2/btnode.h | |||
@@ -29,7 +29,13 @@ | |||
29 | #include <linux/fs.h> | 29 | #include <linux/fs.h> |
30 | #include <linux/backing-dev.h> | 30 | #include <linux/backing-dev.h> |
31 | 31 | ||
32 | 32 | /** | |
33 | * struct nilfs_btnode_chkey_ctxt - change key context | ||
34 | * @oldkey: old key of block's moving content | ||
35 | * @newkey: new key for block's content | ||
36 | * @bh: buffer head of old buffer | ||
37 | * @newbh: buffer head of new buffer | ||
38 | */ | ||
33 | struct nilfs_btnode_chkey_ctxt { | 39 | struct nilfs_btnode_chkey_ctxt { |
34 | __u64 oldkey; | 40 | __u64 oldkey; |
35 | __u64 newkey; | 41 | __u64 newkey; |
diff --git a/fs/nilfs2/dat.c b/fs/nilfs2/dat.c index b5c13f3576b9..fa0f80308c2d 100644 --- a/fs/nilfs2/dat.c +++ b/fs/nilfs2/dat.c | |||
@@ -33,6 +33,12 @@ | |||
33 | #define NILFS_CNO_MIN ((__u64)1) | 33 | #define NILFS_CNO_MIN ((__u64)1) |
34 | #define NILFS_CNO_MAX (~(__u64)0) | 34 | #define NILFS_CNO_MAX (~(__u64)0) |
35 | 35 | ||
36 | /** | ||
37 | * struct nilfs_dat_info - on-memory private data of DAT file | ||
38 | * @mi: on-memory private data of metadata file | ||
39 | * @palloc_cache: persistent object allocator cache of DAT file | ||
40 | * @shadow: shadow map of DAT file | ||
41 | */ | ||
36 | struct nilfs_dat_info { | 42 | struct nilfs_dat_info { |
37 | struct nilfs_mdt_info mi; | 43 | struct nilfs_mdt_info mi; |
38 | struct nilfs_palloc_cache palloc_cache; | 44 | struct nilfs_palloc_cache palloc_cache; |
diff --git a/fs/nilfs2/export.h b/fs/nilfs2/export.h index a71cc412b651..19ccbf9522ab 100644 --- a/fs/nilfs2/export.h +++ b/fs/nilfs2/export.h | |||
@@ -5,6 +5,14 @@ | |||
5 | 5 | ||
6 | extern const struct export_operations nilfs_export_ops; | 6 | extern const struct export_operations nilfs_export_ops; |
7 | 7 | ||
8 | /** | ||
9 | * struct nilfs_fid - NILFS file id type | ||
10 | * @cno: checkpoint number | ||
11 | * @ino: inode number | ||
12 | * @gen: file generation (version) for NFS | ||
13 | * @parent_gen: parent generation (version) for NFS | ||
14 | * @parent_ino: parent inode number | ||
15 | */ | ||
8 | struct nilfs_fid { | 16 | struct nilfs_fid { |
9 | u64 cno; | 17 | u64 cno; |
10 | u64 ino; | 18 | u64 ino; |
diff --git a/fs/nilfs2/ifile.c b/fs/nilfs2/ifile.c index 5a48df79d674..d8e65bde083c 100644 --- a/fs/nilfs2/ifile.c +++ b/fs/nilfs2/ifile.c | |||
@@ -29,7 +29,11 @@ | |||
29 | #include "alloc.h" | 29 | #include "alloc.h" |
30 | #include "ifile.h" | 30 | #include "ifile.h" |
31 | 31 | ||
32 | 32 | /** | |
33 | * struct nilfs_ifile_info - on-memory private data of ifile | ||
34 | * @mi: on-memory private data of metadata file | ||
35 | * @palloc_cache: persistent object allocator cache of ifile | ||
36 | */ | ||
33 | struct nilfs_ifile_info { | 37 | struct nilfs_ifile_info { |
34 | struct nilfs_mdt_info mi; | 38 | struct nilfs_mdt_info mi; |
35 | struct nilfs_palloc_cache palloc_cache; | 39 | struct nilfs_palloc_cache palloc_cache; |
diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c index 7cc64465ec26..6e2c3db976b2 100644 --- a/fs/nilfs2/inode.c +++ b/fs/nilfs2/inode.c | |||
@@ -34,6 +34,13 @@ | |||
34 | #include "cpfile.h" | 34 | #include "cpfile.h" |
35 | #include "ifile.h" | 35 | #include "ifile.h" |
36 | 36 | ||
37 | /** | ||
38 | * struct nilfs_iget_args - arguments used during comparison between inodes | ||
39 | * @ino: inode number | ||
40 | * @cno: checkpoint number | ||
41 | * @root: pointer on NILFS root object (mounted checkpoint) | ||
42 | * @for_gc: inode for GC flag | ||
43 | */ | ||
37 | struct nilfs_iget_args { | 44 | struct nilfs_iget_args { |
38 | u64 ino; | 45 | u64 ino; |
39 | __u64 cno; | 46 | __u64 cno; |
diff --git a/fs/nilfs2/mdt.h b/fs/nilfs2/mdt.h index ab20a4baa50f..ab172e8549c5 100644 --- a/fs/nilfs2/mdt.h +++ b/fs/nilfs2/mdt.h | |||
@@ -28,6 +28,13 @@ | |||
28 | #include "nilfs.h" | 28 | #include "nilfs.h" |
29 | #include "page.h" | 29 | #include "page.h" |
30 | 30 | ||
31 | /** | ||
32 | * struct nilfs_shadow_map - shadow mapping of meta data file | ||
33 | * @bmap_store: shadow copy of bmap state | ||
34 | * @frozen_data: shadowed dirty data pages | ||
35 | * @frozen_btnodes: shadowed dirty b-tree nodes' pages | ||
36 | * @frozen_buffers: list of frozen buffers | ||
37 | */ | ||
31 | struct nilfs_shadow_map { | 38 | struct nilfs_shadow_map { |
32 | struct nilfs_bmap_store bmap_store; | 39 | struct nilfs_bmap_store bmap_store; |
33 | struct address_space frozen_data; | 40 | struct address_space frozen_data; |
diff --git a/fs/nilfs2/nilfs.h b/fs/nilfs2/nilfs.h index 250add84da76..74cece80e9a3 100644 --- a/fs/nilfs2/nilfs.h +++ b/fs/nilfs2/nilfs.h | |||
@@ -32,8 +32,21 @@ | |||
32 | #include "the_nilfs.h" | 32 | #include "the_nilfs.h" |
33 | #include "bmap.h" | 33 | #include "bmap.h" |
34 | 34 | ||
35 | /* | 35 | /** |
36 | * nilfs inode data in memory | 36 | * struct nilfs_inode_info - nilfs inode data in memory |
37 | * @i_flags: inode flags | ||
38 | * @i_state: dynamic state flags | ||
39 | * @i_bmap: pointer on i_bmap_data | ||
40 | * @i_bmap_data: raw block mapping | ||
41 | * @i_xattr: <TODO> | ||
42 | * @i_dir_start_lookup: page index of last successful search | ||
43 | * @i_cno: checkpoint number for GC inode | ||
44 | * @i_btnode_cache: cached pages of b-tree nodes | ||
45 | * @i_dirty: list for connecting dirty files | ||
46 | * @xattr_sem: semaphore for extended attributes processing | ||
47 | * @i_bh: buffer contains disk inode | ||
48 | * @i_root: root object of the current filesystem tree | ||
49 | * @vfs_inode: VFS inode object | ||
37 | */ | 50 | */ |
38 | struct nilfs_inode_info { | 51 | struct nilfs_inode_info { |
39 | __u32 i_flags; | 52 | __u32 i_flags; |
diff --git a/fs/nilfs2/sufile.c b/fs/nilfs2/sufile.c index c5b7653a4391..3127e9f438a7 100644 --- a/fs/nilfs2/sufile.c +++ b/fs/nilfs2/sufile.c | |||
@@ -30,7 +30,13 @@ | |||
30 | #include "mdt.h" | 30 | #include "mdt.h" |
31 | #include "sufile.h" | 31 | #include "sufile.h" |
32 | 32 | ||
33 | 33 | /** | |
34 | * struct nilfs_sufile_info - on-memory private data of sufile | ||
35 | * @mi: on-memory private data of metadata file | ||
36 | * @ncleansegs: number of clean segments | ||
37 | * @allocmin: lower limit of allocatable segment range | ||
38 | * @allocmax: upper limit of allocatable segment range | ||
39 | */ | ||
34 | struct nilfs_sufile_info { | 40 | struct nilfs_sufile_info { |
35 | struct nilfs_mdt_info mi; | 41 | struct nilfs_mdt_info mi; |
36 | unsigned long ncleansegs;/* number of clean segments */ | 42 | unsigned long ncleansegs;/* number of clean segments */ |
diff --git a/fs/nilfs2/the_nilfs.h b/fs/nilfs2/the_nilfs.h index 2558f320b821..6eee4177807b 100644 --- a/fs/nilfs2/the_nilfs.h +++ b/fs/nilfs2/the_nilfs.h | |||
@@ -232,9 +232,8 @@ THE_NILFS_FNS(SB_DIRTY, sb_dirty) | |||
232 | * @count: refcount of this structure | 232 | * @count: refcount of this structure |
233 | * @nilfs: nilfs object | 233 | * @nilfs: nilfs object |
234 | * @ifile: inode file | 234 | * @ifile: inode file |
235 | * @root: root inode | ||
236 | * @inodes_count: number of inodes | 235 | * @inodes_count: number of inodes |
237 | * @blocks_count: number of blocks (Reserved) | 236 | * @blocks_count: number of blocks |
238 | */ | 237 | */ |
239 | struct nilfs_root { | 238 | struct nilfs_root { |
240 | __u64 cno; | 239 | __u64 cno; |