I've found something strange, 2 declaration of SERIAL_SIZE with
different sizes
libmultipath/structs.h:#define SERIAL_SIZE 17
path_priority/pp_balance_units/pp_balance_units.c:#define SERIAL_SIZE 255
In my case the first buffer size is to small because pp->serial has a
size of 17 chars and when you look at my output it has 40 chars.
By setting libmultipath/structs.h:#define SERIAL_SIZE to 255 it works
for me and the returned volume size is correct.
I'm not sure if this is the right solution, it would be great if someone
could verify that issue.
Thanks a lot for your work
Arsène
URZ- AG wrote:
Christophe Varoqui wrote:
Thanks for this report.
I can't reproduce this here.
I'm afraid I'll have to ask you to try and refine your report though.
Use a debugger to track [m]pp->size changes, or try adding debugging
output in the key code areas : add_map_with_path(), coalesce_paths(),
...
Regards,
cvaroqui
Hello Christophe,
I'm not a C Guru but i think i have been able to track it down.
It seems that when discovering the device for paths after the
get_serial (discovery.c) function the size has changed.
I've entered two debug entries in scsi_ioctl_pathinfo() which prints
out pp->size, one before get_serial call and one after and the size
has changed when the second print its value. So far I've seen, this
function should not change anything to the size, but it seems to write
to that pointer, could it be that this function writes out of a buffer
size?
I'm not comfortable with the debugger so I have not been able to debug
that in deep.
It would be great if you could give me some more instructions on how
to analyze/debug it .
Regards,
Arsène
--
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel
--
***********************************************************
Gschwind Arsene
Universitaet Rechenzentrum (URZ)
Klingelbergstrasse 70
CH-4056 Basel
SWITZERLAND
Languages : F/E/D
WWW: <http://www.urz.unibas.ch>
Mail: <Arsene DOT Gschwind AT unibas DOT ch>
************************************************************
--
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel