diff options
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/extent-tree.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index cef355f1328a..28c4809851a5 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/rcupdate.h> | 23 | #include <linux/rcupdate.h> |
24 | #include <linux/kthread.h> | 24 | #include <linux/kthread.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/ratelimit.h> | ||
26 | #include "compat.h" | 27 | #include "compat.h" |
27 | #include "hash.h" | 28 | #include "hash.h" |
28 | #include "ctree.h" | 29 | #include "ctree.h" |
@@ -5783,7 +5784,13 @@ use_block_rsv(struct btrfs_trans_handle *trans, | |||
5783 | if (!ret) | 5784 | if (!ret) |
5784 | return block_rsv; | 5785 | return block_rsv; |
5785 | if (ret) { | 5786 | if (ret) { |
5786 | WARN_ON(1); | 5787 | static DEFINE_RATELIMIT_STATE(_rs, |
5788 | DEFAULT_RATELIMIT_INTERVAL, | ||
5789 | /*DEFAULT_RATELIMIT_BURST*/ 2); | ||
5790 | if (__ratelimit(&_rs)) { | ||
5791 | printk(KERN_DEBUG "btrfs: block rsv returned %d\n", ret); | ||
5792 | WARN_ON(1); | ||
5793 | } | ||
5787 | ret = reserve_metadata_bytes(root, block_rsv, blocksize, 0); | 5794 | ret = reserve_metadata_bytes(root, block_rsv, blocksize, 0); |
5788 | if (!ret) { | 5795 | if (!ret) { |
5789 | return block_rsv; | 5796 | return block_rsv; |