Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dm vdo string-utils: change from uds_ to vdo_ namespace

Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Chung Chung <cchung@redhat.com>
Signed-off-by: Matthew Sakai <msakai@redhat.com>

+19 -19
+1 -1
drivers/md/dm-vdo/dm-vdo-target.c
··· 340 340 current_position = &output[0]; 341 341 342 342 for (i = 0; (i < array_length) && (substring_array[i] != NULL); i++) { 343 - current_position = uds_append_to_buffer(current_position, 343 + current_position = vdo_append_to_buffer(current_position, 344 344 output + string_length, "%s", 345 345 substring_array[i]); 346 346 *current_position = separator;
+8 -8
drivers/md/dm-vdo/errors.c
··· 154 154 block_name = get_error_info(errnum, &info); 155 155 if (block_name != NULL) { 156 156 if (info != NULL) { 157 - buffer = uds_append_to_buffer(buffer, buf_end, "%s: %s", 157 + buffer = vdo_append_to_buffer(buffer, buf_end, "%s: %s", 158 158 block_name, info->message); 159 159 } else { 160 - buffer = uds_append_to_buffer(buffer, buf_end, "Unknown %s %d", 160 + buffer = vdo_append_to_buffer(buffer, buf_end, "Unknown %s %d", 161 161 block_name, errnum); 162 162 } 163 163 } else if (info != NULL) { 164 - buffer = uds_append_to_buffer(buffer, buf_end, "%s", info->message); 164 + buffer = vdo_append_to_buffer(buffer, buf_end, "%s", info->message); 165 165 } else { 166 166 const char *tmp = system_string_error(errnum, buffer, buf_end - buffer); 167 167 168 168 if (tmp != buffer) 169 - buffer = uds_append_to_buffer(buffer, buf_end, "%s", tmp); 169 + buffer = vdo_append_to_buffer(buffer, buf_end, "%s", tmp); 170 170 else 171 171 buffer += strlen(tmp); 172 172 } ··· 188 188 block_name = get_error_info(errnum, &info); 189 189 if (block_name != NULL) { 190 190 if (info != NULL) { 191 - buffer = uds_append_to_buffer(buffer, buf_end, "%s", info->name); 191 + buffer = vdo_append_to_buffer(buffer, buf_end, "%s", info->name); 192 192 } else { 193 - buffer = uds_append_to_buffer(buffer, buf_end, "%s %d", 193 + buffer = vdo_append_to_buffer(buffer, buf_end, "%s %d", 194 194 block_name, errnum); 195 195 } 196 196 } else if (info != NULL) { 197 - buffer = uds_append_to_buffer(buffer, buf_end, "%s", info->name); 197 + buffer = vdo_append_to_buffer(buffer, buf_end, "%s", info->name); 198 198 } else { 199 199 const char *tmp; 200 200 201 201 tmp = system_string_error(errnum, buffer, buf_end - buffer); 202 202 if (tmp != buffer) 203 - buffer = uds_append_to_buffer(buffer, buf_end, "%s", tmp); 203 + buffer = vdo_append_to_buffer(buffer, buf_end, "%s", tmp); 204 204 else 205 205 buffer += strlen(tmp); 206 206 }
+1 -1
drivers/md/dm-vdo/logical-zone.c
··· 368 368 (unsigned long long) READ_ONCE(zone->flush_generation), 369 369 (unsigned long long) READ_ONCE(zone->oldest_active_generation), 370 370 (unsigned long long) READ_ONCE(zone->notification_generation), 371 - uds_bool_to_string(READ_ONCE(zone->notifying)), 371 + vdo_bool_to_string(READ_ONCE(zone->notifying)), 372 372 (unsigned long long) READ_ONCE(zone->ios_in_flush_generation)); 373 373 }
+3 -3
drivers/md/dm-vdo/slab-depot.c
··· 3597 3597 3598 3598 vdo_log_info(" slab journal: entry_waiters=%zu waiting_to_commit=%s updating_slab_summary=%s head=%llu unreapable=%llu tail=%llu next_commit=%llu summarized=%llu last_summarized=%llu recovery_lock=%llu dirty=%s", 3599 3599 vdo_waitq_num_waiters(&journal->entry_waiters), 3600 - uds_bool_to_string(journal->waiting_to_commit), 3601 - uds_bool_to_string(journal->updating_slab_summary), 3600 + vdo_bool_to_string(journal->waiting_to_commit), 3601 + vdo_bool_to_string(journal->updating_slab_summary), 3602 3602 (unsigned long long) journal->head, 3603 3603 (unsigned long long) journal->unreapable, 3604 3604 (unsigned long long) journal->tail, ··· 3606 3606 (unsigned long long) journal->summarized, 3607 3607 (unsigned long long) journal->last_summarized, 3608 3608 (unsigned long long) journal->recovery_lock, 3609 - uds_bool_to_string(journal->recovery_lock != 0)); 3609 + vdo_bool_to_string(journal->recovery_lock != 0)); 3610 3610 /* 3611 3611 * Given the frequency with which the locks are just a tiny bit off, it might be 3612 3612 * worth dumping all the locks, but that might be too much logging.
+1 -1
drivers/md/dm-vdo/string-utils.c
··· 5 5 6 6 #include "string-utils.h" 7 7 8 - char *uds_append_to_buffer(char *buffer, char *buf_end, const char *fmt, ...) 8 + char *vdo_append_to_buffer(char *buffer, char *buf_end, const char *fmt, ...) 9 9 { 10 10 va_list args; 11 11 size_t n;
+5 -5
drivers/md/dm-vdo/string-utils.h
··· 3 3 * Copyright 2023 Red Hat 4 4 */ 5 5 6 - #ifndef UDS_STRING_UTILS_H 7 - #define UDS_STRING_UTILS_H 6 + #ifndef VDO_STRING_UTILS_H 7 + #define VDO_STRING_UTILS_H 8 8 9 9 #include <linux/kernel.h> 10 10 #include <linux/string.h> 11 11 12 12 /* Utilities related to string manipulation */ 13 13 14 - static inline const char *uds_bool_to_string(bool value) 14 + static inline const char *vdo_bool_to_string(bool value) 15 15 { 16 16 return value ? "true" : "false"; 17 17 } 18 18 19 19 /* Append a formatted string to the end of a buffer. */ 20 - char *uds_append_to_buffer(char *buffer, char *buf_end, const char *fmt, ...) 20 + char *vdo_append_to_buffer(char *buffer, char *buf_end, const char *fmt, ...) 21 21 __printf(3, 4); 22 22 23 - #endif /* UDS_STRING_UTILS_H */ 23 + #endif /* VDO_STRING_UTILS_H */