Re: [PATCH v3] xfsdump: enable dump header checksums

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2011-09-21 at 12:13 -0500, Bill Kendall wrote:
> Various structures in a dump file optionally contain a checksum, but
> the code to compute and validate the checksum has not been enabled.
> The checksum code has a negligible performance impact and so this
> patch enables the checksum code unconditionally. Also:
> 
> - make sure all header sizes are multiples of 4 bytes
>   (a requirement of the checksum routine)
> - zero structures to ensure internal padding has a known value
> - fix a bug in dump_extattr_buildrecord() which checksummed
>   the wrong header structure
> - add calc_checksum() and is_checksum_valid() routines to
>   cut down on duplicate code
> 
> Signed-off-by: Bill Kendall <wkendall@xxxxxxx>
> ---
> Changes since v2:
>     - Add an ASSERT in the checksum routines to enforce the
>       multiple of 4 requirement, rather than checking at
>       init (which may not catch all checksum users).
>     - Remove unnecessary cast from void * to u_int32_t *.
>     - Calculate endp different to avoid having to cast to
>       void * or char *.
> 
>  common/content_inode.h |   27 ++++++++++++++++
>  dump/content.c         |   78 +++++++----------------------------------------
>  restore/Makefile       |    2 +-
>  restore/content.c      |   40 ++----------------------
>  4 files changed, 44 insertions(+), 103 deletions(-)

Looks good.

Reviewed-by: Alex Elder <aelder@xxxxxxx>


_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux