Displaying 7 results from an estimated 7 matches for "btrfs_start_delalloc_inod".
Did you mean:
btrfs_start_delalloc_inodes
2013 Jan 21
1
btrfs_start_delalloc_inodes livelocks when creating snapshot under IO
Greetings all,
I see the following issue during snap creation under IO:
Transaction commit calls btrfs_start_delalloc_inodes() that locks the
delalloc_inodes list, fetches the first inode, unlocks the list,
triggers btrfs_alloc_delalloc_work/btrfs_queue_worker for this inode
and then locks the list again. Then it checks the head of the list
again. In my case, this is always exactly the same inode. As a result,
this fun...
2009 Jan 24
2
[PATCH] btrfs: flushoncommit mount option
...AD(&dirty_fs_roots);
mutex_lock(&root->fs_info->trans_mutex);
@@ -952,7 +953,9 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans,
mutex_unlock(&root->fs_info->trans_mutex);
- if (snap_pending) {
+ if (ordered || snap_pending) {
+ if (ordered)
+ btrfs_start_delalloc_inodes(root);
ret = btrfs_wait_ordered_extents(root, 1);
BUG_ON(ret);
}
--
1.5.6.5
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
2012 Nov 01
0
[PATCH 1/5] Btrfs: fix joining the same transaction handler more than 2 times
If we flush inodes with pending delalloc in a transaction, we may join
the same transaction handler more than 2 times.
The reason is:
Task use_count of trans handle
commit_transaction 1
|-> btrfs_start_delalloc_inodes 1
|-> run_delalloc_nocow 1
|-> join_transaction 2
|-> cow_file_range 2
|-> join_transaction 3
In fact, cow_file_range needn''t join the transaction again because the caller
have joined the transaction, so we fix this problem by this way.
Reported-by: Liu Bo <...
2012 Aug 24
4
[PATCH] Btrfs: pass lockdep rwsem metadata to async commit transaction
The freeze rwsem is taken by sb_start_intwrite() and dropped during the
commit_ or end_transaction(). In the async case, that happens in a worker
thread. Tell lockdep the calling thread is releasing ownership of the
rwsem and the async thread is picking it up.
Josef and I worked out a more complicated solution that made the async
commit thread join and potentially get a later transaction, but
2012 Apr 26
7
[PATCH 2/4] Btrfs: fix deadlock on sb->s_umount when doing umount
...We needn''t worry the filesystem going from r/w to r/o though
+ * we don''t acquire ->s_umount mutex, because the filesystem
+ * should guarantee the delalloc inodes list be empty after
+ * the filesystem is readonly(all dirty pages are written to
+ * the disk).
+ */
+ btrfs_start_delalloc_inodes(root, 0);
+ btrfs_wait_ordered_extents(root, 0, 0);
+ }
+}
+
/*
* shrink metadata reservation for delalloc
*/
@@ -3624,8 +3646,7 @@ static int shrink_delalloc(struct btrfs_root *root, u64 to_reclaim,
smp_mb();
nr_pages = min_t(unsigned long, nr_pages,
root->fs_info->de...
2011 Aug 26
0
[PATCH] Btrfs: make some functions return void
...->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_handle *trans,
/*
* interface function to delete...
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...= 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->num_joined != joined));
ret = create_pendin...