XFS bug in log recover with quota (bugzilla id 855)
commit64b220304ef04ce44243aae5f477407a7dc26fa6
authorJan Rekorajski <baggins@sith.mimuw.edu.pl>
Mon, 16 Nov 2009 11:57:02 +0000 (16 11:57 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 6 Jan 2010 22:26:44 +0000 (6 14:26 -0800)
tree4d27ef7f92a6da6fee1fa93d8bf7a351bdb08d39
parent1bb36e83e350d997fb109b77e41bf4dce57ffe58
XFS bug in log recover with quota (bugzilla id 855)

commit 8ec6dba2581754e375be66f7bedd708d856d8b30 upstream.

Hi,
I was hit by a bug in linux 2.6.31 when XFS is not able to recover the
log after a crash if fs was mounted with quotas. Gory details in XFS
bugzilla: http://oss.sgi.com/bugzilla/show_bug.cgi?id=855.

It looks like wrong struct is used in buffer length check, and the following
patch should fix the problem.

xfs_dqblk_t has a size of 104+32 bytes, while xfs_disk_dquot_t is 104 bytes
long, and this is exactly what I see in system logs - "XFS: dquot too small
(104) in xlog_recover_do_dquot_trans."

Signed-off-by: Jan Rekorajski <baggins@sith.mimuw.edu.pl>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
Cc: Simon Kirby <sim@hostway.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/xfs/xfs_log_recover.c