Instead of assigning followers in the last_beacon laggy check loop, do it
at the end, the same way we let standby nodes take over.
This also fixes a bug where a non-standby node (say, up:replay) that used
to be up:standby-replay and has standby_for_rank set gets reset back to
up:standby-replay.
Fixes: #1001
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
We should never have a laggy standby, so technically this doesn't change
any behavior, but it makes the flow less confusing.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
If a standby-replay is laggy we shouldn't "take over" for them (they're
not part of the cluster yet). They should be removed like a regular
standby.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
If we sent scatterlock state during rejoin, the auth will send us an inode
base. Clear scatterlock flush state if that happens.
Fixes: #637
Signed-off-by: Sage Weil <sage@newdream.net>
Not just inodes for auth dirfrags, but for any inode with dirty scatterlock
state. Include the root inode.
Signed-off-by: Sage Weil <sage@newdream.net>
Mark the dentries dirty so they get saved to disk (they're not journaled!).
This fixes rstat problems on startup, where populate_mydir was recreating
the entries and munging rstats accordingly.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
We were going from mix->sync when we shouldn't. Fix mis-coded filelock
and look at _lock_ state, not inode's!
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
This was found by qemu-io tests, which tried to read and write past
the end of an rbd image. The test hung waiting for a completion that
was never scheduled, since it did not check the return value of
rbd_aio_write.
Reported-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
- we don't want to open a log file
- we don't want to print a stability warning
- we don't want to fork (not that we do, but anyway!)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Previously it only printed out dir stats at high debug levels, which
meant you could get output of the dentries without seeing what the
totals were supposed to be!
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
We can get here when the object doesn't exist if the client specifies
may read and may write (in this case, Filer::probe). Look at the exists
bit in the object context. If the object is supposed to exist, we should never get ENOENT from stat.
Signed-off-by: Sage Weil <sage@newdream.net>
The Makefile never integrated with the surrounding automake
setup, and is unused.
The test helper has failed to compile for quite a long time.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
This got broken in commit f842bcf893
so that on any MDS restart the OSD would die. Bad OSD! Bad!
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>