]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
13 years agoqa: drop rgw.py from test_python.sh workunit
Sage Weil [Thu, 19 Apr 2012 04:27:49 +0000 (21:27 -0700)]
qa: drop rgw.py from test_python.sh workunit

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoceph.spec.in: drop rgw.py
Sage Weil [Thu, 19 Apr 2012 04:27:39 +0000 (21:27 -0700)]
ceph.spec.in: drop rgw.py

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoMakefile: drop rgw.py
Sage Weil [Thu, 19 Apr 2012 04:26:53 +0000 (21:26 -0700)]
Makefile: drop rgw.py

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agomon: fix full/nearfull ratio initialization
Sage Weil [Thu, 19 Apr 2012 00:14:09 +0000 (17:14 -0700)]
mon: fix full/nearfull ratio initialization

create_pending() is called before create_initial(), so just put these in
the first incremental.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agorgw: allow subuser creation on radosgw-admin user create
Yehuda Sadeh [Wed, 18 Apr 2012 22:45:09 +0000 (15:45 -0700)]
rgw: allow subuser creation on radosgw-admin user create

This fixes issue #2312: allow the creation of both user
and a subuser in a single radosgw-admin command.

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
13 years agoosd: dump old ops singly rather than all at once.
Sage Weil [Wed, 18 Apr 2012 21:39:18 +0000 (14:39 -0700)]
osd: dump old ops singly rather than all at once.

Fixes #2269. Convert the OpTracker::check_ops_in_flight interface
to take a vector<string> and create a separate warning for each old
Op, and dump those singly to the clog in the OSD.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Reviewed-by: Sage Weil <sage@newdream.net>
13 years agoosdmap: restructure flow in OSDMap::decode
Sage Weil [Wed, 18 Apr 2012 21:36:43 +0000 (14:36 -0700)]
osdmap: restructure flow in OSDMap::decode

Signed-off-by: Sage Weil <sage@newdream.net>
Reviewed-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agoceph-object-corpus: prune archive
Sage Weil [Wed, 18 Apr 2012 22:13:38 +0000 (15:13 -0700)]
ceph-object-corpus: prune archive

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agotest/encoding/import.sh: fix
Sage Weil [Wed, 18 Apr 2012 22:09:18 +0000 (15:09 -0700)]
test/encoding/import.sh: fix

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoMerge remote-tracking branch 'gh/wip_journal'
Sage Weil [Wed, 18 Apr 2012 21:36:15 +0000 (14:36 -0700)]
Merge remote-tracking branch 'gh/wip_journal'

Reviewed-by: Sage Weil <sage@newdream.net>
13 years agoosdmap: remove bad cct reference
Sage Weil [Wed, 18 Apr 2012 21:10:22 +0000 (14:10 -0700)]
osdmap: remove bad cct reference

Not in OSDMap

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoMerge branch 'wip-2286-ratio-a'
Sage Weil [Wed, 18 Apr 2012 20:28:54 +0000 (13:28 -0700)]
Merge branch 'wip-2286-ratio-a'

Reviewed-by: Sage Weil <sage@newdream.net>
13 years agoosdmap: workaround old bug that zeroed pool_max
Sage Weil [Wed, 18 Apr 2012 19:50:47 +0000 (12:50 -0700)]
osdmap: workaround old bug that zeroed pool_max

Signed-off-by: Sage Weil <sage@newdream.net>
Reviewed-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agopython-ceph: remove rgw bindings
Yehuda Sadeh [Wed, 18 Apr 2012 18:32:19 +0000 (11:32 -0700)]
python-ceph: remove rgw bindings

We shouldn't expose these internal apis.

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
13 years agopgmap: allow Incrementals to specify [near]full_ratios of 0
Greg Farnum [Wed, 18 Apr 2012 18:10:36 +0000 (11:10 -0700)]
pgmap: allow Incrementals to specify [near]full_ratios of 0

