gcinode.c (e37c83c06c2690157a989df40dc99a6b61c9ea15) gcinode.c (1d5385b9f30ae43209459db424416a3e1d8f2bde)
1/*
2 * gcinode.c - dummy inodes to buffer blocks for garbage collection
3 *
4 * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or

--- 150 unchanged lines hidden (view full) ---

159int nilfs_gccache_wait_and_mark_dirty(struct buffer_head *bh)
160{
161 wait_on_buffer(bh);
162 if (!buffer_uptodate(bh))
163 return -EIO;
164 if (buffer_dirty(bh))
165 return -EEXIST;
166
1/*
2 * gcinode.c - dummy inodes to buffer blocks for garbage collection
3 *
4 * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or

--- 150 unchanged lines hidden (view full) ---

159int nilfs_gccache_wait_and_mark_dirty(struct buffer_head *bh)
160{
161 wait_on_buffer(bh);
162 if (!buffer_uptodate(bh))
163 return -EIO;
164 if (buffer_dirty(bh))
165 return -EEXIST;
166
167 if (buffer_nilfs_node(bh))
167 if (buffer_nilfs_node(bh)) {
168 if (nilfs_btree_broken_node_block(bh)) {
169 clear_buffer_uptodate(bh);
170 return -EIO;
171 }
168 nilfs_btnode_mark_dirty(bh);
172 nilfs_btnode_mark_dirty(bh);
169 else
173 } else {
170 nilfs_mdt_mark_buffer_dirty(bh);
174 nilfs_mdt_mark_buffer_dirty(bh);
175 }
171 return 0;
172}
173
174/*
175 * nilfs_init_gccache() - allocate and initialize gc_inode hash table
176 * @nilfs - the_nilfs
177 *
178 * Return Value: On success, 0.

--- 112 unchanged lines hidden ---
176 return 0;
177}
178
179/*
180 * nilfs_init_gccache() - allocate and initialize gc_inode hash table
181 * @nilfs - the_nilfs
182 *
183 * Return Value: On success, 0.

--- 112 unchanged lines hidden ---