search for: flush_on_commit

Displaying 5 results from an estimated 5 matches for "flush_on_commit".

2010 Oct 26
0
[PATCH v2] Btrfs: fix deadlock in btrfs_commit_transaction
...saction(struct btrfs_trans_handle *trans, snap_pending = 1; WARN_ON(cur_trans != trans->transaction); - if (cur_trans->num_writers > 1) - timeout = MAX_SCHEDULE_TIMEOUT; - else if (should_grow) - timeout = 1; - mutex_unlock(&root->fs_info->trans_mutex); if (flush_on_commit || snap_pending) { @@ -1089,8 +1084,10 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans, TASK_UNINTERRUPTIBLE); smp_mb(); - if (cur_trans->num_writers > 1 || should_grow) - schedule_timeout(timeout); + if (cur_trans->num_writers > 1) + schedule_timeout(MA...
2010 Nov 25
0
[RFC PATCH 2/4] Btrfs: add MS_RDONLY to avoid backgroud writeback
...s(+), 0 deletions(-) diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 1fffbc0..45c76b9 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -1188,6 +1188,13 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans, unsigned long now = get_seconds(); int flush_on_commit = btrfs_test_opt(root, FLUSHONCOMMIT); + /* + * Since some error may force btrfs readonly, this can + * avoid backgroud writeback. + */ + if (root->fs_info->sb->s_flags & MS_RDONLY) + return 0; + btrfs_run_ordered_operations(root, 0); /* make a pass through all the delayed...
2010 Oct 25
14
[PATCH 0/6] Btrfs commit fixes, async subvol operations
Hi Chris, This is the extent of my current queue of Btrfs snapshot/subvol/commit stuff. Most of these were posted several months ago. Can be sent upstream during this merge window? Not having this functionality is becoming a bit of a roadblock for our efforts to keep the Ceph data in a consistent state. These patches are also available from
2011 Aug 26
0
[PATCH] Btrfs: make some functions return void
...t) { spin_lock(&root->fs_info->trans_lock); list_add(&root->root_list, &root->fs_info->dead_roots); spin_unlock(&root->fs_info->trans_lock); - return 0; } /* @@ -1232,8 +1231,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans, if (flush_on_commit || snap_pending) { btrfs_start_delalloc_inodes(root, 1); - ret = btrfs_wait_ordered_extents(root, 0, 1); - BUG_ON(ret); + btrfs_wait_ordered_extents(root, 0, 1); } ret = btrfs_run_delayed_items(trans, root); @@ -1396,7 +1394,7 @@ int btrfs_commit_transaction(struct btrfs_trans_han...
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...end_transaction(trans, root); ret = wait_for_commit(root, cur_trans); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); mutex_lock(&root->fs_info->trans_mutex); put_transaction(cur_trans); @@ -1073,7 +1073,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans, if (flush_on_commit || snap_pending) { btrfs_start_delalloc_inodes(root, 1); ret = btrfs_wait_ordered_extents(root, 0, 1); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); } /* @@ -1098,10 +1098,10 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans, (should_grow && cur_trans-&g...