diff options
| author | Qu Wenruo <wqu@suse.com> | 2018-10-24 20:24:01 +0800 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2018-12-17 14:51:25 +0100 |
| commit | 9f9b8e8d0ebe1af42ddd3c86e12569c53914a89d (patch) | |
| tree | 6d845a630f5a031fc0ef2d365eb243579b2185ba /tools/perf/scripts/python/exported-sql-viewer.py | |
| parent | 85dd506c8e022a5c5555ad22decfa0abf93a5d64 (diff) | |
| download | cachepc-linux-9f9b8e8d0ebe1af42ddd3c86e12569c53914a89d.tar.gz cachepc-linux-9f9b8e8d0ebe1af42ddd3c86e12569c53914a89d.zip | |
btrfs: extent-tree: Detect bytes_may_use underflow earlier
Although we have space_info::bytes_may_use underflow detection in
btrfs_free_reserved_data_space_noquota(), we have more callers who are
subtracting number from space_info::bytes_may_use.
So instead of doing underflow detection for every caller, introduce a
new wrapper update_bytes_may_use() to replace open coded bytes_may_use
modifiers.
This also introduce a macro to declare more wrappers, but currently
space_info::bytes_may_use is the mostly interesting one.
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions
