PG: correct sub-state names in ReplicaActive

Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
message: add missing print statement for REJECT message

Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
message: add MRecoveryReserve

This message will be used to reserve and release recovery slots on
replica PGs.

Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
osd: add PG state recovery_wait

Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
client: Fix state of symlink with absolute path

Symlinks that have an absolute path are not getting
properly dereferenced in path_walk() due to a bug
with the cur and next inode pointers, and because
the path position wasn't getting reset on the symlink
dereference.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
test: Add symlink test for absolute paths

Signed-off-by: Sam Lang <sam.lang@inktank.com>
client: simplify path_walk() loop

Most paths were kludging around the for loop's i++.  Switch to a while
loop to avoid such tomfoolery.

Signed-off-by: Sage Weil <sage@inktank.com>
client: always follow non-trailing symlinks

If we are walking /a/b/c and a or b is a symlink, follow it.  It's only
c that we don't follow when !followsym.

Signed-off-by: Sage Weil <sage@inktank.com>
test script for s3 tests
Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
osd/: encode LOST_REVERT reverting_to in prior_version pos

This will allow older osds to interpret the LOST_REVERT event
correctly.

Signed-off-by: Samuel Just <sam.just@inktank.com>
test: Add tests for symlink pathological cases

The DirSyms test checks verifies that the new path_walk()
handling code properly walks through symlinked directories
even if the followsym flag is false.

The LoopSyms test checks that we correctly handle symlink
loops, where /a/b/c points back to /a.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
client:  Fix path_walk() to support dir symlinks

Additions to Sage's commits that replace the path walked so
far with the symlinked directory path, rather than the remainder
of the path to walk.  This allows the dir symlink tests to
succeed.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
client: Add symlink loop checking in path_walk()

If a loop exists in directories due to a symlink: /a/b/c -> /a
We now return -ELOOP from path_walk() instead of looping forever.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
mds: base loner decision on wanted RD|WR|EXCL, not CACHE|BUFFER

Observed instance where one client wanted the Fc cap and prevented the
loner from getting RD|WR caps.

Signed-off-by: Sage Weil <sage@inktank.com>
mds: move to from loner -> mix if *anyone* wants rd|wr

We were either going to MIX or SYNC depending on whether non-loners wanted
to read/write, but it may be that the loner wants to if our logic for
choosing loner vs not longer is based on anything other that just rd|wr
wanted.

Signed-off-by: Sage Weil <sage@inktank.com>
qa: disable xfstest 45 until mount issue is resolved on precise

Meh

Signed-off-by: Sage Weil <sage@inktank.com>
client: kick waiters for an mds session to open on mds recovery

We already kicked waiters for request, but we need to kick waiters on open
too (e.g., a client trying to mount).

Signed-off-by: Sage Weil <sage@inktank.com>
qa: Script to run fio and template file

Signed-off-by: Sam Lang <sam.lang@inktank.com>
Merge remote-tracking branch 'upstream/wip_lost_unfound_event'

Reviewed-by: Sage Weil <sage@inktank.com>
osd/: add pool min_size parameter for min acting set size

Otherwise, a pg might go active with a single osd in the
acting set.  If that osd subsequently dies, we potentially
loose client writes.  Note: it's still possible for the
acting set to exceed min_size but fail to obey the spirit
of the user's crush settings (e.g., min_size is 2, but both
osds happen to be no the sam node).

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil: <sage@inktank.com>