This commit isn't entirely safe: old monitors used 0 to mean "no change".
We can revert this (and the PGMonitor.cc portion of
841f2885318d1bcf37aab3f2947b1f40fee772a9) if we don't want to allow
0 as a valid ratio setting, and to maintain perfect backwards
compatibility.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agopgmon: add "set_full_ratio x" and "set_nearfull_ratio x" commands
Greg Farnum [Wed, 18 Apr 2012 18:04:13 +0000 (11:04 -0700)]
pgmon: add "set_full_ratio x" and "set_nearfull_ratio x" commands

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agopgmon: convert PGMonitor::prepare_command to our standard infrastructure.
Greg Farnum [Wed, 18 Apr 2012 17:03:31 +0000 (10:03 -0700)]
pgmon: convert PGMonitor::prepare_command to our standard infrastructure.

So that I can add another command.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agopgmon: remove the PGMonitor update_full_ratios stuff
Greg Farnum [Wed, 18 Apr 2012 16:34:30 +0000 (09:34 -0700)]
pgmon: remove the PGMonitor update_full_ratios stuff

Making it a config watcher is just a huge mess in terms of consistently
updating it appropriately.
The next commit will add a monitor command for changing it.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agomon: only fill in full/nearfull sets if the ratio > 0
Sage Weil [Tue, 17 Apr 2012 17:32:38 +0000 (10:32 -0700)]
mon: only fill in full/nearfull sets if the ratio > 0

This avoids putting all OSDs in both sets when the ratios are 0, as they
are with a fresh cluster and pgmap.  This also makes setting the ratio to
0 effectively disable the full/nearfull feature.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomon: unconditionally encode PGMap full ratios in the Incremental
Greg Farnum [Mon, 16 Apr 2012 18:13:45 +0000 (11:13 -0700)]
mon: unconditionally encode PGMap full ratios in the Incremental

This properly spreads the real value to peon monitors -- they weren't
seeing the right values at all before.
Initialize all related values to zero so that it's obvious if they
somehow avoided becoming set properly.
This doesn't require any kind of protocol revision, luckily -- mixing
monitors from before and after this change might result in extra work
recalculating full sets, but it won't spread bad values or anything.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agorgw-admin: user create is idempotent
Yehuda Sadeh [Tue, 17 Apr 2012 23:45:19 +0000 (16:45 -0700)]
rgw-admin: user create is idempotent

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Reviewed-by: Sage Weil <sage@newdream.net>
13 years agoosdmap: dump pool_max
Sage Weil [Tue, 17 Apr 2012 23:17:04 +0000 (16:17 -0700)]
osdmap: dump pool_max

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoMerge branch 'wip-2289-2'
Yehuda Sadeh [Tue, 17 Apr 2012 20:22:31 +0000 (13:22 -0700)]
Merge branch 'wip-2289-2'

13 years agoFileJournal: let peek_write return a reference
Samuel Just [Tue, 17 Apr 2012 20:20:05 +0000 (13:20 -0700)]
FileJournal: let peek_write return a reference

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
13 years agocommon: add blkdev.{h,cc}
Sage Weil [Tue, 17 Apr 2012 20:17:50 +0000 (13:17 -0700)]
common: add blkdev.{h,cc}

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agorbd: fix probe of source when block device
Sage Weil [Tue, 17 Apr 2012 20:12:50 +0000 (13:12 -0700)]
rbd: fix probe of source when block device

