diff options
author | Simon Kirby <sim@hostway.ca> | 2013-03-19 23:41:23 +0100 |
---|---|---|
committer | Josef Bacik <jbacik@fusionio.com> | 2013-05-06 21:54:23 +0200 |
commit | c2cf52eb71aeb902682e0c1fa29e4e9e4a7f4ffc (patch) | |
tree | 6c62e02e87bc92eb8eb66bf4c0fbebc00b64a1e5 /fs/btrfs/transaction.c | |
parent | btrfs: update kconfig title (diff) | |
download | linux-c2cf52eb71aeb902682e0c1fa29e4e9e4a7f4ffc.tar.xz linux-c2cf52eb71aeb902682e0c1fa29e4e9e4a7f4ffc.zip |
Btrfs: Include the device in most error printk()s
With more than one btrfs volume mounted, it can be very difficult to find
out which volume is hitting an error. btrfs_error() will print this, but
it is currently rigged as more of a fatal error handler, while many of
the printk()s are currently for debugging and yet-unhandled cases.
This patch just changes the functions where the device information is
already available. Some cases remain where the root or fs_info is not
passed to the function emitting the error.
This may introduce some confusion with volumes backed by multiple devices
emitting errors referring to the primary device in the set instead of the
one on which the error occurred.
Use btrfs_printk(fs_info, format, ...) rather than writing the device
string every time, and introduce macro wrappers ala XFS for brevity.
Since the function already cannot be used for continuations, print a
newline as part of the btrfs_printk() message rather than at each caller.
Signed-off-by: Simon Kirby <sim@hostway.ca>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r-- | fs/btrfs/transaction.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 5a5ea99f29ed..9940fd90a958 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -1864,7 +1864,7 @@ cleanup_transaction: btrfs_qgroup_free(root, trans->qgroup_reserved); trans->qgroup_reserved = 0; } - btrfs_printk(root->fs_info, "Skipping commit of aborted transaction\n"); + btrfs_warn(root->fs_info, "Skipping commit of aborted transaction."); if (current->journal_info == trans) current->journal_info = NULL; cleanup_transaction(trans, root, ret); |