summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Just <sam.just@inktank.com>2013-03-13 16:04:23 -0700
committerSamuel Just <sam.just@inktank.com>2013-03-19 10:32:13 -0700
commitb279b148b38c755d2dcca6524d7b8a95daf123a0 (patch)
treea569adc6fb88f2ed7429014cf17fc85915dabe5b
parent56e0a129b0d9ad463f4300999ed2c15173cbe603 (diff)
downloadceph-b279b148b38c755d2dcca6524d7b8a95daf123a0.tar.gz
FileJournal: queue_pos \in [get_top(), header.max_size)
If queue_pos == header.max_size when we create the entry header magic, the entry will be rejected at get_top() on replay. Fixes: #4436 Backport: bobtail Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com> (cherry picked from commit de8edb732e3a5ce4471670e43cfe6357ae6a2758)
-rw-r--r--src/os/FileJournal.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/os/FileJournal.cc b/src/os/FileJournal.cc
index 0056f1f23b4..218347efa49 100644
--- a/src/os/FileJournal.cc
+++ b/src/os/FileJournal.cc
@@ -914,7 +914,7 @@ int FileJournal::prepare_single_write(bufferlist& bl, off64_t& queue_pos, uint64
writing_seq = seq;
queue_pos += size;
- if (queue_pos > header.max_size)
+ if (queue_pos >= header.max_size)
queue_pos = queue_pos + get_top() - header.max_size;
return 0;