From a7623818dbebb9130fa7eaa13804cd85aaa134f3 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Fri, 19 Aug 2016 14:50:38 +0800 Subject: [PATCH] os/filestore/FileJournal: bail out if transaction is too large 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 --- src/os/filestore/FileJournal.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/os/filestore/FileJournal.cc b/src/os/filestore/FileJournal.cc index 394a5cc399f..4375a9731da 100644 --- a/src/os/filestore/FileJournal.cc +++ b/src/os/filestore/FileJournal.cc @@ -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() < header.max_size); if (osd_op) osd_op->mark_event("commit_queued_for_journal_write"); -- 2.39.5