diff options
author | Valdis.Kletnieks@vt.edu <Valdis.Kletnieks@vt.edu> | 2006-01-14 16:21:10 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-14 21:27:12 -0500 |
commit | 3135806358e8d3d8ac61a13f58f148d0a98a7b9b (patch) | |
tree | 42723acbd28e943267cc303a45380671a925c29a /fs/quota_v2.c | |
parent | d9975d6ba0668aa21d9f0c565d7df56c805c8d5c (diff) |
[PATCH] quota: make useless quota error message informative
fs/quota_v2.c can, under some conditions, issue a kernel message that says,
in totality, 'failed read'. This patch does the following:
1) Gives a hint who issued the error message, so people reading the logs
don't have to go grepping the entire kernel tree (with 11 false
positives).
2) Say what amount of data we expected, and actually got.
Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Cc: Jan Kara <jack@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/quota_v2.c')
-rw-r--r-- | fs/quota_v2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/quota_v2.c b/fs/quota_v2.c index 7afcbb1b9376..a4ef91bb4f3b 100644 --- a/fs/quota_v2.c +++ b/fs/quota_v2.c | |||
@@ -35,7 +35,8 @@ static int v2_check_quota_file(struct super_block *sb, int type) | |||
35 | 35 | ||
36 | size = sb->s_op->quota_read(sb, type, (char *)&dqhead, sizeof(struct v2_disk_dqheader), 0); | 36 | size = sb->s_op->quota_read(sb, type, (char *)&dqhead, sizeof(struct v2_disk_dqheader), 0); |
37 | if (size != sizeof(struct v2_disk_dqheader)) { | 37 | if (size != sizeof(struct v2_disk_dqheader)) { |
38 | printk("failed read\n"); | 38 | printk("quota_v2: failed read expected=%d got=%d\n", |
39 | sizeof(struct v2_disk_dqheader), size); | ||
39 | return 0; | 40 | return 0; |
40 | } | 41 | } |
41 | if (le32_to_cpu(dqhead.dqh_magic) != quota_magics[type] || | 42 | if (le32_to_cpu(dqhead.dqh_magic) != quota_magics[type] || |