diff options
author | Dave Chinner <dchinner@redhat.com> | 2013-04-03 09:11:13 +0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-04-21 23:54:46 +0400 |
commit | 4e0e6040c4052aff15a494ac05778f4086d24c33 (patch) | |
tree | 6116acb302eb4be87e0193cb7476812a4cbddaac /fs/xfs/xfs_log_recover.c | |
parent | ee1a47ab0e77600fcbdf1c87d461bd8f3f63150d (diff) | |
download | linux-4e0e6040c4052aff15a494ac05778f4086d24c33.tar.xz |
xfs: add CRC checks to the AGF
The AGF already has some self identifying fields (e.g. the sequence
number) so we only need to add the uuid to it to identify the
filesystem it belongs to. The location is fixed based on the
sequence number, so there's no need to add a block number, either.
Hence the only additional fields are the CRC and LSN fields. These
are unlogged, so place some space between the end of the logged
fields and them so that future expansion of the AGF for logged
fields can be placed adjacent to the existing logged fields and
hence not complicate the field-derived range based logging we
currently have.
Based originally on a patch from myself, modified further by
Christoph Hellwig and then modified again to fit into the
verifier structure with additional fields by myself. The multiple
signed-off-by tags indicate the age and history of this patch.
Signed-off-by: Dave Chinner <dgc@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_log_recover.c')
-rw-r--r-- | fs/xfs/xfs_log_recover.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 3762ce2e99fc..dadf24566d16 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c @@ -1953,6 +1953,14 @@ xlog_recover_do_reg_buffer( break; } break; + case XFS_BLF_AGF_BUF: + if (*(__be32 *)bp->b_addr != cpu_to_be32(XFS_AGF_MAGIC)) { + xfs_warn(mp, "Bad AGF block magic!"); + ASSERT(0); + break; + } + bp->b_ops = &xfs_agf_buf_ops; + break; default: break; } |