osd/ReplicatedPG: respect RWORDERED rados flag

If this flag is set, we need to order reads as writes.  In particular, this
means that reads will wait for degraded object recovery even if there is a
local copy.  And subsequently will be ordered after a preceding write that
is waiting for the same thing.

Signed-off-by: Sage Weil <sage@inktank.com>
librados: add OPERATION_ORDER_READS_WRITES flag

This maps to the internal RWORDERED option, which indicates that a read
should be ordered the same way a write is.

Signed-off-by: Sage Weil <sage@inktank.com>
ceph_test_rados: order racing read wrt to the COPY_FROM

The prevents:

 - send COPY_FROM, blocks on recovering object
 - send stat, procedes to return old object version
 - COPY_FROM succeeds with new version
   -> fail

Signed-off-by: Sage Weil <sage@inktank.com>
Makefile: don't use srcdir in TESTS

src/Makefile-env.am:31: error: using '$(srcdir)' in TESTS is currently broken: '$(srcdir)/unittest_bufferlist.sh'
src/Makefile.am:1:   'src/Makefile-env.am' included from here
src/Makefile-env.am:31: error: using '$(srcdir)' in TESTS is currently broken: '$(srcdir)/test/encoding/check-generated.sh'
src/Makefile.am:1:   'src/Makefile-env.am' included from here

on my (raring) laptop.

Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #639 from ceph/wip-gtest

Makefile: don't use srcdir in TESTS

Reviewed-by: Roald J. van Loon <roaldvanloon@gmail.com>
Merge pull request #637 from dachary/master

mailmap: add Matthew Roy, Matthew Wodrich
mon/PGMonitor: fix segfault when osdmap and pgmap stats are out of sync

The leader mon is responsible for propagating changes in the osdmap
into the pgmap (e.g., when a pool or osd goes away).  If that hasn't
happened yet, the pg_map map will be out of sync with the current set
of pools.  We shouldn't crash.

Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #640 from ceph/wip-mon-pgmap

fix mon crash when osdmap and pgmap aren't yet synced

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Merge pull request #632 from ceph/wip-rworder

fix up read vs write ordering flags; make ceph_test_rados use it

Reviewed-by: Greg Farnum <greg@inktank.com>
autoconf: fix build out of source tree

so that the following works:

git clone git@github.com:ceph/ceph.git
cd ceph
./autogen.sh
make distcheck

Signed-off-by: Loic Dachary <loic@dachary.org>