If log_dir was empty then the prefix would be of the form /mon.a
That isn't good, so fill it in so it writes to the current dir.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
My initial commit was naughty, fix that up here by
creating a new message for each mon and just copying
the command.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Remove the references to global variables from Thread.h. They are really
unecessary. In every case, the printout is followed by an assert which
will deliver the exact same information.
Assert that thread creation succeeds. Nobody was checking the return
value of Thread::create() previously. Added a new function,
Thread::try_create(), which programmers can use if they do want to check
the value of Thread::create() and handle it appropriately.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Sometimes we create a Monitor without a Messenger. So we can't pull the
CephContext out of the Messenger, because it may be NULL. Just specify
it explicitly in the Monitor constructor.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Should default to false, and only get set to true if there are caps for
this lock. Among other things this means we don't set it for dentry
locks (which have no caps).
Signed-off-by: Sage Weil <sage@newdream.net>
We were sometimes setting do_issue but not *pneed_issue. Simplify by
setting do_issue internally to the function and then either issuing or
setting *pneed_issue at the end.
Also fix bug with second argument to eval_gather().
Signed-off-by: Sage Weil <sage@newdream.net>
Set pneed_issue (or issue ourselves) whenever we jump directly to the
target lock state. Make sure we only do it if there are caps (cap shift)
for this particular lock.
Part of fix for #1084.
Signed-off-by: Sage Weil <sage@newdream.net>
We do one funky thing in file_update_finish that only issues caps on a
single cap when max_size changes. This is more commonly we see. However,
if a lock changes state and we need to issue on the whole inode (for all
clients), avoid doing the cap-specific issue by checking the issue set.
Signed-off-by: Sage Weil <sage@newdream.net>
In drop_locks, build a set of inodes we need to issue caps on. Then do it
all at once. This does two things:
- it fixes the fact that currently a dropped lock leading to an eval and
lock state change will not issue caps _at_all_
- it ensure we only issue_caps once for each inode, even when we are
dropping multiple locks on it.
This should fix#1084.
Signed-off-by: Sage Weil <sage@newdream.net>
This allows *lock_finish() callers to handle the issue_caps themselves.
None of them do yet (this arg is still optional) so this is patch has no
functional change (yet!).
Signed-off-by: Sage Weil <sage@newdream.net>
We accidentally (we think) initialized this variable to true when
we want it to be false: we should only do_issue if there aren't
any remaining locks, not in all cases.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
This wasn't encoded previously so it was always zero on the
receiver's end, which led to nasty hangs. :(
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>