diff options
author | Dave Chinner <dchinner@redhat.com> | 2015-01-21 17:29:40 -0500 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2015-01-21 17:29:40 -0500 |
commit | f19b872b086711bb4b22c3a0f52f16aa920bcc61 (patch) | |
tree | 75c9dacf4020ab9df9acfc602a9b4df1756819db /fs/xfs/xfs_inode.c | |
parent | 0d612fb570b71ea2e49554a770cff4c489018b2c (diff) |
xfs: inode unlink does not set AGI buffer type
This leads to log recovery throwing errors like:
XFS (md0): Mounting V5 Filesystem
XFS (md0): Starting recovery (logdev: internal)
XFS (md0): Unknown buffer type 0!
XFS (md0): _xfs_buf_ioapply: no ops on block 0xaea8802/0x1
ffff8800ffc53800: 58 41 47 49 .....
Which is the AGI buffer magic number.
Ensure that we set the type appropriately in both unlink list
addition and removal.
cc: <stable@vger.kernel.org> # 3.10 to current
Tested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r-- | fs/xfs/xfs_inode.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index 41f804e740d7..d745e1a9bf2e 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c | |||
@@ -1995,6 +1995,7 @@ xfs_iunlink( | |||
1995 | agi->agi_unlinked[bucket_index] = cpu_to_be32(agino); | 1995 | agi->agi_unlinked[bucket_index] = cpu_to_be32(agino); |
1996 | offset = offsetof(xfs_agi_t, agi_unlinked) + | 1996 | offset = offsetof(xfs_agi_t, agi_unlinked) + |
1997 | (sizeof(xfs_agino_t) * bucket_index); | 1997 | (sizeof(xfs_agino_t) * bucket_index); |
1998 | xfs_trans_buf_set_type(tp, agibp, XFS_BLFT_AGI_BUF); | ||
1998 | xfs_trans_log_buf(tp, agibp, offset, | 1999 | xfs_trans_log_buf(tp, agibp, offset, |
1999 | (offset + sizeof(xfs_agino_t) - 1)); | 2000 | (offset + sizeof(xfs_agino_t) - 1)); |
2000 | return 0; | 2001 | return 0; |
@@ -2086,6 +2087,7 @@ xfs_iunlink_remove( | |||
2086 | agi->agi_unlinked[bucket_index] = cpu_to_be32(next_agino); | 2087 | agi->agi_unlinked[bucket_index] = cpu_to_be32(next_agino); |
2087 | offset = offsetof(xfs_agi_t, agi_unlinked) + | 2088 | offset = offsetof(xfs_agi_t, agi_unlinked) + |
2088 | (sizeof(xfs_agino_t) * bucket_index); | 2089 | (sizeof(xfs_agino_t) * bucket_index); |
2090 | xfs_trans_buf_set_type(tp, agibp, XFS_BLFT_AGI_BUF); | ||
2089 | xfs_trans_log_buf(tp, agibp, offset, | 2091 | xfs_trans_log_buf(tp, agibp, offset, |
2090 | (offset + sizeof(xfs_agino_t) - 1)); | 2092 | (offset + sizeof(xfs_agino_t) - 1)); |
2091 | } else { | 2093 | } else { |