From 17b150c600a9d06b2d15292ef4cf2a27ff1d221d Mon Sep 17 00:00:00 2001 From: Tomohiro Kusumi Date: Sun, 16 Apr 2017 00:04:40 +0300 Subject: [PATCH] sys/vfs/hammer: Use hammer_crc_t Use hammer_crc_t rather than uint32_t which is the same thing. This commit doesn't (and shouldn't) replace CRC variables that are not HAMMER's ondisk CRC field or ioctl, but for general purpose. --- sbin/hammer/cmd_show.c | 4 ++-- sys/vfs/hammer/hammer_ioctl.h | 2 +- sys/vfs/hammer/hammer_mirror.c | 2 +- sys/vfs/hammer/hammer_reblock.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sbin/hammer/cmd_show.c b/sbin/hammer/cmd_show.c index 2610735e04..5d811ca814 100644 --- a/sbin/hammer/cmd_show.c +++ b/sbin/hammer/cmd_show.c @@ -623,7 +623,7 @@ static const char * check_data_crc(hammer_btree_elm_t elm, const char **whichp) { - uint32_t crc; + hammer_crc_t crc; *whichp = ""; if (elm->leaf.data_offset == 0 || elm->leaf.data_len == 0) @@ -685,8 +685,8 @@ __get_buf_crc(hammer_btree_leaf_elm_t leaf, crc32_ext_fn f) { buffer_info_t data_buffer = NULL; hammer_off_t buf_offset; + hammer_crc_t crc = 0; int32_t buf_len, len; - uint32_t crc = 0; char *ptr; buf_offset = leaf->data_offset; diff --git a/sys/vfs/hammer/hammer_ioctl.h b/sys/vfs/hammer/hammer_ioctl.h index 39bb8265d9..2d29800574 100644 --- a/sys/vfs/hammer/hammer_ioctl.h +++ b/sys/vfs/hammer/hammer_ioctl.h @@ -286,7 +286,7 @@ struct hammer_ioc_mirror_rw { */ typedef struct hammer_ioc_mrecord_head { uint32_t signature; /* signature for byte order */ - uint32_t rec_crc; + hammer_crc_t rec_crc; uint32_t rec_size; uint32_t type; /* extended */ diff --git a/sys/vfs/hammer/hammer_mirror.c b/sys/vfs/hammer/hammer_mirror.c index abcb941aa0..164776f1ef 100644 --- a/sys/vfs/hammer/hammer_mirror.c +++ b/sys/vfs/hammer/hammer_mirror.c @@ -84,7 +84,7 @@ hammer_ioc_mirror_read(hammer_transaction_t trans, hammer_inode_t ip, int eatdisk; int mrec_flags; uint32_t localization; - uint32_t rec_crc; + hammer_crc_t rec_crc; localization = pfs_to_lo(mirror->pfs_id); diff --git a/sys/vfs/hammer/hammer_reblock.c b/sys/vfs/hammer/hammer_reblock.c index af488a7ff4..53c986e1b2 100644 --- a/sys/vfs/hammer/hammer_reblock.c +++ b/sys/vfs/hammer/hammer_reblock.c @@ -457,7 +457,7 @@ hammer_reblock_data(struct hammer_ioc_reblock *reblock, hammer_buffer_t data_buffer = NULL; hammer_off_t odata_offset; hammer_off_t ndata_offset; - uint32_t ncrc; + hammer_crc_t ncrc; int error; void *ndata; -- 2.11.4.GIT