diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /fs/nilfs2/gcinode.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'fs/nilfs2/gcinode.c')
-rw-r--r-- | fs/nilfs2/gcinode.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/nilfs2/gcinode.c b/fs/nilfs2/gcinode.c index e6de0a27ab5d..145f03cd7d3e 100644 --- a/fs/nilfs2/gcinode.c +++ b/fs/nilfs2/gcinode.c | |||
@@ -28,10 +28,10 @@ | |||
28 | * gcinodes), and this file provides lookup function of the dummy | 28 | * gcinodes), and this file provides lookup function of the dummy |
29 | * inodes and their buffer read function. | 29 | * inodes and their buffer read function. |
30 | * | 30 | * |
31 | * Since NILFS2 keeps up multiple checkpoints/snapshots accross GC, it | 31 | * Since NILFS2 keeps up multiple checkpoints/snapshots across GC, it |
32 | * has to treat blocks that belong to a same file but have different | 32 | * has to treat blocks that belong to a same file but have different |
33 | * checkpoint numbers. To avoid interference among generations, dummy | 33 | * checkpoint numbers. To avoid interference among generations, dummy |
34 | * inodes are managed separatly from actual inodes, and their lookup | 34 | * inodes are managed separately from actual inodes, and their lookup |
35 | * function (nilfs_gc_iget) is designed to be specified with a | 35 | * function (nilfs_gc_iget) is designed to be specified with a |
36 | * checkpoint number argument as well as an inode number. | 36 | * checkpoint number argument as well as an inode number. |
37 | * | 37 | * |
@@ -45,6 +45,7 @@ | |||
45 | #include <linux/buffer_head.h> | 45 | #include <linux/buffer_head.h> |
46 | #include <linux/mpage.h> | 46 | #include <linux/mpage.h> |
47 | #include <linux/hash.h> | 47 | #include <linux/hash.h> |
48 | #include <linux/slab.h> | ||
48 | #include <linux/swap.h> | 49 | #include <linux/swap.h> |
49 | #include "nilfs.h" | 50 | #include "nilfs.h" |
50 | #include "page.h" | 51 | #include "page.h" |
@@ -149,7 +150,7 @@ int nilfs_gccache_submit_read_node(struct inode *inode, sector_t pbn, | |||
149 | __u64 vbn, struct buffer_head **out_bh) | 150 | __u64 vbn, struct buffer_head **out_bh) |
150 | { | 151 | { |
151 | int ret = nilfs_btnode_submit_block(&NILFS_I(inode)->i_btnode_cache, | 152 | int ret = nilfs_btnode_submit_block(&NILFS_I(inode)->i_btnode_cache, |
152 | vbn ? : pbn, pbn, out_bh, 0); | 153 | vbn ? : pbn, pbn, out_bh); |
153 | if (ret == -EEXIST) /* internal code (cache hit) */ | 154 | if (ret == -EEXIST) /* internal code (cache hit) */ |
154 | ret = 0; | 155 | ret = 0; |
155 | return ret; | 156 | return ret; |
@@ -212,9 +213,10 @@ void nilfs_destroy_gccache(struct the_nilfs *nilfs) | |||
212 | static struct inode *alloc_gcinode(struct the_nilfs *nilfs, ino_t ino, | 213 | static struct inode *alloc_gcinode(struct the_nilfs *nilfs, ino_t ino, |
213 | __u64 cno) | 214 | __u64 cno) |
214 | { | 215 | { |
215 | struct inode *inode = nilfs_mdt_new_common(nilfs, NULL, ino, GFP_NOFS); | 216 | struct inode *inode; |
216 | struct nilfs_inode_info *ii; | 217 | struct nilfs_inode_info *ii; |
217 | 218 | ||
219 | inode = nilfs_mdt_new_common(nilfs, NULL, ino, GFP_NOFS, 0); | ||
218 | if (!inode) | 220 | if (!inode) |
219 | return NULL; | 221 | return NULL; |
220 | 222 | ||
@@ -265,7 +267,6 @@ struct inode *nilfs_gc_iget(struct the_nilfs *nilfs, ino_t ino, __u64 cno) | |||
265 | */ | 267 | */ |
266 | void nilfs_clear_gcinode(struct inode *inode) | 268 | void nilfs_clear_gcinode(struct inode *inode) |
267 | { | 269 | { |
268 | nilfs_mdt_clear(inode); | ||
269 | nilfs_mdt_destroy(inode); | 270 | nilfs_mdt_destroy(inode); |
270 | } | 271 | } |
271 | 272 | ||