Fixes: #2304
Signed-off-by: Sage Weil <sage@newdream.net>
13 years agofilestore: factor block device size probe out into helper
Sage Weil [Tue, 17 Apr 2012 20:11:09 +0000 (13:11 -0700)]
filestore: factor block device size probe out into helper

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoFileJournal: clarify locking in header
Samuel Just [Tue, 17 Apr 2012 19:56:58 +0000 (12:56 -0700)]
FileJournal: clarify locking in header

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
13 years agoOpRequest: mark_event output is now at debug 5
Samuel Just [Tue, 17 Apr 2012 19:53:34 +0000 (12:53 -0700)]
OpRequest: mark_event output is now at debug 5

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
13 years agolibrados: add methods to check and wait for safe/complete -and- callback
Sage Weil [Tue, 17 Apr 2012 18:21:22 +0000 (11:21 -0700)]
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>
13 years agolibrbd: 'rbd cache enabled' -> 'rbd cache'
Sage Weil [Tue, 17 Apr 2012 17:45:35 +0000 (10:45 -0700)]
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>
13 years agoqa: comment out xfstest 232
Alex Elder [Tue, 17 Apr 2012 13:33:42 +0000 (08:33 -0500)]
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>
13 years agoobjecter: recalc pgid in case it wasn't a precalculated pgid
Yehuda Sadeh [Tue, 17 Apr 2012 07:14:19 +0000 (00:14 -0700)]
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>
13 years agocls_rgw: rgw_dir_suggest_changes move cur_disk_bl inside loop
Yehuda Sadeh [Tue, 17 Apr 2012 07:12:45 +0000 (00:12 -0700)]
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>
13 years agoMerge branch 'wip-oc-perf'
Sage Weil [Tue, 17 Apr 2012 04:36:06 +0000 (21:36 -0700)]
Merge branch 'wip-oc-perf'

13 years agolibrados: test get_pool_name
Sage Weil [Tue, 17 Apr 2012 04:32:45 +0000 (21:32 -0700)]
librados: test get_pool_name

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agolibrados: C bindings for get_pool_name()
Sage Weil [Tue, 17 Apr 2012 04:32:33 +0000 (21:32 -0700)]
librados: C bindings for get_pool_name()

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoMerge remote branch 'upstream/wip-guard'
Samuel Just [Mon, 16 Apr 2012 21:21:52 +0000 (14:21 -0700)]
Merge remote branch 'upstream/wip-guard'

13 years agoFilestore: fix guard errors in COLL_REMOVE and COLL_MOVE
Samuel Just [Mon, 16 Apr 2012 21:12:32 +0000 (14:12 -0700)]
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>
13 years agorgw: skip empty entries when listing a bucket
Yehuda Sadeh [Sat, 14 Apr 2012 20:59:11 +0000 (13:59 -0700)]
rgw: skip empty entries when listing a bucket

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
13 years agocls_rgw: rgw_dir_suggest_changes() don't try to decode cur_disk
Yehuda Sadeh [Sat, 14 Apr 2012 06:35:04 +0000 (23:35 -0700)]
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>
13 years agocls_rgw: don't zero out error code before reading value
Yehuda Sadeh [Sat, 14 Apr 2012 06:17:51 +0000 (23:17 -0700)]
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>
13 years agoMerge branch 'stable'
Sage Weil [Sat, 14 Apr 2012 22:38:40 +0000 (15:38 -0700)]
Merge branch 'stable'

13 years agotest_librbd: fix write sizes
Sage Weil [Sat, 14 Apr 2012 20:52:44 +0000 (13:52 -0700)]
test_librbd: fix write sizes

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agotest_idempotent_sequence: no config file
Sage Weil [Sat, 14 Apr 2012 17:22:30 +0000 (10:22 -0700)]
test_idempotent_sequence: no config file

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agorun_xfstests.sh: ensure cleanup on errors
Alex Elder [Sat, 14 Apr 2012 16:43:15 +0000 (11:43 -0500)]
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>
13 years agorun_xfstests.sh: pass test result via exit status
Alex Elder [Sat, 14 Apr 2012 16:26:21 +0000 (11:26 -0500)]
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
13 years agoobjclass: fix cls_cxx_map_remove_key()
Yehuda Sadeh [Sat, 14 Apr 2012 06:16:42 +0000 (23:16 -0700)]
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>
13 years agorgw: call dir_suggest_changes with correct bufferlist
Yehuda Sadeh [Sat, 14 Apr 2012 06:10:33 +0000 (23:10 -0700)]
rgw: call dir_suggest_changes with correct bufferlist

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
13 years agoobjectcacher: name them
Sage Weil [Sat, 14 Apr 2012 05:19:00 +0000 (22:19 -0700)]
objectcacher: name them

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agolibrados: add IoCtx::get_pool_name() to c++ api
Sage Weil [Sat, 14 Apr 2012 05:18:40 +0000 (22:18 -0700)]
librados: add IoCtx::get_pool_name() to c++ api

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoObjectCacher: use "objectcacher" instead of the CephContext::name for perfcounter...
Greg Farnum [Sat, 14 Apr 2012 00:46:12 +0000 (17:46 -0700)]
ObjectCacher: use "objectcacher" instead of the CephContext::name for perfcounter init

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agoObjectCacher: group all the function definitions properly
Greg Farnum [Fri, 13 Apr 2012 23:49:10 +0000 (16:49 -0700)]
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>
13 years agoObjectCacher: add a bunch of perfcounters
Greg Farnum [Wed, 11 Apr 2012 23:21:04 +0000 (16:21 -0700)]
ObjectCacher: add a bunch of perfcounters

