]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
osdc/Striper: relax assert in assemble_result() for raw buffers
authorIlya Dryomov <idryomov@gmail.com>
Sun, 12 May 2024 10:35:46 +0000 (12:35 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Sun, 12 May 2024 12:03:59 +0000 (14:03 +0200)
commite6773a92f774b0f2748f2565ca4f53b6ace9fbdf
treef72fdf2170e7128d8833f7b0d1fe400c261910ff
parent148448033d03bc9b3e8f614ac0ec2a1aae674d26
osdc/Striper: relax assert in assemble_result() for raw buffers

The previous commit uncovered an old bug, introduced in commit
9867804c2058 ("Striper: Add function 'assemble_result(CephContext *cct,
char *buffer, size_t len)' in StripedReadResult.").  The buffer is
allowed to be NULL when assemble_result() is called -- it becomes
a problem only if some data was read.

Strengthen ZeroLengthRead and ZeroLengthWrite tests to cover both
a bogus pointer and a NULL pointer for buffer.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/osdc/Striper.cc
src/test/librbd/test_librbd.cc