]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osdc/Striper: relax assert in assemble_result() for raw buffers 57569/head
authorIlya Dryomov <idryomov@gmail.com>
Sun, 12 May 2024 10:35:46 +0000 (12:35 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 20 May 2024 13:09:52 +0000 (15:09 +0200)
commit1e633af5eea4203ea248b883363468406cd967d8
treee2f6a79bdd2131136fa3703d69a1ea41ee99506a
parent3e27f4bd34917d8079dddbf2e990b80f85120551
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>
(cherry picked from commit e6773a92f774b0f2748f2565ca4f53b6ace9fbdf)
src/osdc/Striper.cc
src/test/librbd/test_librbd.cc