diff options
author | Jeff Mahoney <jeffm@suse.com> | 2009-03-30 14:02:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-30 15:16:36 -0400 |
commit | 45b03d5e8e674eb6555b767e1c8eb40b671ff892 (patch) | |
tree | d74acd1be7f5102143df960e8cd692aadcc437df /fs/reiserfs/lbalance.c | |
parent | 1d889d9958490888b3fad1d486145d9a03559cbc (diff) |
reiserfs: rework reiserfs_warning
ReiserFS warnings can be somewhat inconsistent.
In some cases:
* a unique identifier may be associated with it
* the function name may be included
* the device may be printed separately
This patch aims to make warnings more consistent. reiserfs_warning() prints
the device name, so printing it a second time is not required. The function
name for a warning is always helpful in debugging, so it is now automatically
inserted into the output. Hans has stated that every warning should have
a unique identifier. Some cases lack them, others really shouldn't have them.
reiserfs_warning() now expects an id associated with each message. In the
rare case where one isn't needed, "" will suffice.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/reiserfs/lbalance.c')
-rw-r--r-- | fs/reiserfs/lbalance.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/reiserfs/lbalance.c b/fs/reiserfs/lbalance.c index 41bdd8c7588..381339b432e 100644 --- a/fs/reiserfs/lbalance.c +++ b/fs/reiserfs/lbalance.c | |||
@@ -1288,12 +1288,16 @@ void leaf_paste_entries(struct buffer_info *bi, | |||
1288 | prev = (i != 0) ? deh_location(&(deh[i - 1])) : 0; | 1288 | prev = (i != 0) ? deh_location(&(deh[i - 1])) : 0; |
1289 | 1289 | ||
1290 | if (prev && prev <= deh_location(&(deh[i]))) | 1290 | if (prev && prev <= deh_location(&(deh[i]))) |
1291 | reiserfs_warning(NULL, | 1291 | reiserfs_warning(NULL, "vs-10240", |
1292 | "vs-10240: leaf_paste_entries: directory item (%h) corrupted (prev %a, cur(%d) %a)", | 1292 | "directory item (%h) " |
1293 | "corrupted (prev %a, " | ||
1294 | "cur(%d) %a)", | ||
1293 | ih, deh + i - 1, i, deh + i); | 1295 | ih, deh + i - 1, i, deh + i); |
1294 | if (next && next >= deh_location(&(deh[i]))) | 1296 | if (next && next >= deh_location(&(deh[i]))) |
1295 | reiserfs_warning(NULL, | 1297 | reiserfs_warning(NULL, "vs-10250", |
1296 | "vs-10250: leaf_paste_entries: directory item (%h) corrupted (cur(%d) %a, next %a)", | 1298 | "directory item (%h) " |
1299 | "corrupted (cur(%d) %a, " | ||
1300 | "next %a)", | ||
1297 | ih, i, deh + i, deh + i + 1); | 1301 | ih, i, deh + i, deh + i + 1); |
1298 | } | 1302 | } |
1299 | } | 1303 | } |