aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tree-log.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-04-03 18:14:44 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-03 18:14:44 -0400
commitb983471794e568fd71fa767da77a62ba517c3e63 (patch)
tree92a1cc26c4846b49d90225d004ba1b7bd6fe3d81 /fs/btrfs/tree-log.c
parent5a3ae276057840f0e60664c12fc3ef80aa59d1d4 (diff)
parentc293498be69816087746161338de4b81efdf69fc (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: Btrfs: BUG to BUG_ON changes Btrfs: remove dead code Btrfs: remove dead code Btrfs: fix typos in comments Btrfs: remove unused ftrace include Btrfs: fix __ucmpdi2 compile bug on 32 bit builds Btrfs: free inode struct when btrfs_new_inode fails Btrfs: fix race in worker_loop Btrfs: add flushoncommit mount option Btrfs: notreelog mount option Btrfs: introduce btrfs_show_options Btrfs: rework allocation clustering Btrfs: Optimize locking in btrfs_next_leaf() Btrfs: break up btrfs_search_slot into smaller pieces Btrfs: kill the pinned_mutex Btrfs: kill the block group alloc mutex Btrfs: clean up find_free_extent Btrfs: free space cache cleanups Btrfs: unplug in the async bio submission threads Btrfs: keep processing bios for a given bdev if our proc is batching
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r--fs/btrfs/tree-log.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index fc9b87a7975b..25f20ea11f27 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -262,11 +262,9 @@ static int process_one_buffer(struct btrfs_root *log,
262 struct extent_buffer *eb, 262 struct extent_buffer *eb,
263 struct walk_control *wc, u64 gen) 263 struct walk_control *wc, u64 gen)
264{ 264{
265 if (wc->pin) { 265 if (wc->pin)
266 mutex_lock(&log->fs_info->pinned_mutex);
267 btrfs_update_pinned_extents(log->fs_info->extent_root, 266 btrfs_update_pinned_extents(log->fs_info->extent_root,
268 eb->start, eb->len, 1); 267 eb->start, eb->len, 1);
269 }
270 268
271 if (btrfs_buffer_uptodate(eb, gen)) { 269 if (btrfs_buffer_uptodate(eb, gen)) {
272 if (wc->write) 270 if (wc->write)
@@ -1224,8 +1222,7 @@ insert:
1224 ret = insert_one_name(trans, root, path, key->objectid, key->offset, 1222 ret = insert_one_name(trans, root, path, key->objectid, key->offset,
1225 name, name_len, log_type, &log_key); 1223 name, name_len, log_type, &log_key);
1226 1224
1227 if (ret && ret != -ENOENT) 1225 BUG_ON(ret && ret != -ENOENT);
1228 BUG();
1229 goto out; 1226 goto out;
1230} 1227}
1231 1228
@@ -2900,6 +2897,11 @@ int btrfs_log_inode_parent(struct btrfs_trans_handle *trans,
2900 2897
2901 sb = inode->i_sb; 2898 sb = inode->i_sb;
2902 2899
2900 if (btrfs_test_opt(root, NOTREELOG)) {
2901 ret = 1;
2902 goto end_no_trans;
2903 }
2904
2903 if (root->fs_info->last_trans_log_full_commit > 2905 if (root->fs_info->last_trans_log_full_commit >
2904 root->fs_info->last_trans_committed) { 2906 root->fs_info->last_trans_committed) {
2905 ret = 1; 2907 ret = 1;