dlm_tool: handle dynamic length lockspace dump
Currently there is a maximum lockspace dump value which I think was
there because a dlm user lockspace limitation of device minor numbers.
However for kernel lockspaces e.g. gfs2 there will no device files
created and so we can indeed have more than 128 lockspaces registered.
If this is the case dlm_tool will simple not dump any lockspace because
it hits the static pre-allocated array size to dump lockspace
information.
This patch is changing the current static behaviour to first get the
dlmc_header header and calculate the additional payload size and
allocate the dump lockspace array so that no static limitation exists
anymore.
I tested this patch series with a hacked dlm test module which registers
300 dlm lockspaces.
Reported-by: Reid Wahl <nwahl@redhat.com>