Merge branch 'wip-journal-header' of git://github.com/XinzeChi/ceph

Conflicts:
	src/gmock
This commit is contained in:
Sage Weil 2015-05-01 09:22:01 -07:00
commit 8d596bfa24
2 changed files with 13 additions and 1 deletions

View File

@ -649,6 +649,9 @@ void FileJournal::stop_writer()
}
write_thread.join();
// write journal header now so that we have less to replay on remount
write_header_sync();
#ifdef HAVE_LIBAIO
// stop aio completeion thread *after* writer thread has stopped
// and has submitted all of its io
@ -733,7 +736,14 @@ bufferptr FileJournal::prepare_header()
return bp;
}
void FileJournal::write_header_sync()
{
Mutex::Locker locker(write_lock);
must_write_header = true;
bufferlist bl;
do_write(bl);
dout(20) << __func__ << " finish" << dendl;
}
int FileJournal::check_for_full(uint64_t seq, off64_t pos, off64_t size)
{

View File

@ -414,6 +414,8 @@ private:
return full_state != FULL_NOTFULL && !write_stop;
}
void write_header_sync();
void set_wait_on_full(bool b) { wait_on_full = b; }
// reads