Hurray, we can collect cache statistics!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agoObjectCacher: move functions out of the header.
Greg Farnum [Wed, 11 Apr 2012 20:25:52 +0000 (13:25 -0700)]
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>
13 years agoobjectcacher: perf skeleton
Yehuda Sadeh [Wed, 11 Apr 2012 17:55:54 +0000 (10:55 -0700)]
objectcacher: perf skeleton

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Conflicts:

src/osdc/ObjectCacher.cc
src/osdc/ObjectCacher.h

13 years agoqa: add run_xfsests.sh script
Alex Elder [Sat, 14 Apr 2012 02:26:22 +0000 (21:26 -0500)]
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>
13 years agotest/rbd/fsx: fix signed/unsigned warnings
Sage Weil [Sat, 14 Apr 2012 04:01:35 +0000 (21:01 -0700)]
test/rbd/fsx: fix signed/unsigned warnings

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agolibrbd: implement discard
Sage Weil [Tue, 10 Apr 2012 20:48:47 +0000 (13:48 -0700)]
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>
13 years agoMerge branch 'wip-librbd-caching'
Sage Weil [Sat, 14 Apr 2012 03:51:01 +0000 (20:51 -0700)]
Merge branch 'wip-librbd-caching'

Reviewed-by: Sage Weil <sage.weil@dreamhost.com>
13 years agotest_librbd_fsx: clean up properly
Josh Durgin [Sat, 14 Apr 2012 01:09:21 +0000 (18:09 -0700)]
test_librbd_fsx: clean up properly

Delete and close everything on exit.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agolibrbd: flush pending writes when a new snapshot is created
Josh Durgin [Sat, 14 Apr 2012 00:19:22 +0000 (17:19 -0700)]
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>
13 years agotest: port fsx to run on an rbd image instead of a file
Josh Durgin [Mon, 9 Apr 2012 19:25:47 +0000 (12:25 -0700)]
test: port fsx to run on an rbd image instead of a file

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agotest: copy fsx to rbd directory
Josh Durgin [Fri, 6 Apr 2012 21:43:36 +0000 (14:43 -0700)]
test: copy fsx to rbd directory

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years ago.gitignore: clean up to not match so many things recursively
Josh Durgin [Mon, 9 Apr 2012 19:44:20 +0000 (12:44 -0700)]
.gitignore: clean up to not match so many things recursively

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agoObjectCacher: include object when outputting a BufferHead
Josh Durgin [Mon, 9 Apr 2012 18:44:26 +0000 (11:44 -0700)]
ObjectCacher: include object when outputting a BufferHead

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agofinisher: add indent settings header
Josh Durgin [Thu, 5 Apr 2012 22:00:27 +0000 (15:00 -0700)]
finisher: add indent settings header

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agotest_librbd: flush before opening another handle to the image
Josh Durgin [Thu, 5 Apr 2012 21:16:22 +0000 (14:16 -0700)]
test_librbd: flush before opening another handle to the image

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agoObjectCacher: remove useless conditional
Josh Durgin [Thu, 5 Apr 2012 21:00:42 +0000 (14:00 -0700)]
ObjectCacher: remove useless conditional

