From 76dbdc12d1d0cfefb0fbe477531bd5338a59204f Mon Sep 17 00:00:00 2001 From: Jiapeng Chong Date: Wed, 21 Feb 2024 17:17:31 +0800 Subject: [PATCH 01/11] dm vdo: Modify mismatched function name No functional modification involved. src/c++/vdo/base/vdo.c:276: warning: expecting prototype for vdo_read_geometry_block(). Prototype was for read_geometry_block() instead. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8273 Signed-off-by: Jiapeng Chong Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/vdo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/md/dm-vdo/vdo.c b/drivers/md/dm-vdo/vdo.c index a40f059d39b3..c161dffeb91a 100644 --- a/drivers/md/dm-vdo/vdo.c +++ b/drivers/md/dm-vdo/vdo.c @@ -267,8 +267,8 @@ static int __must_check initialize_thread_config(struct thread_count_config coun } /** - * vdo_read_geometry_block() - Synchronously read the geometry block from a vdo's underlying block - * device. + * read_geometry_block() - Synchronously read the geometry block from a vdo's underlying block + * device. * @vdo: The vdo whose geometry is to be read. * * Return: VDO_SUCCESS or an error code. From 23a53e63068190671662ac815dc27e2d35aadca6 Mon Sep 17 00:00:00 2001 From: Jiapeng Chong Date: Wed, 21 Feb 2024 17:17:30 +0800 Subject: [PATCH 02/11] dm vdo slab-depot: Modify mismatched function name No functional modification involved. src/c++/vdo/base/slab-depot.c:2042: warning: expecting prototype for vdo_find_free_block(). Prototype was for find_free_block() instead. src/c++/vdo/base/slab-depot.c:5036: warning: expecting prototype for get_depot_slab_journal_statistics(). Prototype was for get_slab_journal_statistics() instead. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8274 Signed-off-by: Jiapeng Chong Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/slab-depot.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/md/dm-vdo/slab-depot.c b/drivers/md/dm-vdo/slab-depot.c index e10c3db8e665..8c6376e79a23 100644 --- a/drivers/md/dm-vdo/slab-depot.c +++ b/drivers/md/dm-vdo/slab-depot.c @@ -2035,8 +2035,8 @@ static inline slab_block_number find_zero_byte_in_word(const u8 *word_ptr, } /** - * vdo_find_free_block() - Find the first block with a reference count of zero in the specified - * range of reference counter indexes. + * find_free_block() - Find the first block with a reference count of zero in the specified + * range of reference counter indexes. * @slab: The slab counters to scan. * @index_ptr: A pointer to hold the array index of the free block. * @@ -5032,7 +5032,7 @@ get_ref_counts_statistics(const struct slab_depot *depot) } /** - * get_depot_slab_journal_statistics() - Get the aggregated slab journal statistics for the depot. + * get_slab_journal_statistics() - Get the aggregated slab journal statistics for the depot. * @depot: The slab depot. * * Return: The aggregated statistics for all slab journals in the depot. From c09de9357726dbcb09198af3b8aea7f0592464b3 Mon Sep 17 00:00:00 2001 From: Jiapeng Chong Date: Wed, 21 Feb 2024 17:17:29 +0800 Subject: [PATCH 03/11] dm vdo: Modify mismatched function name No functional modification involved. src/c++/vdo/base/physical-zone.c:268: warning: expecting prototype for vdo_free_pbn_lock_pool(). Prototype was for free_pbn_lock_pool() instead. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8275 Signed-off-by: Jiapeng Chong Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/physical-zone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-vdo/physical-zone.c b/drivers/md/dm-vdo/physical-zone.c index 3bcf6f1ba77f..a9380966b56f 100644 --- a/drivers/md/dm-vdo/physical-zone.c +++ b/drivers/md/dm-vdo/physical-zone.c @@ -258,7 +258,7 @@ static int make_pbn_lock_pool(size_t capacity, struct pbn_lock_pool **pool_ptr) } /** - * vdo_free_pbn_lock_pool() - Free a PBN lock pool. + * free_pbn_lock_pool() - Free a PBN lock pool. * @pool: The lock pool to free. * * This also frees all the PBN locks it allocated, so the caller must ensure that all locks have From 6a8e0a2d6a405fa0d8cb0b0b2e300731559a0c16 Mon Sep 17 00:00:00 2001 From: Jiapeng Chong Date: Wed, 21 Feb 2024 17:17:28 +0800 Subject: [PATCH 04/11] dm vdo: Modify mismatched function name No functional modification involved. src/c++/vdo/base/logical-zone.c:303: warning: expecting prototype for void attempt_generation_complete_notification()(). Prototype was for attempt_generation_complete_notification() instead. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8276 Signed-off-by: Jiapeng Chong Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/logical-zone.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/md/dm-vdo/logical-zone.c b/drivers/md/dm-vdo/logical-zone.c index cfbf1701ca84..e11f9c859349 100644 --- a/drivers/md/dm-vdo/logical-zone.c +++ b/drivers/md/dm-vdo/logical-zone.c @@ -295,8 +295,8 @@ static void notify_flusher(struct vdo_completion *completion) } /** - * void attempt_generation_complete_notification() - Notify the flusher if some generation no - * longer has active VIOs. + * attempt_generation_complete_notification() - Notify the flusher if some generation no + * longer has active VIOs. * @completion: The zone completion. */ static void attempt_generation_complete_notification(struct vdo_completion *completion) From 78cfded6e8c77532451e3556bde2d2661c22f978 Mon Sep 17 00:00:00 2001 From: Jiapeng Chong Date: Wed, 21 Feb 2024 17:17:27 +0800 Subject: [PATCH 05/11] dm vdo: Modify mismatched function name No functional modification involved. src/c++/vdo/base/encodings.c:1178: warning: expecting prototype for vdo_decode_component(). Prototype was for decode_vdo_component() instead. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8277 Signed-off-by: Jiapeng Chong Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/encodings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-vdo/encodings.c b/drivers/md/dm-vdo/encodings.c index 9e45411fe816..5012042b26af 100644 --- a/drivers/md/dm-vdo/encodings.c +++ b/drivers/md/dm-vdo/encodings.c @@ -1172,7 +1172,7 @@ static struct vdo_component unpack_vdo_component_41_0(struct packed_vdo_componen } /** - * vdo_decode_component() - Decode the component data for the vdo itself out of the super block. + * decode_vdo_component() - Decode the component data for the vdo itself out of the super block. * * Return: VDO_SUCCESS or an error. */ From 814669ba21ed04255c1aac19968a82c564a91c4e Mon Sep 17 00:00:00 2001 From: Jiapeng Chong Date: Wed, 21 Feb 2024 17:17:26 +0800 Subject: [PATCH 06/11] dm vdo: Modify mismatched function name No functional modification involved. src/c++/vdo/base/flush.c:97: warning: expecting prototype for waiter_as_flush(). Prototype was for vdo_waiter_as_flush() instead. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8278 Signed-off-by: Jiapeng Chong Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/flush.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-vdo/flush.c b/drivers/md/dm-vdo/flush.c index 391b6203efc6..1bc13470a608 100644 --- a/drivers/md/dm-vdo/flush.c +++ b/drivers/md/dm-vdo/flush.c @@ -88,7 +88,7 @@ static inline struct vdo_flush *completion_as_vdo_flush(struct vdo_completion *c } /** - * waiter_as_flush() - Convert a vdo_flush's generic wait queue entry back to the vdo_flush. + * vdo_waiter_as_flush() - Convert a vdo_flush's generic wait queue entry back to the vdo_flush. * @waiter: The wait queue entry to convert. * * Return: The wait queue entry as a vdo_flush. From 964096bbf7a9fb8fbc4666904c91cc16004e4fc7 Mon Sep 17 00:00:00 2001 From: Jiapeng Chong Date: Wed, 21 Feb 2024 17:17:25 +0800 Subject: [PATCH 07/11] dm vdo dedupe: Modify mismatched function name No functional modification involved. src/c++/vdo/base/dedupe.c:2792: warning: expecting prototype for vdo_dump_hash_zone(). Prototype was for dump_hash_zone() instead. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8279 Signed-off-by: Jiapeng Chong Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/dedupe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-vdo/dedupe.c b/drivers/md/dm-vdo/dedupe.c index 9468d7fad443..c8018c5799bd 100644 --- a/drivers/md/dm-vdo/dedupe.c +++ b/drivers/md/dm-vdo/dedupe.c @@ -2839,7 +2839,7 @@ static const char *index_state_to_string(struct hash_zones *zones, } /** - * vdo_dump_hash_zone() - Dump information about a hash zone to the log for debugging. + * dump_hash_zone() - Dump information about a hash zone to the log for debugging. * @zone: The zone to dump. */ static void dump_hash_zone(const struct hash_zone *zone) From 8f7bb14c242ec7be0ca13a44a44f3225ccc7ba3c Mon Sep 17 00:00:00 2001 From: Jiapeng Chong Date: Wed, 21 Feb 2024 17:17:24 +0800 Subject: [PATCH 08/11] dm vdo: Modify mismatched function name No functional modification involved. src/c++/vdo/base/admin-state.c:310: warning: expecting prototype for vdo_drain_operation(). Prototype was for assert_vdo_drain_operation() instead. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8280 Signed-off-by: Jiapeng Chong Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/admin-state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-vdo/admin-state.c b/drivers/md/dm-vdo/admin-state.c index 94533a802edb..1423f4cebb8a 100644 --- a/drivers/md/dm-vdo/admin-state.c +++ b/drivers/md/dm-vdo/admin-state.c @@ -300,7 +300,7 @@ static bool check_code(bool valid, const struct admin_state_code *code, const ch } /** - * vdo_drain_operation() - Check that an operation is a drain. + * assert_vdo_drain_operation() - Check that an operation is a drain. * @waiter The completion to finish with an error if the operation is not a drain. * * Return: true if the specified operation is a drain. From 64233f2dcfd920e8fe6e24f4954dddc1308f3051 Mon Sep 17 00:00:00 2001 From: Matthew Sakai Date: Fri, 19 Jan 2024 22:27:27 -0500 Subject: [PATCH 09/11] dm vdo indexer delta-index: fix typos in comments Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/indexer/delta-index.c | 2 +- drivers/md/dm-vdo/indexer/delta-index.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/md/dm-vdo/indexer/delta-index.c b/drivers/md/dm-vdo/indexer/delta-index.c index 4aace707545a..6a85f93bbcb1 100644 --- a/drivers/md/dm-vdo/indexer/delta-index.c +++ b/drivers/md/dm-vdo/indexer/delta-index.c @@ -35,7 +35,7 @@ * * Each delta list is stored as a bit stream. Within the delta list encoding, bits and bytes are * numbered in little endian order. Within a byte, bit 0 is the least significant bit (0x1), and - * bit 7 is the most significant bit (0x80). Within a bit stream, bit 7 is the most signficant bit + * bit 7 is the most significant bit (0x80). Within a bit stream, bit 7 is the most significant bit * of byte 0, and bit 8 is the least significant bit of byte 1. Within a byte array, a byte's * number corresponds to its index in the array. * diff --git a/drivers/md/dm-vdo/indexer/delta-index.h b/drivers/md/dm-vdo/indexer/delta-index.h index 3d2ea19aef61..53f6c6ac0bc7 100644 --- a/drivers/md/dm-vdo/indexer/delta-index.h +++ b/drivers/md/dm-vdo/indexer/delta-index.h @@ -141,7 +141,7 @@ struct delta_index_page { * record at the end of the list. * * (5) If at_end is false and is_collision is true, the delta_list entry fields refer to a - * collision entry in the list, and the delta_list entry can be used a a reference to this + * collision entry in the list, and the delta_list entry can be used as a reference to this * entry. * * (6) If at_end is false and is_collision is false, the delta_list entry fields refer to a From 4f22e0d2cdacdf8d7c2af7eef4f2120db3425519 Mon Sep 17 00:00:00 2001 From: Matthew Sakai Date: Thu, 22 Feb 2024 20:44:29 -0500 Subject: [PATCH 10/11] dm vdo: update module comments Update outdated comments referring to separate VDO and UDS modules. Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/dm-vdo-target.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/md/dm-vdo/dm-vdo-target.c b/drivers/md/dm-vdo/dm-vdo-target.c index 0114fa4d48a2..429a285cbc4a 100644 --- a/drivers/md/dm-vdo/dm-vdo-target.c +++ b/drivers/md/dm-vdo/dm-vdo-target.c @@ -2907,9 +2907,7 @@ static int __init vdo_init(void) { int result = 0; - /* - * UDS module level initialization must be done first, as VDO initialization depends on it - */ + /* Memory tracking must be initialized first for accurate accounting. */ uds_memory_init(); uds_init_sysfs(); @@ -2917,7 +2915,7 @@ static int __init vdo_init(void) vdo_initialize_device_registry_once(); uds_log_info("loaded version %s", CURRENT_VERSION); - /* Add VDO errors to the already existing set of errors in UDS. */ + /* Add VDO errors to the set of errors registered by the indexer. */ result = vdo_register_status_codes(); if (result != UDS_SUCCESS) { uds_log_error("vdo_register_status_codes failed %d", result); @@ -2939,11 +2937,8 @@ static int __init vdo_init(void) static void __exit vdo_exit(void) { vdo_module_destroy(); - /* - * UDS module level exit processing must be done after all VDO module exit processing is - * complete. - */ uds_put_sysfs(); + /* Memory tracking cleanup must be done last. */ uds_memory_exit(); } From 5879168f042620473ea6c52c7c008ced992e29b1 Mon Sep 17 00:00:00 2001 From: Matthew Sakai Date: Thu, 22 Feb 2024 20:48:16 -0500 Subject: [PATCH 11/11] dm vdo: remove outdated pointer_map reference Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/vdo.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/md/dm-vdo/vdo.c b/drivers/md/dm-vdo/vdo.c index c161dffeb91a..d16404588881 100644 --- a/drivers/md/dm-vdo/vdo.c +++ b/drivers/md/dm-vdo/vdo.c @@ -67,10 +67,7 @@ struct sync_completion { struct completion completion; }; -/* - * We don't expect this set to ever get really large, so a linked list is adequate. We can use a - * pointer_map if we need to later. - */ +/* A linked list is adequate for the small number of entries we expect. */ struct device_registry { struct list_head links; /* TODO: Convert to rcu per kernel recommendation. */