aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/page.c
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2010-08-28 23:44:56 -0400
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2010-10-22 20:24:38 -0400
commitc1c1d7092072093ad960db2f6c08f06705c57fa4 (patch)
tree115796528882ed5d8d21258ad8cf481765a5035a /fs/nilfs2/page.c
parentb1f6a4f294088b3fcf9ae67915ca550a1ded2819 (diff)
nilfs2: get rid of GCDAT inode
This applies prepared rollback function and redirect function of metadata file to DAT file, and eliminates GCDAT inode. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2/page.c')
-rw-r--r--fs/nilfs2/page.c28
1 files changed, 2 insertions, 26 deletions
diff --git a/fs/nilfs2/page.c b/fs/nilfs2/page.c
index 7083344ac88..a6c3c2e817f 100644
--- a/fs/nilfs2/page.c
+++ b/fs/nilfs2/page.c
@@ -79,8 +79,8 @@ struct buffer_head *nilfs_grab_buffer(struct inode *inode,
79{ 79{
80 int blkbits = inode->i_blkbits; 80 int blkbits = inode->i_blkbits;
81 pgoff_t index = blkoff >> (PAGE_CACHE_SHIFT - blkbits); 81 pgoff_t index = blkoff >> (PAGE_CACHE_SHIFT - blkbits);
82 struct page *page, *opage; 82 struct page *page;
83 struct buffer_head *bh, *obh; 83 struct buffer_head *bh;
84 84
85 page = grab_cache_page(mapping, index); 85 page = grab_cache_page(mapping, index);
86 if (unlikely(!page)) 86 if (unlikely(!page))
@@ -92,30 +92,6 @@ struct buffer_head *nilfs_grab_buffer(struct inode *inode,
92 page_cache_release(page); 92 page_cache_release(page);
93 return NULL; 93 return NULL;
94 } 94 }
95 if (!buffer_uptodate(bh) && mapping->assoc_mapping != NULL) {
96 /*
97 * Shadow page cache uses assoc_mapping to point its original
98 * page cache. The following code tries the original cache
99 * if the given cache is a shadow and it didn't hit.
100 */
101 opage = find_lock_page(mapping->assoc_mapping, index);
102 if (!opage)
103 return bh;
104
105 obh = __nilfs_get_page_block(opage, blkoff, index, blkbits,
106 b_state);
107 if (buffer_uptodate(obh)) {
108 nilfs_copy_buffer(bh, obh);
109 if (buffer_dirty(obh)) {
110 nilfs_mark_buffer_dirty(bh);
111 if (!buffer_nilfs_node(bh) && NILFS_MDT(inode))
112 nilfs_mdt_mark_dirty(inode);
113 }
114 }
115 brelse(obh);
116 unlock_page(opage);
117 page_cache_release(opage);
118 }
119 return bh; 95 return bh;
120} 96}
121 97