btrfs: add a trace class for dumping the current ENOSPC state
authorJosef Bacik <josef@toxicpanda.com>
Fri, 9 Oct 2020 13:28:29 +0000 (09:28 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 8 Feb 2021 21:58:59 +0000 (22:58 +0100)
commite5ad49e215a07562f0a765c68161d13d7c23d8d1
tree71716a73c20d84148fdad60307d8e568accd795e
parent4b02b00fe5f1377f3dbfb168dfcfebf3d7a9632f
btrfs: add a trace class for dumping the current ENOSPC state

Often when I'm debugging ENOSPC related issues I have to resort to
printing the entire ENOSPC state with trace_printk() in different spots.
This gets pretty annoying, so add a trace state that does this for us.
Then add a trace point at the end of preemptive flushing so you can see
the state of the space_info when we decide to exit preemptive flushing.
This helped me figure out we weren't kicking in the preemptive flushing
soon enough.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/space-info.c
include/trace/events/btrfs.h