We assert this condition at the beginning of the function.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agoObjectCacher: always delete callback in commit_set
Josh Durgin [Thu, 5 Apr 2012 20:57:35 +0000 (13:57 -0700)]
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>
13 years agolibrados: debug logging for aio writes
Josh Durgin [Thu, 5 Apr 2012 20:56:04 +0000 (13:56 -0700)]
librados: debug logging for aio writes

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agoObjectCacher: remove unused/unimplemented methods
Josh Durgin [Fri, 23 Mar 2012 17:51:31 +0000 (10:51 -0700)]
ObjectCacher: remove unused/unimplemented methods

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agoObjectCacher: remove redundant 'public:'
Josh Durgin [Fri, 23 Mar 2012 17:48:57 +0000 (10:48 -0700)]
ObjectCacher: remove redundant 'public:'

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agoRemove unused Completion.h header
Josh Durgin [Wed, 21 Mar 2012 17:43:26 +0000 (10:43 -0700)]
Remove unused Completion.h header

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agoObjectCacher: add some asserts about when the lock is held
Josh Durgin [Wed, 21 Mar 2012 17:33:58 +0000 (10:33 -0700)]
ObjectCacher: add some asserts about when the lock is held

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agolibrbd: flush cache before creating a snapshot
Josh Durgin [Mon, 9 Apr 2012 18:42:48 +0000 (11:42 -0700)]
librbd: flush cache before creating a snapshot

This is a temporary workaround until the ObjectCacher
is smarter about snapshots.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agolibrbd: fix bytes read accounting in read_iterate
Josh Durgin [Thu, 5 Apr 2012 21:14:07 +0000 (14:14 -0700)]
librbd: fix bytes read accounting in read_iterate

ObjectCacher will never do short reads, and always returns 0.
librados may do short reads at the end of an object.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agolibrbd: check for writes to snapshots
Josh Durgin [Thu, 5 Apr 2012 20:54:24 +0000 (13:54 -0700)]
librbd: check for writes to snapshots

librados does this for us normally, but caching does not check for this.
We might as well check early to avoid scheduling a bunch of aios anyway.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agolibrbd: allow writeback caching
Josh Durgin [Mon, 9 Apr 2012 20:06:40 +0000 (13:06 -0700)]
librbd: allow writeback caching

This uses the existing infrastructure of ObjectCacher for
buffer management and expiry.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agolibrbd: remove writeback window
Josh Durgin [Tue, 20 Mar 2012 18:01:27 +0000 (11:01 -0700)]
librbd: remove writeback window

This is superseded by a full-fledged writeback cache.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agoObjectCacher: remove dependency on Objecter
Josh Durgin [Mon, 9 Apr 2012 20:04:41 +0000 (13:04 -0700)]
ObjectCacher: remove dependency on Objecter

Abstract out how writeback is done with a WritebackHandler object.
For RBD caching, this will be done by librados, but the Client uses
the Objecter directly.

This also requires different locks, since librbd does not have access
to the lock the underlying Objecter uses. Thus, both lock and the
writeback handler are parameters of the ObjectCacher constructor.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agoFiler: make file_to_extents static
Josh Durgin [Mon, 9 Apr 2012 19:54:54 +0000 (12:54 -0700)]
Filer: make file_to_extents static

Now the ObjectCacher has no need for a Filer instance (not that
it had a good reason for one before).

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agoObjectCacher: check for read/write errors
Josh Durgin [Wed, 14 Mar 2012 23:44:38 +0000 (16:44 -0700)]
ObjectCacher: check for read/write errors

The objecter doesn't fix every error for us.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agolibrados: do aio callbacks in async thread
Sage Weil [Thu, 5 Apr 2012 22:55:50 +0000 (15:55 -0700)]
librados: do aio callbacks in async thread

Call user completions in an async thread.  This allows callers to call back
into librados from the callback, and allows them to take locks in their
callbacks that they hold when queuing requests (making their life much
easier).

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agolibrados: unconditonally associate IoCtxImpl with AioCompletionImpl
Sage Weil [Thu, 5 Apr 2012 04:49:40 +0000 (21:49 -0700)]
librados: unconditonally associate IoCtxImpl with AioCompletionImpl

