transaction.c (729f7961729a94e15bcaeeb2a407efb570091ea6) | transaction.c (8a8f4deaba79ca4cc0ae01f9a3b8f5594810de5e) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (C) 2007 Oracle. All rights reserved. 4 */ 5 6#include <linux/fs.h> 7#include <linux/slab.h> 8#include <linux/sched.h> --- 884 unchanged lines hidden (view full) --- 893 return ret; 894} 895 896void btrfs_throttle(struct btrfs_fs_info *fs_info) 897{ 898 wait_current_trans(fs_info); 899} 900 | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (C) 2007 Oracle. All rights reserved. 4 */ 5 6#include <linux/fs.h> 7#include <linux/slab.h> 8#include <linux/sched.h> --- 884 unchanged lines hidden (view full) --- 893 return ret; 894} 895 896void btrfs_throttle(struct btrfs_fs_info *fs_info) 897{ 898 wait_current_trans(fs_info); 899} 900 |
901static int should_end_transaction(struct btrfs_trans_handle *trans) | 901static bool should_end_transaction(struct btrfs_trans_handle *trans) |
902{ 903 struct btrfs_fs_info *fs_info = trans->fs_info; 904 905 if (btrfs_check_space_for_delayed_refs(fs_info)) | 902{ 903 struct btrfs_fs_info *fs_info = trans->fs_info; 904 905 if (btrfs_check_space_for_delayed_refs(fs_info)) |
906 return 1; | 906 return true; |
907 908 return !!btrfs_block_rsv_check(&fs_info->global_block_rsv, 5); 909} 910 911int btrfs_should_end_transaction(struct btrfs_trans_handle *trans) 912{ 913 struct btrfs_transaction *cur_trans = trans->transaction; 914 --- 1567 unchanged lines hidden --- | 907 908 return !!btrfs_block_rsv_check(&fs_info->global_block_rsv, 5); 909} 910 911int btrfs_should_end_transaction(struct btrfs_trans_handle *trans) 912{ 913 struct btrfs_transaction *cur_trans = trans->transaction; 914 --- 1567 unchanged lines hidden --- |