LU-13499 obd: fix printing of client connection UUID
The client connection UUID sent to the servers (ASCII format) was
being truncated to only 16 bytes in size, like '
595f3c6a-20ae-4'
instead of a full UUID like '
18ae0f9a-4b09-4599-8ced-
0f2126eab425'.
This was caused by using UUID_SIZE to limit the size of the "%pU"
string printed to avoid overflowing the target buffer, but in fact
UUID_SIZE is the size of the binary uuid_t (16 bytes) instead of
the size of struct obd_uuid (40 bytes) where the ASCII version of
the UUID is stored.
Fix this to use sizeof(target) rather than an external constant,
which is exactly why sizeof(target) should always be used. The
usage in osd_scrub.c is not actually broken, but it is still
better to use sizeof(target) to avoid future inconsistencies.
Fixes:
604c266a175b7 ("LU-11803 obd: replace class_uuid with linux kernel version")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I05325646cd632a09997d6632a483909629ce7057
Reviewed-on: https://review.whamcloud.com/38443
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.super@gmail.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>