]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
FileJournal: fix check_for_full 4450/head
authorHenry Chang <henry@bigtera.com>
Thu, 23 Apr 2015 04:23:46 +0000 (12:23 +0800)
committerHenry Chang <henry@bigtera.com>
Mon, 27 Apr 2015 15:33:37 +0000 (23:33 +0800)
commit972e9a5a004822b5dfe50283ce2f61e688be4d84
tree42b3aa1b277eb493bd63ae01129c2e9757c18fb0
parent89262abc53e324f3ef4d504473a4f1d6eb337c20
FileJournal: fix check_for_full

The condition to test if journal is passing half full mark is
incorrect. Consider the following simplified case:

Assume header.max_size = 100 and journal has 48 bytes already.

1st write (10 bytes):
max=100, room=52, size=10  --> condition not satisfied

2nd write (4 bytes):
max=100, room=42, size=4   --> condition not satisfied

It passed the half full mark without triggering filestore commit.

Signed-off-by: Henry Chang <henry@bigtera.com>
src/os/FileJournal.cc