Skip to content

Commit

Permalink
os/filestore/FileJournal: bail out if transaction is too large
Browse files Browse the repository at this point in the history
if a transaction is too large to fit in the FileJournal's ring buffer,
we will wait. but if its size is larger than the max_size, it's likely
due to a bug or an invalid setting. in that case, we'd better fail
earlier.

Fixes: http://tracker.ceph.com/issues/16982
Signed-off-by: Kefu Chai <kchai@redhat.com>
  • Loading branch information
tchaikov committed Aug 19, 2016
1 parent c1e1ea5 commit 6d0a77a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/os/filestore/FileJournal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1667,6 +1667,7 @@ void FileJournal::submit_entry(uint64_t seq, bufferlist& e, uint32_t orig_len,
<< " len " << e.length()
<< " (" << oncommit << ")" << dendl;
assert(e.length() > 0);
assert(e.length() < max_size);

if (osd_op)
osd_op->mark_event("commit_queued_for_journal_write");
Expand Down

0 comments on commit 6d0a77a

Please sign in to comment.