blockcmd: start REPORT_LUNS with the smallest buffer

A number of emulated SCSI devices in QEMU incorrectly return an error
to REPORT_LUNS command when the size of the data returned is smaller
than the allocation length passed in.

To work it around, start with the smallest allocation length possible:
for 1 entry.  This is a slight pessimization because it would require
another REPORT_LUNS iteration if the target has more than a single LUN,
but this appears to have negligible impact on boot times, and makes
REPORT_LUNS enumeration work for more QEMU devices (lsi53c895a,
mptsas1068).

Reported-by: Maciej Józefczyk <maciej.jozefczyk@corp.ovh.com>
Signed-off-by: Roman Kagan <rkagan@virtuozzo.com>
1 file changed
tree: 5f1ffe7562c4e3958861578c5f4ab3a960f074c9
  1. docs/
  2. scripts/
  3. src/
  4. vgasrc/
  5. .gitignore
  6. COPYING
  7. COPYING.LESSER
  8. Makefile
  9. README