]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
librbd/cache/pwl/ssd/WriteLog: don't crash on split log entries
authorIlya Dryomov <idryomov@gmail.com>
Thu, 29 Apr 2021 13:03:46 +0000 (15:03 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 3 May 2021 12:05:58 +0000 (14:05 +0200)
commit155ee28d98b832e5414aa594094c86cb6bfee45e
treed6c0ece077412a54f734cc44800b8c8687835718
parent7f17f21857698f227a759c14f3922db489dee84d
librbd/cache/pwl/ssd/WriteLog: don't crash on split log entries

write_log_entries() will split a log entry at the end of the log, the
remainder is written to the beginning at DATA_RING_BUFFER_OFFSET.  On
the read side aio_read_data_block() doesn't handle this case and just
crashes.  Unless the workload in use is <= 4K, the image is rendered
unusable sooner or later.

Fixes: https://tracker.ceph.com/issues/50589
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/librbd/cache/pwl/ssd/WriteLog.cc
src/librbd/cache/pwl/ssd/WriteLog.h