Use derr to announce errors in FileJournal.
Handle EINTR where necessary (still haven't fixed
read/write/pread/pwrite uses).
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
Re-introduce derr as a special log level (level -1) which will show up
in all logs, and on stderr. These messages are the only messages which
will show up on stderr.
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
Calling messenger->add_dispatcher_head() has the side-effect of starting
the messenger thread. So we must not do it before calling
messenger->start(), which sometimes calls daemonize.
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
We need to detect when a pg mapping changes but the primary stays the same.
That means we can't just look at the final osdmap and see what is says; we
have to look at each intervening map and check each request to see if
something switched and the osd has thrown our request out.
Also refactor and clean up the linger vs normal op stuff some more.
Signed-off-by: Sage Weil <sage@newdream.net>
This is a big cleanup. Also
- switch to keeping per-osd Connection *'s
- make requests time out independently (not very efficiently yet)
Signed-off-by: Sage Weil <sage@newdream.net>
Use Mutex::Locker to make logging exception-safe. That is, if you are
doing "dout() << foo() << dendl;" and foo throws an exception, the dout
mutex will not be left in a locked state.
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
Rename tools files to be more consistent. For example, the main()
function for ./ceph should be in ceph.cc.
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
We only want the user-provided ack/commit callbacks to trigger the first
time we register the lingering op. Same goes for the eversion_t *objver.
Signed-off-by: Sage Weil <sage@newdream.net>
[ The following text is in the "iso-8859-7" character set. ]
[ Your display is set for the "iso-8859-1" character set. ]
[ Some special characters may be displayed incorrectly. ]
Running the unstable branch, mkcephfs fails when trying to create
a 3GB journal file on the OSDs.
Relevant messages from the osd logfile:
2010-12-09 19:03:54.419737 7fdde4d51720 journal _open_file: unable to extend journal to 18446744072560312320 bytes
2010-12-09 19:03:54.419789 7fdde4d51720 filestore(/osd) mkjournal error creating journal on /osd/journal
The problem is that the calculation of the journal size in bytes
overflows, in FileJournal::_open_file().
Signed-off-by: Vangelis Koukis <vkoukis@cslab.ece.ntua.gr>
Signed-off-by: Sage Weil <sage@newdream.net>
If we read an event that's later than our expected entry, we set read_pos
to -1 and discard the journal. If that happens we also need to reset
last_committed_seq to avoid a crash like
2010-12-08 17:04:39.246950 7f269d138910 journal commit_finish thru 16904
2010-12-08 17:04:39.246961 7f269d138910 journal committed_thru 16904 < last_committed_seq 37778589
os/FileJournal.cc: In function 'virtual void FileJournal::committed_thru(uint64_t)':
os/FileJournal.cc:854: FAILED assert(seq >= last_committed_seq)
ceph version 0.24~rc (commit:fe10300317383ec29948d7dbe3cb31b3aa277e3c)
1: (FileJournal::committed_thru(unsigned long)+0xad) [0x588e7d]
2: (JournalingObjectStore::commit_finish()+0x8c) [0x57f2ec]
3: (FileStore::sync_entry()+0xcff) [0x5764cf]
4: (FileStore::SyncThread::entry()+0xd) [0x506d9d]
5: (Thread::_entry_func(void*)+0xa) [0x4790ba]
6: /lib/libpthread.so.0 [0x7f26a2f8373a]
7: (clone()+0x6d) [0x7f26a1c2569d]
Fixes#631
Signed-off-by: Sage Weil <sage@newdream.net>