Whamcloud - gitweb
LU-11834 llite: fix temporary instance buffer size 51/33951/2
authorAndreas Dilger <adilger@whamcloud.com>
Wed, 2 Jan 2019 22:12:11 +0000 (15:12 -0700)
committerOleg Drokin <green@whamcloud.com>
Wed, 16 Jan 2019 07:08:27 +0000 (07:08 +0000)
commit1db90b29ad676c2cf1888ef5a7c623161ff23bf9
treea38ea81e978dee26b4cf2f661b5cf031c194b878
parent2b0a34fe43bf4fce5560af61a45e5393c96070a9
LU-11834 llite: fix temporary instance buffer size

The formatting of the cfg_instance variable was changed in LU-11809
to always use a fixed "%016llu" format, but the temporary buffer
allocations for the instance string were not changed to match the
printed value.

This results in string truncation in some situations.  Change the temp
buffer size to always have 16 bytes for the instance instead of using
sizeof(cfg_instance).

Fixes: cd294a1255 ("LU-11809 llite: don't use %p for cfg_instance")

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I5eca99afa2787cc57e739489b252b12af68cab07
Reviewed-on: https://review.whamcloud.com/33951
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/llite_lib.c
lustre/obdclass/obd_config.c