]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crimson/os/seastore/cbj: fix a potential overflow bug 53230/head
authorMyoungwon Oh <myoungwon.oh@samsung.com>
Thu, 31 Aug 2023 02:43:24 +0000 (11:43 +0900)
committermyoungwon oh <ohmyoungwon@gmail.com>
Tue, 12 Sep 2023 03:16:04 +0000 (03:16 +0000)
commit36982b66574ff277e04a02d5b9a28e80d0790778
tree70f2bc30531e5b6b94b49eed33adf55361e5fde3
parent44f4d78b0de6ac296949921bb2177d1fcc39491f
crimson/os/seastore/cbj: fix a potential overflow bug

CircularBoundedJournal is similar to circular queue, so segment_seq
increases after rolling. However, current implementation always
increases segment_seq_t when rolling occurs, resulting in
the overflow if segment_seq_t hits MAX_SEG_SEQ.

To mitigate this, this commit changes the type of the segment_seq_t
to uint64_t.

Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
src/crimson/os/seastore/journal/circular_journal_space.cc
src/crimson/os/seastore/seastore_types.h