]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.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)
committerDeepika Upadhyay <dupadhya@redhat.com>
Tue, 2 Nov 2021 11:50:08 +0000 (17:20 +0530)
commit113765caf32dda97bb45625a7d5b376b8a7e0291
treea4e676b750dc3fbc88cf4277052c977d34c6f28b
parent5219791b8fbcb7f5851a8546227854c703c15d52
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.

trivial fix: formating changes
Fixes: https://tracker.ceph.com/issues/50589
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 155ee28d98b832e5414aa594094c86cb6bfee45e)
src/librbd/cache/pwl/ssd/WriteLog.cc
src/librbd/cache/pwl/ssd/WriteLog.h