SIGN IN SIGN UP

common: Make buffer::list::rebuild_aligned_size_and_memory correctly handle zero-sized buffers

Prior to this fix, if there was a zero-sized bufferptr in a bufferlist, then
rebuild_aligned_size_and_memory would not honour the max_buffers parameter.

This change causes rebuild_aligned_size_and_memory to drop any zero-sized buffer when doing
the rebuild.

There is a recreate test, although this might be a little delicate, as it relies
on a quirk of buffer::list::append to generate the zero length buffers.

AI assistance used for creating test only.

Fixes: https://tracker.ceph.com/issues/76466

Signed-off-by: Alex Ainscow <aainscow@uk.ibm.com>
Assisted-by: IBM-Bob
A
Alex Ainscow committed
845b4476b6136e0cd05f7c26b20587da1ca3ffa0
Parent: 24f44a9