From d1f822d72e0f12207ea73e9a3aa8cddf1a6dea58 Mon Sep 17 00:00:00 2001 From: Tomohiro Kusumi Date: Thu, 15 Jan 2015 23:11:17 +0900 Subject: [PATCH 1/2] sys/vfs/hammer: make variable names up-to-date with code This patch cleans up variable name that should have been changed in cb51be265fcef7ce9c6382b7b17cbccecd966d80 and 68e079b82f22658eca6cf2a929ec220d30aa6e56 in 2008 when the low level storage allocation model was changed. After these commits blockmap functions use "zone_offset" instead of "bmap_off" for function arguments, however prototypes in header files still use "bmap_off". Makes no binary difference but should be fixed for logical correctness. \# grep -rI bmap_off sys/vfs/hammer sbin/hammer sys/vfs/hammer/hammer.h: hammer_off_t bmap_off, int bytes); sys/vfs/hammer/hammer.h: hammer_off_t bmap_off, int bytes); sys/vfs/hammer/hammer.h: hammer_off_t bmap_off, int bytes); sys/vfs/hammer/hammer.h:int hammer_blockmap_getfree(hammer_mount_t hmp, hammer_off_t bmap_off, sys/vfs/hammer/hammer.h:hammer_off_t hammer_blockmap_lookup(hammer_mount_t hmp, hammer_off_t bmap_off, sys/vfs/hammer/hammer.h:hammer_off_t hammer_undo_lookup(hammer_mount_t hmp, hammer_off_t bmap_off, sbin/hammer/hammer_util.h:hammer_off_t blockmap_lookup(hammer_off_t bmap_off, --- sbin/hammer/hammer_util.h | 2 +- sys/vfs/hammer/hammer.h | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sbin/hammer/hammer_util.h b/sbin/hammer/hammer_util.h index c3987c3..87042ef 100644 --- a/sbin/hammer/hammer_util.h +++ b/sbin/hammer/hammer_util.h @@ -130,7 +130,7 @@ hammer_node_ondisk_t get_node(hammer_off_t node_offset, void rel_volume(struct volume_info *volume); void rel_buffer(struct buffer_info *buffer); -hammer_off_t blockmap_lookup(hammer_off_t bmap_off, +hammer_off_t blockmap_lookup(hammer_off_t zone_offset, struct hammer_blockmap_layer1 *layer1, struct hammer_blockmap_layer2 *layer2, int *errorp); diff --git a/sys/vfs/hammer/hammer.h b/sys/vfs/hammer/hammer.h index 7464b44..578ac7b 100644 --- a/sys/vfs/hammer/hammer.h +++ b/sys/vfs/hammer/hammer.h @@ -1347,17 +1347,17 @@ void hammer_blockmap_reserve_complete(hammer_mount_t hmp, hammer_reserve_t resv); void hammer_reserve_clrdelay(hammer_mount_t hmp, hammer_reserve_t resv); void hammer_blockmap_free(hammer_transaction_t trans, - hammer_off_t bmap_off, int bytes); + hammer_off_t zone_offset, int bytes); int hammer_blockmap_dedup(hammer_transaction_t trans, - hammer_off_t bmap_off, int bytes); + hammer_off_t zone_offset, int bytes); int hammer_blockmap_finalize(hammer_transaction_t trans, hammer_reserve_t resv, - hammer_off_t bmap_off, int bytes); -int hammer_blockmap_getfree(hammer_mount_t hmp, hammer_off_t bmap_off, + hammer_off_t zone_offset, int bytes); +int hammer_blockmap_getfree(hammer_mount_t hmp, hammer_off_t zone_offset, int *curp, int *errorp); -hammer_off_t hammer_blockmap_lookup(hammer_mount_t hmp, hammer_off_t bmap_off, +hammer_off_t hammer_blockmap_lookup(hammer_mount_t hmp, hammer_off_t zone_offset, int *errorp); -hammer_off_t hammer_undo_lookup(hammer_mount_t hmp, hammer_off_t bmap_off, +hammer_off_t hammer_undo_lookup(hammer_mount_t hmp, hammer_off_t zone3_off, int *errorp); int64_t hammer_undo_used(hammer_transaction_t trans); int64_t hammer_undo_space(hammer_transaction_t trans); -- 2.1.2