diff options
author | Jan Rekorajski <baggins@sith.mimuw.edu.pl> | 2009-11-16 06:57:02 -0500 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2009-11-17 11:26:38 -0500 |
commit | 8ec6dba2581754e375be66f7bedd708d856d8b30 (patch) | |
tree | d6cfdee839d6fb0b236a8d4272e607a9f5c4241c /fs/xfs/xfs_log_recover.c | |
parent | a9366e61b03f55a6e009e687ad10e706714c9907 (diff) |
XFS bug in log recover with quota (bugzilla id 855)
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>
Diffstat (limited to 'fs/xfs/xfs_log_recover.c')
-rw-r--r-- | fs/xfs/xfs_log_recover.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 1099395d7d6c..fb17f8226b09 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c | |||
@@ -1980,7 +1980,7 @@ xlog_recover_do_reg_buffer( | |||
1980 | "XFS: NULL dquot in %s.", __func__); | 1980 | "XFS: NULL dquot in %s.", __func__); |
1981 | goto next; | 1981 | goto next; |
1982 | } | 1982 | } |
1983 | if (item->ri_buf[i].i_len < sizeof(xfs_dqblk_t)) { | 1983 | if (item->ri_buf[i].i_len < sizeof(xfs_disk_dquot_t)) { |
1984 | cmn_err(CE_ALERT, | 1984 | cmn_err(CE_ALERT, |
1985 | "XFS: dquot too small (%d) in %s.", | 1985 | "XFS: dquot too small (%d) in %s.", |
1986 | item->ri_buf[i].i_len, __func__); | 1986 | item->ri_buf[i].i_len, __func__); |
@@ -2635,7 +2635,7 @@ xlog_recover_do_dquot_trans( | |||
2635 | "XFS: NULL dquot in %s.", __func__); | 2635 | "XFS: NULL dquot in %s.", __func__); |
2636 | return XFS_ERROR(EIO); | 2636 | return XFS_ERROR(EIO); |
2637 | } | 2637 | } |
2638 | if (item->ri_buf[1].i_len < sizeof(xfs_dqblk_t)) { | 2638 | if (item->ri_buf[1].i_len < sizeof(xfs_disk_dquot_t)) { |
2639 | cmn_err(CE_ALERT, | 2639 | cmn_err(CE_ALERT, |
2640 | "XFS: dquot too small (%d) in %s.", | 2640 | "XFS: dquot too small (%d) in %s.", |
2641 | item->ri_buf[1].i_len, __func__); | 2641 | item->ri_buf[1].i_len, __func__); |