diff mbox series

[v4,58/68] btrfs: output extra info for space info update underflow

Message ID 20201021062554.68132-59-wqu@suse.com
State New, archived
Headers show
Series btrfs: add basic rw support for subpage sector size | expand

Commit Message

Qu Wenruo Oct. 21, 2020, 6:25 a.m. UTC
Signed-off-by: Qu Wenruo <wqu@suse.com>
---
 fs/btrfs/space-info.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/fs/btrfs/space-info.h b/fs/btrfs/space-info.h
index c3c64019950a..f7c3fc3a8541 100644
--- a/fs/btrfs/space-info.h
+++ b/fs/btrfs/space-info.h
@@ -106,6 +106,8 @@  btrfs_space_info_update_##name(struct btrfs_fs_info *fs_info,		\
 				      sinfo->flags, abs_bytes,		\
 				      bytes > 0);			\
 	if (bytes < 0 && sinfo->name < -bytes) {			\
+		btrfs_warn(fs_info, "bytes_%s have %llu diff %lld\n",	\
+			trace_name, sinfo->name, bytes);		\
 		WARN_ON(1);						\
 		sinfo->name = 0;					\
 		return;							\
@@ -113,7 +115,7 @@  btrfs_space_info_update_##name(struct btrfs_fs_info *fs_info,		\
 	sinfo->name += bytes;						\
 }
 
-DECLARE_SPACE_INFO_UPDATE(bytes_may_use, "space_info");
+DECLARE_SPACE_INFO_UPDATE(bytes_may_use, "may_use");
 DECLARE_SPACE_INFO_UPDATE(bytes_pinned, "pinned");
 
 int btrfs_init_space_info(struct btrfs_fs_info *fs_info);