]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
librbd/cache/pwl/ssd: actually use first_{valid,free}_entry on recovery
authorIlya Dryomov <idryomov@gmail.com>
Thu, 13 May 2021 11:11:57 +0000 (13:11 +0200)
committerDeepika Upadhyay <dupadhya@redhat.com>
Fri, 5 Nov 2021 09:22:01 +0000 (14:52 +0530)
commitf4740b47edafb8c27ba2d03a18cbdff9082ab3ea
tree40ebfcc3bc21877b0fe55254042cf49b0c3468bc
parent56b02f3266727fd862eb6528ae740e9f0de84bd7
librbd/cache/pwl/ssd: actually use first_{valid,free}_entry on recovery

first_valid_entry and first_free_entry pointers are read from media
but not actually used: both m_first_valid_entry and m_first_free_entry
get assigned 0 (or garbage).  next_log_pos gets the same value as well
meaning that not only no recovery is attempted but the cache also gets
corrupted because DATA_RING_BUFFER_OFFSET is not applied.

Fixes: https://tracker.ceph.com/issues/50669
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit ef020b85fb16c1730fc08eadfd1b51d3c4cd019a)
src/librbd/cache/pwl/ssd/WriteLog.cc