Whamcloud - gitweb
LU-11834 llite: fix temporary instance buffer size 15/34315/2
authorAndreas Dilger <adilger@whamcloud.com>
Wed, 2 Jan 2019 22:12:11 +0000 (15:12 -0700)
committerOleg Drokin <green@whamcloud.com>
Tue, 19 Mar 2019 06:00:49 +0000 (06:00 +0000)
commit8f887156d4662f80de99dc854f0d3941d0205107
tree6b3f734503de42e5563cd76465c7db5ed511494a
parent6c69952f0654028d129bd76a7a24007ead26610f
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")

Lustre-change: https://review.whamcloud.com/33951
Lustre-commit: 1db90b29ad676c2cf1888ef5a7c623161ff23bf9

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