]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: report exact callsite where transaction abort occurs
authorDavid Sterba <dsterba@suse.cz>
Fri, 24 Apr 2015 17:11:54 +0000 (19:11 +0200)
committerChris Mason <clm@fb.com>
Wed, 3 Jun 2015 02:34:34 +0000 (19:34 -0700)
commitecdf0daa84e0aa0f7c4e13115b7547b8dd4b2433
treeccdebfa333496a6cc34fd7be4f3e908cdc97d29e
parentd5cb2974d4a7ce96e7066e59f7456ab116933e4d
btrfs: report exact callsite where transaction abort occurs

WARN is called from a single location and all bugreports say that's in
super.c __btrfs_abort_transaction. This is slightly confusing as we'd
rather want to know the exact callsite. Whereas this information is
printed in the syslog below the stacktrace, this requires further look
and we usually see only the headline from WARNING.

Moving the WARN into the macro has to inline some code and increases
code by a few kilobytes:

  text    data     bss     dec     hex filename
835481   20305   14120  869906   d4612 btrfs.ko.before
842883   20305   14120  877308   d62fc btrfs.ko.after

The delta is +7k (130+ calls), measured on 3.19 x86_64, distro config.
The increase is not small and could lead to worse icache use. The code
is on error/exit paths that can be recognized by compiler as cold and
moved out of the way so the impact is speculated to be low, if
measurable at all.

Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/ctree.h
fs/btrfs/super.c