search for: log_root_tree

Displaying 8 results from an estimated 8 matches for "log_root_tree".

2013 Jan 10
0
[PATCH 03/11] Btrfs: use atomic for fs_info->last_trans_log_full_commit
...t == trans->transid) { + if (atomic64_read(&root->fs_info->last_trans_log_full_commit) == + trans->transid) { ret = -EAGAIN; mutex_unlock(&root->log_mutex); goto out; @@ -2361,7 +2362,8 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans, mutex_unlock(&log_root_tree->log_mutex); goto out; } - root->fs_info->last_trans_log_full_commit = trans->transid; + atomic64_set(&root->fs_info->last_trans_log_full_commit, + trans->transid); btrfs_wait_marked_extents(log, &log->dirty_log_pages, mark); mutex_unlock(&l...
2011 Mar 23
0
[PATCH] Btrfs: cleanup some BUG_ON()
...- BUG_ON(!path); + if (!path) + return -ENOMEM; + + fs_info->log_root_recovering = 1; trans = btrfs_start_transaction(fs_info->tree_root, 0); BUG_ON(IS_ERR(trans)); @@ -3117,7 +3120,8 @@ int btrfs_recover_log_trees(struct btrfs wc.trans = trans; wc.pin = 1; - walk_log_tree(trans, log_root_tree, &wc); + ret = walk_log_tree(trans, log_root_tree, &wc); + BUG_ON(ret); again: key.objectid = BTRFS_TREE_LOG_OBJECTID; @@ -3141,8 +3145,7 @@ again: log = btrfs_read_fs_root_no_radix(log_root_tree, &found_key); - BUG_ON(!log); - + BUG_ON(IS_ERR(log)); tmp_key.ob...
2011 Jun 21
19
[GIT PULL v3] Btrfs: improve write ahead log with sub transaction
...rans Btrfs: still update inode trans stuff when size remains unchanged Btrfs: improve log with sub transaction Btrfs: add checksum check for log Btrfs: fix a bug of log check Btrfs: kick off useless code Btrfs: deal with EEXIST after iput Btrfs: use the right generation number to read log_root_tree Revert "Btrfs: do not flush csum items of unchanged file data during treelog" fs/btrfs/btrfs_inode.h | 12 ++- fs/btrfs/ctree.c | 69 +++++++++--- fs/btrfs/ctree.h | 5 +- fs/btrfs/disk-io.c | 12 +- fs/btrfs/extent-tree.c | 10 +- fs/btrfs/file.c...
2009 Oct 08
0
[PATCH] Btrfs: optimize fsync for the single writer case
...+ } + root->log_batch++; atomic_inc(&root->log_writers); mutex_unlock(&root->log_mutex); return 0; } + root->log_multiple_pids = false; + root->log_start_pid = current->pid; mutex_lock(&root->fs_info->tree_log_mutex); if (!root->fs_info->log_root_tree) { ret = btrfs_init_log_root_tree(trans, root->fs_info); @@ -1985,7 +1994,7 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans, if (atomic_read(&root->log_commit[(index1 + 1) % 2])) wait_log_commit(trans, root, root->log_transid - 1); - while (1) { + while (root->log_m...
2011 Aug 26
0
[PATCH] Btrfs: make some functions return void
...-int btrfs_free_log(struct btrfs_trans_handle *trans, struct btrfs_root *root) +void btrfs_free_log(struct btrfs_trans_handle *trans, struct btrfs_root *root) { if (root->log_root) { free_log_tree(trans, root->log_root); root->log_root = NULL; } - return 0; } -int btrfs_free_log_root_tree(struct btrfs_trans_handle *trans, - struct btrfs_fs_info *fs_info) +void btrfs_free_log_root_tree(struct btrfs_trans_handle *trans, + struct btrfs_fs_info *fs_info) { if (fs_info->log_root_tree) { free_log_tree(trans, fs_info->log_root_tree); fs_info->log_root_tree...
2011 Jun 09
2
[PATCH] Btrfs: turn to readonly if btrfs_start_transaction() fails
...truct btrfs_root *root); int btrfs_end_transaction_nolock(struct btrfs_trans_handle *trans, diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 592396c..189a725 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -3140,7 +3140,12 @@ int btrfs_recover_log_trees(struct btrfs_root *log_root_tree) fs_info->log_root_recovering = 1; trans = btrfs_start_transaction(fs_info->tree_root, 0); - BUG_ON(IS_ERR(trans)); + if (IS_ERR(trans)) { + btrfs_free_path(path); + fs_info->log_root_recovering = 0; + btrfs_abort_transaction(fs_info->tree_root, PTR_ERR(trans)); + return PTR_E...
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...x); ret = commit_fs_roots(trans, root); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); /* commit_fs_roots gets rid of all the tree log roots, it is now * safe to free the root of tree log roots @@ -1129,7 +1129,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans, btrfs_free_log_root_tree(trans, root->fs_info); ret = commit_cowonly_roots(trans, root); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); btrfs_prepare_extent_commit(trans, root); @@ -1162,7 +1162,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans, mutex_unlock(&root->fs_info->trans_mu...
2011 Oct 06
26
[PATCH v0 00/18] btfs: Subvolume Quota Groups
This is a first draft of a subvolume quota implementation. It is possible to limit subvolumes and any group of subvolumes and also to track the amount of space that will get freed when deleting snapshots. The current version is functionally incomplete, with the main missing feature being the initial scan and rescan of an existing filesystem. I put some effort into writing an introduction into