Displaying 2 results from an estimated 2 matches for "new_trans_lock".
2010 Apr 19
0
[PATCH 08/12] Btrfs: Introduce global metadata reservation
...();
- if (root->fs_info->closing)
- break;
-
delay = HZ * 30;
vfs_check_frozen(root->fs_info->sb, SB_FREEZE_WRITE);
- mutex_lock(&root->fs_info->transaction_kthread_mutex);
- mutex_lock(&root->fs_info->trans_mutex);
+ spin_lock(&root->fs_info->new_trans_lock);
cur = root->fs_info->running_transaction;
if (!cur) {
- mutex_unlock(&root->fs_info->trans_mutex);
+ spin_unlock(&root->fs_info->new_trans_lock);
goto sleep;
}
now = get_seconds();
- if (now < cur->start_time || now - cur->start_time <...
2009 Aug 24
0
[PATCH] Btrfs: proper metadata -ENOSPC handling
...that would be needed to commit the transaction so we make
+ * sure that we can always commit.
+ */
+ cur_trans->max_bytes = btrfs_metadata_free_space(root);
+ BUG_ON(cur_trans->max_bytes < root_bytes);
+ cur_trans->max_bytes -= root_bytes;
+
spin_lock(&root->fs_info->new_trans_lock);
root->fs_info->running_transaction = cur_trans;
spin_unlock(&root->fs_info->new_trans_lock);
@@ -164,50 +208,265 @@ static void wait_current_trans(struct btrfs_root *root)
}
}
-static struct btrfs_trans_handle *start_transaction(struct btrfs_root *root,
- int n...