search for: btrfs_sync_log

Displaying 10 results from an estimated 10 matches for "btrfs_sync_log".

2013 Jan 10
0
[PATCH 03/11] Btrfs: use atomic for fs_info->last_trans_log_full_commit
...tex); - if (root->fs_info->last_trans_log_full_commit != + if (atomic64_read(&root->fs_info->last_trans_log_full_commit) != trans->transid && atomic_read(&root->log_writers)) schedule(); mutex_lock(&root->log_mutex); @@ -2306,7 +2306,8 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans, } /* bail out if we need to do a full commit */ - if (root->fs_info->last_trans_log_full_commit == trans->transid) { + if (atomic64_read(&root->fs_info->last_trans_log_full_commit) == + trans->transid) { ret = -EAGAIN; mutex_un...
2009 Oct 08
0
[PATCH] Btrfs: optimize fsync for the single writer case
...t;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_multiple_pids) { unsigned long batch = root->log_batch; mutex_unlock(&root->log_mutex);...
2012 Apr 17
2
Kernel bug in BTRFS (kernel 3.3.0)
...6]  ffff881010d59000 ffff881000000001 ffff880811d87400 ffff88100ef81f38 [370517.205849]  00000013c4a03fff ffff880ff058d000 ffff880811d87400 ffff881002a915a0 [370517.205984] Call Trace: [370517.206049]  [<ffffffff81389e7e>] write_ctree_super+0xe/0x10 [370517.206119]  [<ffffffff813c24b4>] btrfs_sync_log+0x424/0x5c0 [370517.206190]  [<ffffffff8139e9cb>] btrfs_sync_file+0x17b/0x1e0 [370517.206260]  [<ffffffff81160703>] vfs_fsync_range+0x23/0x30 [370517.206329]  [<ffffffff8116076c>] generic_write_sync+0x3c/0x40 [370517.206399]  [<ffffffff8139f4a7>] btrfs_file_aio_write+0x317/0...
2011 Jun 21
19
[GIT PULL v3] Btrfs: improve write ahead log with sub transaction
I''ve been working to try to improve the write-ahead log''s performance, and I found that the bottleneck addresses in the checksum items, especially when we want to make a random write on a large file, e.g a 4G file. Then a idea for this suggested by Chris is to use sub transaction ids and just to log the part of inode that had changed since either the last log commit or the last
2013 Oct 25
0
[PATCH] Btrfs: return an error from btrfs_wait_ordered_range
...(ret > 0) { - /* - * If we didn''t already wait for ordered extents we need - * to do that now. - */ - if (!full_sync) - btrfs_wait_ordered_range(inode, start, - end - start + 1); - ret = btrfs_commit_transaction(trans, root); - } else { + if (!ret) { ret = btrfs_sync_log(trans, root); - if (ret == 0) { + if (!ret) { ret = btrfs_end_transaction(trans, root); - } else { - if (!full_sync) - btrfs_wait_ordered_range(inode, start, - end - - start + 1); - ret = btrfs_commit_transaction(trans, root); + goto out; } } + if (!f...
2013 Oct 18
11
[GIT PULL] Btrfs
Hi Linus, My for-linus branch has a one line fix: git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus Sage hit a deadlock with ceph on btrfs, and Josef tracked it down to a regression in our initial rc1 pull. When doing nocow writes we were sometimes starting a transaction with locks held. Josef Bacik (1) commits (+1/-0): Btrfs: release path before starting
2011 Aug 26
0
[PATCH] Btrfs: make some functions return void
...fo->log_root_tree) { free_log_tree(trans, fs_info->log_root_tree); fs_info->log_root_tree = NULL; } - return 0; } /* diff --git a/fs/btrfs/tree-log.h b/fs/btrfs/tree-log.h index 2270ac5..1055a78 100644 --- a/fs/btrfs/tree-log.h +++ b/fs/btrfs/tree-log.h @@ -24,9 +24,9 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans, struct btrfs_root *root); -int btrfs_free_log(struct btrfs_trans_handle *trans, struct btrfs_root *root); -int btrfs_free_log_root_tree(struct btrfs_trans_handle *trans, - struct btrfs_fs_info *fs_info); +void btrfs_free_log(struct btrfs_trans_handle *...
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...odes[*level] = NULL; @@ -1856,7 +1856,7 @@ static int walk_log_tree(struct btrfs_trans_handle *trans, BTRFS_TREE_LOG_OBJECTID); ret = btrfs_free_reserved_extent(log, next->start, next->len); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); } } @@ -2000,7 +2000,7 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans, * wait for them until later. */ ret = btrfs_write_marked_extents(log, &log->dirty_log_pages, mark); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); btrfs_set_root_node(&log->root_item, log->node); @@ -2070,7 +2070,7 @@ int btrfs_sync_log(...
2012 Oct 23
0
IO error after s2ram resume; device stays open
...0x7f/0xc0 [32021.732903] [<ffffffff8105b946>] warn_slowpath_fmt+0x46/0x50 [32021.732924] [<ffffffffa017533a>] ? btrfs_wait_marked_extents+0x9a/0xc0 [btrfs] [32021.732937] [<ffffffffa014de4d>] __btrfs_abort_transaction+0xad/0xc0 [btrfs] [32021.732957] [<ffffffffa01a8225>] btrfs_sync_log+0x545/0x5d0 [btrfs] [32021.732976] [<ffffffffa0184b5f>] btrfs_sync_file+0x1ef/0x220 [btrfs] [32021.732982] [<ffffffff811bc310>] do_fsync+0x50/0x80 [32021.732987] [<ffffffff811bc580>] sys_fsync+0x10/0x20 [32021.732992] [<ffffffff816226e9>] system_call_fastpath+0x16/0x1b [...
2011 Mar 08
6
[PATCH v1 0/6] btrfs: scrub
This series adds an initial implementation for scrub. It works quite straightforward. The usermode issues an ioctl for each device in the fs. For each device, it enumerates the allocated device chunks. For each chunk, the contained extents are enumerated and the data checksums fetched. The extents are read sequentially and the checksums verified. If an error occurs (checksum or EIO), a good copy