提交 31358063 编写于 作者: V Valdis.Kletnieks@vt.edu 提交者: Linus Torvalds

[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: NValdis Kletnieks <valdis.kletnieks@vt.edu>
Cc: Jan Kara <jack@ucw.cz>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 d9975d6b
...@@ -35,7 +35,8 @@ static int v2_check_quota_file(struct super_block *sb, int type) ...@@ -35,7 +35,8 @@ static int v2_check_quota_file(struct super_block *sb, int type)
size = sb->s_op->quota_read(sb, type, (char *)&dqhead, sizeof(struct v2_disk_dqheader), 0); size = sb->s_op->quota_read(sb, type, (char *)&dqhead, sizeof(struct v2_disk_dqheader), 0);
if (size != sizeof(struct v2_disk_dqheader)) { if (size != sizeof(struct v2_disk_dqheader)) {
printk("failed read\n"); printk("quota_v2: failed read expected=%d got=%d\n",
sizeof(struct v2_disk_dqheader), size);
return 0; return 0;
} }
if (le32_to_cpu(dqhead.dqh_magic) != quota_magics[type] || if (le32_to_cpu(dqhead.dqh_magic) != quota_magics[type] ||
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册