diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-08-01 13:11:41 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:06 -0400 |
commit | 18e35e0ab337ec99c7e03e9ae917745a352c0bb1 (patch) | |
tree | b262ecafb28e5a3e533cae2aa46214bf813bdb2b /fs/btrfs/transaction.c | |
parent | f87f057b49ee52cf5c627ab27a706e3252767c9f (diff) |
Btrfs: Throttle less often waiting for snapshots to delete
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r-- | fs/btrfs/transaction.c | 14 |
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 | ||
214 | harder: | ||
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 | ||