mirror of
https://github.com/ceph/ceph
synced 2025-02-22 18:47:18 +00:00
Merge branch 'wip-journal-header' of git://github.com/XinzeChi/ceph
Conflicts: src/gmock
This commit is contained in:
commit
8d596bfa24
@ -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)
|
||||
{
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user