Commit Graph

19073 Commits

Author SHA1 Message Date
Samuel Just
dcd34fc8d0 FileJournal: let peek_write return a reference
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2012-04-17 13:20:05 -07:00
Sage Weil
6561484758 common: add blkdev.{h,cc}
Signed-off-by: Sage Weil <sage@newdream.net>
2012-04-17 13:17:50 -07:00
Sage Weil
82d7a68109 rbd: fix probe of source when block device
Fixes: #2304
Signed-off-by: Sage Weil <sage@newdream.net>
2012-04-17 13:12:50 -07:00
Sage Weil
41cb40ad90 filestore: factor block device size probe out into helper
Signed-off-by: Sage Weil <sage@newdream.net>
2012-04-17 13:11:09 -07:00
Samuel Just
dea853681a FileJournal: clarify locking in header
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2012-04-17 12:56:58 -07:00
Samuel Just
377f75f9c0 OpRequest: mark_event output is now at debug 5
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2012-04-17 12:53:34 -07:00
Sage Weil
98e2369efd librados: add methods to check and wait for safe/complete -and- callback
Allow user to check for (safe|complete) -and- callback return, and wait
for that condition.

Fixes: #2301
Signed-off-by: Sage Weil <sage@newdream.net>
2012-04-17 11:39:19 -07:00
Sage Weil
0be9718afc librbd: 'rbd cache enabled' -> 'rbd cache'
'enabled' is useless verbiage.  We should fix the rgw option too,
protably...

Signed-off-by: Sage Weil <sage@newdream.net>
2012-04-17 10:45:35 -07:00
Alex Elder
6cbda4c3fc qa: comment out xfstest 232
Test 232 in the xfstests suite produces an XFS error in the log
when run over an RBD device.  This is most likely an XFS problem
that will be tracked separately (in tracker 2302).

My original plan with getting this checked in was to have it run a
baseline set of the tests--all known to pass on rbd devices--with
the intention of doing ongoing work to add back missing tests (at
least from the "auto" group) as we understand and fix whatever
makes them produce failures.

So just comment out test 232 so the xfstests script is able to
run to completion without error.

Signed-off-by: Alex Elder <elder@dreamhost.com>
2012-04-17 08:33:42 -05:00
Yehuda Sadeh
e0ec286501 objecter: recalc pgid in case it wasn't a precalculated pgid
We had an issue where we didn't call it since we relied on the
existance of the object name and we were passed an empty one.
However, we still need to handle the case of list_objects, where
we don't want to recalc pgid.

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2012-04-17 00:14:19 -07:00
Yehuda Sadeh
f22da6c0d9 cls_rgw: rgw_dir_suggest_changes move cur_disk_bl inside loop
Otherwise we'd fail in case the cls_cxx_read_key failed, since
we rely on its size.

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2012-04-17 00:12:45 -07:00
Sage Weil
998498f2ea Merge branch 'wip-oc-perf' 2012-04-16 21:36:06 -07:00
Sage Weil
31d0d1d7de librados: test get_pool_name
Signed-off-by: Sage Weil <sage@newdream.net>
2012-04-16 21:32:45 -07:00
Sage Weil
2dbea12895 librados: C bindings for get_pool_name()
Signed-off-by: Sage Weil <sage@newdream.net>
2012-04-16 21:32:33 -07:00
Samuel Just
9f5b9adaf8 Merge remote branch 'upstream/wip-guard' 2012-04-16 14:21:52 -07:00
Samuel Just
2f5af83f5d Filestore: fix guard errors in COLL_REMOVE and COLL_MOVE
Use object rather than collection check in COLL_REMOVE.  Adjust
COLL_MOVE check for -1/1 distinction.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2012-04-16 14:19:29 -07:00
Yehuda Sadeh
6868ec6abf rgw: skip empty entries when listing a bucket
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2012-04-16 12:32:59 -07:00
Yehuda Sadeh
f87a6a0f27 cls_rgw: rgw_dir_suggest_changes() don't try to decode cur_disk
don't try to decode cur_disk if bufferlist is zero sized.

Signed-off-by: Yehuda Sadeh <yehuda.sadeh@dreamhost.com>
2012-04-16 12:32:59 -07:00
Yehuda Sadeh
73badda694 cls_rgw: don't zero out error code before reading value
We were zeroing the return code before reading it.

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2012-04-16 12:32:51 -07:00
Sage Weil
1bc0128999 Merge branch 'stable' 2012-04-14 15:38:40 -07:00
Sage Weil
20ab74ea47 test_librbd: fix write sizes
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-04-14 13:53:11 -07:00
Sage Weil
81c8a7b95f test_idempotent_sequence: no config file
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-04-14 10:26:15 -07:00
Alex Elder
a40fe5bdad run_xfstests.sh: ensure cleanup on errors
Because we exit on any error (due to 'set -e'), the cleanup call was
never getting made in the event of an error.  The net effect of that
was that a filesystem could be left mounted, and rbd cleanup then
couldn't complete because the module was in use.

Fix the trap call so it calls cleanup on exit as well as error.
Switch to using the capitalized signal names in the call.

