aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/transaction.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r--fs/btrfs/transaction.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index 66af5140c8ce..a68779499302 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -211,11 +211,9 @@ static void throttle_on_drops(struct btrfs_root *root)
211{ 211{
212 struct btrfs_fs_info *info = root->fs_info; 212 struct btrfs_fs_info *info = root->fs_info;
213 213
214harder:
215 if (atomic_read(&info->throttles)) { 214 if (atomic_read(&info->throttles)) {
216 DEFINE_WAIT(wait); 215 DEFINE_WAIT(wait);
217 int thr; 216 int thr;
218 int harder_count = 0;
219 thr = atomic_read(&info->throttle_gen); 217 thr = atomic_read(&info->throttle_gen);
220 218
221 do { 219 do {
@@ -228,18 +226,6 @@ harder:
228 schedule(); 226 schedule();
229 finish_wait(&info->transaction_throttle, &wait); 227 finish_wait(&info->transaction_throttle, &wait);
230 } while (thr == atomic_read(&info->throttle_gen)); 228 } while (thr == atomic_read(&info->throttle_gen));
231
232 if (harder_count < 5 &&
233 info->total_ref_cache_size > 1 * 1024 * 1024) {
234 harder_count++;
235 goto harder;
236 }
237
238 if (harder_count < 10 &&
239 info->total_ref_cache_size > 5 * 1024 * 1024) {
240 harder_count++;
241 goto harder;
242 }
243 } 229 }
244} 230}
245 231