If we are auth for the root inode, load it's initial value off of disk. We
may not see it in the log if it has not been modified. If it has, this
is useless but fast/harmless. This only occurs for brand-new filesystems
where the mds is immediately restarted.
Fixes#671.
Signed-off-by: Sage Weil <sage@newdream.net>
Previously we left the mutex locked, which is obviously bad bad bad!
I believe this was the cause of #673.
Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
We only want to wake up if we are at the front of the line, in order to
preserve journal submission pipeline ordering.
This fixes, among other things, messages in the log like
2010-12-21 10:38:42.515974 7f0861486700 journal op_submit_finish 5364 expected 5370, OUT OF ORDER
and bug #666.
Signed-off-by: Sage Weil <sage@newdream.net>
- We don't want to purge file content on directories
- Don't fall over if a file has a zero period
Reported-by: Paul Komkoff <i@stingr.net>
Signed-off-by: Sage Weil <sage@newdream.net>
It seems that we have not been zeroing
PG::Info::History:last_epoch_clean when the History structure is
created. This led to some very interesting log output (and bugs!)
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
Make g_conf.keyring a plain old string rather than an array of strings.
Don't do substitution using the user's HOME variable-- this could lead
to security holes for setuid processes.
Get rid of AuthMonitor::read_keyfile because there is already a Keyring
member function, Keyring::load, that does the same thing.
qa/rbd/common.sh: we can now use cconf to figure out what the keyring
is.
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
cconf: add a better usage() message, with examples. Give more helpful
error messages when the usage is wrong. Put different actions into
different functions. Eliminate unecessary globals.
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
It seems that we have not been zeroing
PG::Info::History:last_epoch_clean when the History structure is
created. This led to some very interesting log output (and bugs!)
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
SA_RESETHAND | SA_NODEFER allows the "re-trigger default signal handler"
trick to work for signals other than SIGSEGV.
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
Print out a backtrace when we get SIGILL, SIGBUS, or SIGFPE. Fix a bug
where we failed to install a SIGABRT handler.
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
Normally we shouldn't ever have a last_complete < log.tail (&& !backlog).
But maybe we do (old bugs, whatever; see #590). In that case, the primary
can compensate by sending more log info to the replica.
Signed-off-by: Sage Weil <sage@newdream.net>
This looks to be an old bug introduced years ago in
267679abc7, and left
undiscovered due to code unuse.
Discovered by inspection while searching for clues to other issues.
Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
The predirty_journal_parents() calls wrlock_start() with nowait=true
because it has a journal entry open and we don't want to trigger a nested
scatterlock change that needs to journal something again (either
via scatter_writebehind or scatter_start). (MDLog can only handle a single
log entry open at once because building multiple at once would require very
very very careful ordering of predirty() calls and versions.)
We were already check for the simple_lock() case (which may call
writebehind); fix up the check to also cover the scatter_mix() (which may
call scatter_start) case.
Fixes this crash:
mds/MDLog.h: In function 'void MDLog::start_entry(LogEvent*)':
mds/MDLog.h:191: FAILED assert(cur_event == __null)
ceph version 0.24~rc (commit:fe10300317383ec29948d7dbe3cb31b3aa277e3c)
1: (CInode::finish_scatter_update(ScatterLock*, CDir*, unsigned long, unsigned long)+0x804) [0x606e14]
2: (CInode::start_scatter(ScatterLock*)+0xaa) [0x60dc1a]
3: (Locker::scatter_mix(ScatterLock*, bool*)+0x1ca) [0x589a9a]
4: (Locker::wrlock_start(SimpleLock*, MDRequest*, bool)+0x165) [0x597d65]
5: (MDCache::predirty_journal_parents(Mutation*, EMetaBlob*, CInode*, CDir*, int, int, snapid_t)+0x153e) [0x55a70e]
6: (Locker::scatter_writebehind(ScatterLock*)+0x42d) [0x58553d]
7: (Locker::simple_lock(SimpleLock*, bool*)+0x7ab) [0x58beeb]
8: (Locker::scatter_nudge(ScatterLock*, Context*, bool)+0x3ad) [0x58c49d]
9: (Locker::scatter_tick()+0x28a) [0x58c98a]
10: (MDS::tick()+0x4e4) [0x4b26a4]
11: (SafeTimer::timer_thread()+0x22c) [0x6d164c]
12: (SafeTimerThread::entry()+0xd) [0x6d34bd]
13: (Thread::_entry_func(void*)+0xa) [0x4943da]
14: /lib/libpthread.so.0 [0x7fc87810b73a]
15: (clone()+0x6d) [0x7fc876dad69d]
Signed-off-by: Sage Weil <sage@newdream.net>
Give the client some caps to write with. This is similar to the current
MKDIR behavior, but with different bits.
Signed-off-by: Sage Weil <sage@newdream.net>
If the client reexports ceph via nfs, file creations come through as
a MKNOD followed by OPEN. If it's a MKNOD on a normal file, assume that
the client will probably write to it and set them up with the caps and
client_range to do so without asking us again first.
Signed-off-by: Sage Weil <sage@newdream.net>
It was only waiting for items in the op_queue to complete. The goal is
to wait for anything we've called queue_transactions(&osr,...) on. If we
do writeahead journaling, though, there might be new ops that are still
journaling but not yet submitted to the fs that are missed.
This adds a journal queue to the OpSequencer, and uses it in the writeahead
case only.
Signed-off-by: Sage Weil <sage@newdream.net>
common_init: avoid (mismatched) heap allocation
ConfFile::_parse: avoid memory leak on error path
ConfFile: NULL filename if not set, rather than leaving it undefined
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>