Signed-off-by: Alex Elder <elder@dreamhost.com>
2012-04-14 11:43:15 -05:00
Alex Elder
3d187db501 run_xfstests.sh: pass test result via exit status
It turns out that xfstests *does* exit with non-zero status
when a test fails.  Its exit status is the number of tests
that failed (which, now that we have over 255 tests could be
an issue...)

Save the exit status and make it be the result of the run.

Signed-off-by: Alex Elder <elder@dreamhost.com
2012-04-14 11:26:21 -05:00
Yehuda Sadeh
a4dd92047c objclass: fix cls_cxx_map_remove_key()
didn't set the correct osd op, didn't do anything.

Signed-off-by: Yehuda Sadeh <yehuda.sadeh@dreamhost.com>
2012-04-13 23:53:08 -07:00
Yehuda Sadeh
b352a3e18e rgw: call dir_suggest_changes with correct bufferlist
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2012-04-13 23:10:33 -07:00
Sage Weil
a31392cf90 objectcacher: name them
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-04-13 22:19:00 -07:00
Sage Weil
28e61811dc librados: add IoCtx::get_pool_name() to c++ api
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-04-13 22:18:40 -07:00
Greg Farnum
d80c126a24 ObjectCacher: use "objectcacher" instead of the CephContext::name for perfcounter init
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2012-04-13 21:51:21 -07:00
Greg Farnum
f355875baf ObjectCacher: group all the function definitions properly
Some of the ObjectCacher functions were separate, which works poorly
if you're trying to do things like use ldout.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2012-04-13 21:51:21 -07:00
Greg Farnum
6257a94e3c ObjectCacher: add a bunch of perfcounters
Hurray, we can collect cache statistics!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2012-04-13 21:51:21 -07:00
Greg Farnum
446b5e24bc ObjectCacher: move functions out of the header.
These all set off my "big-functions-in-the-header" alarm.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2012-04-13 21:51:21 -07:00
Yehuda Sadeh
72a75730b3 objectcacher: perf skeleton
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>

Conflicts:

	src/osdc/ObjectCacher.cc
	src/osdc/ObjectCacher.h
2012-04-13 21:51:20 -07:00
Alex Elder
bf8847e7c1 qa: add run_xfsests.sh script
Add a script that runs xfstests over a pair of devices that are
specified using command line arguments.  The tests are run using
a specified filesystem type (xfs, ext4, or btrfs).

A default set of tests is run if none is specified on the command
line.  Normally there's an "auto" group used for this purpose, but
for now I've laid out a (large) subset of them that I know pass on
rbd devices.  These can be updated as we find they work reliably.

Signed-off-by: Alex Elder <elder@dreamhost.com>
2012-04-13 21:02:44 -07:00
Sage Weil
ee69f271fd test/rbd/fsx: fix signed/unsigned warnings
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-04-13 21:01:35 -07:00
Sage Weil
812c7c7aa7 librbd: implement discard
Implement sync and async discard.  Embed an ObjectWriteOperation in the
BlockCompletion struct.

The sync version does a sync op on every block, just like write()... very
stupid.  Both of these should fixed.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-04-13 20:52:09 -07:00
Sage Weil
589c6269f1 Merge branch 'wip-librbd-caching'
Reviewed-by: Sage Weil <sage.weil@dreamhost.com>
2012-04-13 20:51:01 -07:00
Josh Durgin
30805bfabb test_librbd_fsx: clean up properly
Delete and close everything on exit.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2012-04-13 20:46:36 -07:00
Josh Durgin
78d14da8aa librbd: flush pending writes when a new snapshot is created
This makes sure the state is as consistent as librbd can make it
before the snapshot is actually created.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2012-04-13 20:46:36 -07:00
Josh Durgin
b26d7024ae test: port fsx to run on an rbd image instead of a file
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2012-04-13 20:46:36 -07:00
Josh Durgin
5c2d5b1834 test: copy fsx to rbd directory
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2012-04-13 20:46:36 -07:00
Josh Durgin
9c8b3f7086 .gitignore: clean up to not match so many things recursively
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2012-04-13 20:46:35 -07:00
Josh Durgin
f464e6c37e ObjectCacher: include object when outputting a BufferHead
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2012-04-13 20:46:35 -07:00
Josh Durgin
d9aa81b0c6 finisher: add indent settings header
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2012-04-13 20:46:35 -07:00
Josh Durgin
55b6554445 test_librbd: flush before opening another handle to the image
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2012-04-13 20:46:35 -07:00
Josh Durgin
6cf226555c ObjectCacher: remove useless conditional
We assert this condition at the beginning of the function.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2012-04-13 20:46:35 -07:00
Josh Durgin
20be92ec44 ObjectCacher: always delete callback in commit_set
The GatherBuilder used later always deletes it. To make
the interface sane, delete it in every return path.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2012-04-13 20:46:35 -07:00
Josh Durgin
ee9987b201 librados: debug logging for aio writes
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2012-04-13 20:46:35 -07:00
Josh Durgin
7868dbe082 ObjectCacher: remove unused/unimplemented methods
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2012-04-13 20:46:35 -07:00
Josh Durgin
1dd9c303aa ObjectCacher: remove redundant 'public:'
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2012-04-13 20:46:35 -07:00