linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] 2.6.15-mm3 - make useless quota error message informative
@ 2006-01-12 20:44 Valdis.Kletnieks
  2006-01-13 15:02 ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Valdis.Kletnieks @ 2006-01-12 20:44 UTC (permalink / raw)
  To: jack, Linus Torvalds, Andrew Morton; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 972 bytes --]

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>
---
--- linux-2.6.15-mm3/fs/quota_v2.c.quot-bug	2006-01-02 22:21:10.000000000 -0500
+++ linux-2.6.15-mm3/fs/quota_v2.c	2006-01-12 15:26:43.000000000 -0500
@@ -35,7 +35,8 @@ static int v2_check_quota_file(struct su
  
 	size = sb->s_op->quota_read(sb, type, (char *)&dqhead, sizeof(struct v2_disk_dqheader), 0);
 	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;
 	}
 	if (le32_to_cpu(dqhead.dqh_magic) != quota_magics[type] ||
 

[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] 2.6.15-mm3 - make useless quota error message informative
  2006-01-12 20:44 [PATCH] 2.6.15-mm3 - make useless quota error message informative Valdis.Kletnieks
@ 2006-01-13 15:02 ` Jan Kara
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2006-01-13 15:02 UTC (permalink / raw)
  To: Valdis.Kletnieks; +Cc: Linus Torvalds, Andrew Morton, linux-kernel

> 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>
> ---
> --- linux-2.6.15-mm3/fs/quota_v2.c.quot-bug	2006-01-02 22:21:10.000000000 -0500
> +++ linux-2.6.15-mm3/fs/quota_v2.c	2006-01-12 15:26:43.000000000 -0500
> @@ -35,7 +35,8 @@ static int v2_check_quota_file(struct su
>   
>  	size = sb->s_op->quota_read(sb, type, (char *)&dqhead, sizeof(struct v2_disk_dqheader), 0);
>  	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;
>  	}
>  	if (le32_to_cpu(dqhead.dqh_magic) != quota_magics[type] ||
>  

  The patch is fine. Thanks for fixing. I wonder how I managed to write such
error message ;).

									Honza

-- 
Jan Kara <jack@suse.cz>
SuSE CR Labs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-01-13 15:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-12 20:44 [PATCH] 2.6.15-mm3 - make useless quota error message informative Valdis.Kletnieks
2006-01-13 15:02 ` Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).