rgw: ops log can also go to socket

Adding a new ops log output (into a unix domain socket).
Configuration:
  rgw_enable_usage_log : master switch for ops log
  rgw ops log socket path : set socket path
  rgw ops log rados : whether ops should be logged in the rados
                      cluster
  rgw ops log data backlog : max size in MB to be accumulated
                             without flushing

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
qa/run_xfstests.sh: drop tests 174 and 181

These tests are showing intermittent failures so we'll drop them
from the default list for the time being.

Signed-off-by: Alex Elder <elder@inktank.com>
osdc/Striper: fix handling for sparse reads in add_partial_sparse_result()

If bl_map begins *after* the first item in buffer_extents, we want to
skip only the first buffer extent before doing 'continue' to loop to the
next one.

This fixes a crash caused by underflow with a pattern like:

2012-11-20 13:54:30.347861 7f9404ed6700 10 striper add_partial_sparse_result(0x1efa088) 192 covering {12288=192} (offset 2906) to [0,5286,38054,4288]
2012-11-20 13:54:30.347863 7f9404ed6700 20 striper   t 0~5286 bl has 192 off 2906
2012-11-20 13:54:30.347866 7f9404ed6700 20 striper   s gap 9382, skipping
2012-11-20 13:54:30.347867 7f9404ed6700 20 striper   s has 192, copying
2012-11-20 13:54:30.347872 7f9404ed6700 20 striper   t 9574~18446744073709547328 bl has 0 off 12480
2012-11-20 13:54:30.347874 7f9404ed6700 20 striper   s at end
2012-11-20 13:54:30.347876 7f9404ed6700 20 striper   t 38054~4288 bl has 0 off 12480
2012-11-20 13:54:30.347877 7f9404ed6700 20 striper   s at end

Dan reproduced this with

 ./test_librbd_fsx -d -W -R -p 10 -t 1 -S 4 -N 300 rbd fsx

(although I was unable to do so).

Re-fixes #3428.

Reported-and-tested-by: Dan Mick <dan.mick@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
test_librbd_fsx: consume saved-image files as test runs

Avoid consuming lots of disk space by holding only as many file
copies as needed (compare the n-2 file as we make clone n).
test_librbd_fsx: Add OP_FLATTEN
set the nonce unconditionally on bind
rgw: fix memory leaks

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: fix xml parser leak

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
crypto: fix nss related leak

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: signal shuts down fcgi socket

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: fix cleanup

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
msgr: use get_myaddr and set_myaddr to set the nonce

We can't set it directly via get_myaddr as its a const ref. Dur.

Signed-off-by: Greg Farnum <greg@inktank.com>
rbd: make snap purge fail if removing a snap fails

Otherwise we report 100% removed when some may have failed.

Reported-by: Andrey Korolyov <andrey@xdel.ru>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
rgw: fix usage accounting

bytes_sent and bytes_received are no longer accounted
in the req_state, needed to get them out of the ClientIO
object.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Try using syscall() for syncfs if not supported directly by glibc

Signed-off-by: Dan Mick <dan.mick@inktank.com>
crush: prevent loops from insert_item

If the insertion would create a loop, return -EINVAL.

Fixes: #3515
Signed-off-by: Sage Weil <sage@inktank.com>
Merge branch 'wip-opslog-socket2' into next

Conflicts:
	src/rgw/rgw_main.cc
Merge remote-tracking branch 'origin/next' into next
mds: child directory inherits SGID bit

Update the inode, not the local variable.

Reported-by: Giorgos Kappes <geokapp@gmail.com>
Signed-off-by: Sage Weil <sage@inktank.com>
Merge remote-tracking branch 'origin/next' into next