aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ioctl.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-06-25 16:01:31 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:03 -0400
commit89ce8a63d0c761fbb02089850605360f389477d8 (patch)
treea509b1daf6e41f7768eaf49235c573690f12ef9b /fs/btrfs/ioctl.c
parent333db94cdde9e6dfdedab9290d04d812f83e0922 (diff)
Add btrfs_end_transaction_throttle to force writers to wait for pending commits
The existing throttle mechanism was often not sufficient to prevent new writers from coming in and making a given transaction run forever. This adds an explicit wait at the end of most operations so they will allow the current transaction to close. There is no wait inside file_write, inode updates, or cow filling, all which have different deadlock possibilities. This is a temporary measure until better asynchronous commit support is added. This code leads to stalls as it waits for data=ordered writeback, and it really needs to be fixed. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r--fs/btrfs/ioctl.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 6002eb64daf9..026039a2ac58 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -164,7 +164,6 @@ fail:
164 ret = err; 164 ret = err;
165fail_commit: 165fail_commit:
166 btrfs_btree_balance_dirty(root, nr); 166 btrfs_btree_balance_dirty(root, nr);
167 btrfs_throttle(root);
168 return ret; 167 return ret;
169} 168}
170 169
@@ -206,7 +205,6 @@ static int create_snapshot(struct btrfs_root *root, char *name, int namelen)
206 205
207fail_unlock: 206fail_unlock:
208 btrfs_btree_balance_dirty(root, nr); 207 btrfs_btree_balance_dirty(root, nr);
209 btrfs_throttle(root);
210 return ret; 208 return ret;
211} 209}
212 210