We were only setting the pointer if we were on the aio_write_list.  Set
this pointer for any aio.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agofilestore: flush log on failure injection
Sage Weil [Sat, 14 Apr 2012 00:21:12 +0000 (17:21 -0700)]
filestore: flush log on failure injection

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoMerge branch 'wip-2226b'
Sage Weil [Sat, 14 Apr 2012 03:41:17 +0000 (20:41 -0700)]
Merge branch 'wip-2226b'

Conflicts:
src/common/config_opts.h
src/os/FileStore.cc
src/os/FileStore.h

13 years agorun_seed_to: assume tool is in path, not cwd
Sage Weil [Sat, 14 Apr 2012 00:04:24 +0000 (17:04 -0700)]
run_seed_to: assume tool is in path, not cwd

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agorun_seed_to_range.sh: run filestore idempotent sequence tests over a range
Sage Weil [Sat, 14 Apr 2012 00:04:07 +0000 (17:04 -0700)]
run_seed_to_range.sh: run filestore idempotent sequence tests over a range

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agorun_seed_to.sh: set -e
Sage Weil [Fri, 13 Apr 2012 23:14:57 +0000 (16:14 -0700)]
run_seed_to.sh: set -e

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agofilestore: use our assert
Sage Weil [Fri, 13 Apr 2012 23:12:19 +0000 (16:12 -0700)]
filestore: use our assert

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agotest_idempotent_sequence: simple test script
Sage Weil [Fri, 13 Apr 2012 21:46:46 +0000 (14:46 -0700)]
test_idempotent_sequence: simple test script

Takes seed and kill point, then verifies the result.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoDeterministicOpSequence: writing to object being cloned in the same tx.
Joao Eduardo Luis [Fri, 13 Apr 2012 15:35:52 +0000 (16:35 +0100)]
DeterministicOpSequence: writing to object being cloned in the same tx.

We write to the object being cloned prior to the clone to ensure we are
cloning a valid range of bytes.

The write and the clone were being done in two distinct transactions,
which would trigger a diff mismatch if a failure happened to occur within
the write tx. By not differentiating the transactions when building a
pristine copy, we were executing one more transaction (the clone_range one)
than the transactions that were executed in the failed filestore, thus
triggering the mismatch (one more object in the pristine filestore than on
the failed filestore).

Now we issue a single transaction, containing both the clone_range()
preceded by a write().

Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
13 years agotest_idempotent_sequence: outputting collection being diff'ed.
Joao Eduardo Luis [Fri, 13 Apr 2012 15:24:06 +0000 (16:24 +0100)]
test_idempotent_sequence: outputting collection being diff'ed.

Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
13 years agotest_idempotent_sequence: Add more info on diff's dout's.
Joao Eduardo Luis [Fri, 13 Apr 2012 00:16:48 +0000 (01:16 +0100)]
test_idempotent_sequence: Add more info on diff's dout's.

Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
13 years agoFileStore: don't return ENOENT from object_map getters
Samuel Just [Thu, 12 Apr 2012 23:24:02 +0000 (16:24 -0700)]
FileStore: don't return ENOENT from object_map getters

ENOENT in those contexts means that the object_map does not know
about the object, not that the object does not exist.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
13 years agotest_idempotent_sequence: make get-last-op return 0 if no txns applied
Sage Weil [Thu, 12 Apr 2012 23:14:44 +0000 (16:14 -0700)]
test_idempotent_sequence: make get-last-op return 0 if no txns applied

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agotest_idempotent_sequence: return true from diff if different
Sage Weil [Thu, 12 Apr 2012 22:44:17 +0000 (15:44 -0700)]
test_idempotent_sequence: return true from diff if different

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agotest_idempotent_sequence: include object name in diff output
Sage Weil [Thu, 12 Apr 2012 22:30:35 +0000 (15:30 -0700)]
test_idempotent_sequence: include object name in diff output

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agotest_idempotent_sequence: fix diff return value, mount behavior
Sage Weil [Thu, 12 Apr 2012 22:27:28 +0000 (15:27 -0700)]
test_idempotent_sequence: fix diff return value, mount behavior

No mkfs!

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>