]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
14 years agoceph_context: whitespace
Sage Weil [Fri, 26 Aug 2011 04:29:52 +0000 (21:29 -0700)]
ceph_context: whitespace

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoMerge commit 'v0.34'
Sage Weil [Sat, 27 Aug 2011 16:27:41 +0000 (09:27 -0700)]
Merge commit 'v0.34'

14 years agov0.34 v0.34
Sage Weil [Sat, 27 Aug 2011 04:48:47 +0000 (21:48 -0700)]
v0.34

14 years agorgw: use formatter->dump_string() instead of dump_format()
Yehuda Sadeh [Fri, 26 Aug 2011 23:54:05 +0000 (16:54 -0700)]
rgw: use formatter->dump_string() instead of dump_format()

14 years agorgw: get bucket info only if bucket name is not empty
Yehuda Sadeh [Fri, 26 Aug 2011 21:10:25 +0000 (14:10 -0700)]
rgw: get bucket info only if bucket name is not empty

14 years agoMakefile.am: install coverage files for libtool outputs as well
Josh Durgin [Thu, 11 Aug 2011 19:01:15 +0000 (12:01 -0700)]
Makefile.am: install coverage files for libtool outputs as well

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agolibrados: watch request should wait for safe response
Yehuda Sadeh [Fri, 26 Aug 2011 18:43:47 +0000 (11:43 -0700)]
librados: watch request should wait for safe response

14 years agoobjectcacher: only want for commit
Sage Weil [Fri, 26 Aug 2011 16:47:03 +0000 (09:47 -0700)]
objectcacher: only want for commit

There was some old, weird stuff going on here where we would wait for the
ACK and COMMIT separately.  This is just wrong.  Writeback does not
complete until the data is committed on disk.

Simplify by waiting only for commit, removing all the 'ack' code, and
going back to a single callback (flush_set).

I didn't notice this for 05063867e2a54176ffc9bbc73391f52766ab403f; both of
these cleanups are needed to fix this.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: fix shadow
Sage Weil [Fri, 26 Aug 2011 16:10:21 +0000 (09:10 -0700)]
mds: fix shadow

Coverity cid 29

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agofix utime.h #include recursion
Sage Weil [Fri, 26 Aug 2011 16:09:45 +0000 (09:09 -0700)]
fix utime.h #include recursion

Coverity cid 11, 13

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agocrush: comment fall-thru
Sage Weil [Fri, 26 Aug 2011 16:00:08 +0000 (09:00 -0700)]
crush: comment fall-thru

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: remove unused Mutation in do_rmdir_rollback()
Sage Weil [Thu, 25 Aug 2011 19:28:32 +0000 (12:28 -0700)]
mds: remove unused Mutation in do_rmdir_rollback()

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoworkunits: make file_layout test setting only one parameter
Greg Farnum [Thu, 25 Aug 2011 19:40:55 +0000 (12:40 -0700)]
workunits: make file_layout test setting only one parameter

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agocephfs: use strtol instead of atoi; handle 0 properly
Greg Farnum [Thu, 25 Aug 2011 19:22:02 +0000 (12:22 -0700)]
cephfs: use strtol instead of atoi; handle 0 properly

Besides being generally better, this means we can accept pool 0
as the pool to store stuff in.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agocephfs: fix the stripe_count documentation.
Greg Farnum [Thu, 25 Aug 2011 16:24:58 +0000 (09:24 -0700)]
cephfs: fix the stripe_count documentation.

Whoops!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomds: server: should apply new layout settings on top of old layout
Greg Farnum [Thu, 25 Aug 2011 18:28:42 +0000 (11:28 -0700)]
mds: server: should apply new layout settings on top of old layout

This way, the MDS can handle updates of some values without needing
the user to specify the entire layout (ie, they can just switch pools).
This brings the behavior more in line with setting the dir layout.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomds: allow setting all options on a file layout.
Greg Farnum [Thu, 25 Aug 2011 16:49:38 +0000 (09:49 -0700)]
mds: allow setting all options on a file layout.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoobjectcacher: remove uncommitted xlist<>; fix broken purge() cleanup
Sage Weil [Thu, 25 Aug 2011 19:37:18 +0000 (12:37 -0700)]
objectcacher: remove uncommitted xlist<>; fix broken purge() cleanup

There was a problem where:

 - we would dirty some buffers on an object
   - bump dirty_tx count
 - flush()
   - this adds the Object to ObjectSet::uncommitted
 - truncate
   - client clears FILE_BUFFER cap_ref
   - Object::purge()
     - clear dirty_tx count
 - client puts last inode
   - Object::uncommitted is not empty in ~ObjectSet

(This was triggered after several runs of workunits/suites/blogbensh.sh
on sepia.)

It turns out the uncommitted xlist<> is pretty useless, though: the same
information is captured in the dirty_tx counter.  We add a separate
counter to the Object itself (for the benefit of Object::can_close()).

We also clean up Object::purge() to call truncate(0), a small
simplification.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agorgw: remove some compilation warnings
Yehuda Sadeh [Thu, 25 Aug 2011 19:11:58 +0000 (12:11 -0700)]
rgw: remove some compilation warnings

14 years agorgw: don't override ret value in do_read_permisions
Yehuda Sadeh [Thu, 25 Aug 2011 19:06:16 +0000 (12:06 -0700)]
rgw: don't override ret value in do_read_permisions

14 years agorgw: return correct bucket missing error when needed
Yehuda Sadeh [Thu, 25 Aug 2011 18:25:19 +0000 (11:25 -0700)]
rgw: return correct bucket missing error when needed

14 years agorgw: fix 500 error on bucket creation
Yehuda Sadeh [Thu, 25 Aug 2011 18:11:17 +0000 (11:11 -0700)]
rgw: fix 500 error on bucket creation

14 years agorgw: fix clitest
Sage Weil [Thu, 25 Aug 2011 00:32:07 +0000 (17:32 -0700)]
rgw: fix clitest

14 years agoMonClient: fix possible null dereference
Colin Patrick McCabe [Thu, 25 Aug 2011 00:19:41 +0000 (17:19 -0700)]
MonClient: fix possible null dereference

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomds/Server.c: fix memory leak in err path
Colin Patrick McCabe [Wed, 24 Aug 2011 23:36:12 +0000 (16:36 -0700)]
mds/Server.c: fix memory leak in err path

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agorgw: don't check for zero content when creating a bucket
Yehuda Sadeh [Thu, 25 Aug 2011 00:07:04 +0000 (17:07 -0700)]
rgw: don't check for zero content when creating a bucket

14 years agorgw: rgw_admin bucket stats dumps owner
Yehuda Sadeh [Thu, 25 Aug 2011 00:01:04 +0000 (17:01 -0700)]
rgw: rgw_admin bucket stats dumps owner

14 years agoclient: drop useless insert_trace timestamp argument
Sage Weil [Wed, 24 Aug 2011 23:54:02 +0000 (16:54 -0700)]
client: drop useless insert_trace timestamp argument

This is reachable via request.  It was also misnamed in the header :/.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoclient: be careful about replacing dentries during readdir assimilation
Sage Weil [Wed, 24 Aug 2011 23:51:15 +0000 (16:51 -0700)]
client: be careful about replacing dentries during readdir assimilation

When we are assimilate readdir results into our cache, we need to be more
careful about replacing existing dentries.  We were calling
insert_dentry_inode(), which would replace a name if it already exists,
which might include pd->first, an active iterator.

Move the dentry link/relink into the caller (where we already have an
iterator pointing to the existing item, if any).  Then update the dentry
lease information separately.

Fixes: #1391
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agorgw: add radosgw_admin bucket stats
Yehuda Sadeh [Wed, 24 Aug 2011 23:41:10 +0000 (16:41 -0700)]
rgw: add radosgw_admin bucket stats

14 years agoclient: factor update_dentry_lease() out of insert_dentry_inode()
Sage Weil [Wed, 24 Aug 2011 23:25:49 +0000 (16:25 -0700)]
client: factor update_dentry_lease() out of insert_dentry_inode()

The first bit of insert_dentry_inode() handles the details of checking
whether an item still exists, un/relinking it, etc.

The second bit just updates the dentry lease information.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agolibrados: fix memory leak in error path
Colin Patrick McCabe [Wed, 24 Aug 2011 22:51:38 +0000 (15:51 -0700)]
librados: fix memory leak in error path

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest/confutils.cc: fix resource leak
Colin Patrick McCabe [Wed, 24 Aug 2011 21:52:47 +0000 (14:52 -0700)]
test/confutils.cc: fix resource leak

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoclient: carry inode reference across calls to _flush
Sage Weil [Wed, 24 Aug 2011 22:04:10 +0000 (15:04 -0700)]
client: carry inode reference across calls to _flush

Also drop the unused _flush Context* argument.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agorgw: fix prepare_get_obj when ENOENT
Yehuda Sadeh [Wed, 24 Aug 2011 22:02:01 +0000 (15:02 -0700)]
rgw: fix prepare_get_obj when ENOENT

14 years agorbd: fix shared_ptr usage
Colin Patrick McCabe [Wed, 24 Aug 2011 21:50:26 +0000 (14:50 -0700)]
rbd: fix shared_ptr usage

shared_ptr calls the disposal function even when the pointer is null
that is being disposed of.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agodo_kernel_showmapped: fix resource leak
Colin Patrick McCabe [Wed, 24 Aug 2011 21:42:19 +0000 (14:42 -0700)]
do_kernel_showmapped: fix resource leak

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoMerge remote branch 'origin/next'
Sage Weil [Wed, 24 Aug 2011 21:40:42 +0000 (14:40 -0700)]
Merge remote branch 'origin/next'

14 years agoclient: fix readdir + cap recovation/reissue race
Sage Weil [Wed, 24 Aug 2011 21:38:25 +0000 (14:38 -0700)]
client: fix readdir + cap recovation/reissue race

The current race:
 - we start readdir
 - mds revokes dir cap
 - some file gets removed
 - mds reissues dir cap
 - we finish readdir and set I_COMPLETE

We should only set it if there have been no FILE_SHARED reissues during
the readdir.

Note that we still set I_COMPLETE even if we don't have the cap; that's
useless but harmless, since it is undefined without FILE_SHARED being
set.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agorados_sync: fix resource leak on err
Colin Patrick McCabe [Wed, 24 Aug 2011 21:14:50 +0000 (14:14 -0700)]
rados_sync: fix resource leak on err

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoCephBroker.cc: fix allocation/deallocation mismatch
Colin Patrick McCabe [Wed, 24 Aug 2011 21:14:25 +0000 (14:14 -0700)]
CephBroker.cc: fix allocation/deallocation mismatch

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest_rados_tool.sh: test export with --workers
Colin Patrick McCabe [Wed, 24 Aug 2011 17:51:04 +0000 (10:51 -0700)]
test_rados_tool.sh: test export with --workers

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agorados_sync: make number of worker threads configurable
Colin Patrick McCabe [Wed, 24 Aug 2011 17:41:44 +0000 (10:41 -0700)]
rados_sync: make number of worker threads configurable

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agorgw: clear warning
Yehuda Sadeh [Wed, 24 Aug 2011 20:17:20 +0000 (13:17 -0700)]
rgw: clear warning

14 years agoMerge branch 'wip-decouple-bucket'
Yehuda Sadeh [Wed, 24 Aug 2011 19:29:32 +0000 (12:29 -0700)]
Merge branch 'wip-decouple-bucket'

14 years agojournaler: fix waiting_for_zero clearing, again
Sage Weil [Wed, 24 Aug 2011 18:01:00 +0000 (11:01 -0700)]
journaler: fix waiting_for_zero clearing, again

We can only clear this when we have >= a period between flush_pos and
write_pos.

Clear the flag in _do_flush() so the check is not fragile, should this
ever be changed in the future.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoRevert "pipe.c: #define GNU_SOURCE"
Sage Weil [Wed, 24 Aug 2011 16:38:09 +0000 (09:38 -0700)]
Revert "pipe.c: #define GNU_SOURCE"

This reverts commit ae9ba2249e372e7435e56f54fc2d8e22f3e42ff8.

This is handled in master by the Makefile.

14 years agoMerge branch 'next'
Sage Weil [Wed, 24 Aug 2011 16:38:01 +0000 (09:38 -0700)]
Merge branch 'next'

14 years agoclient: only link directories into hierarchy once
Sage Weil [Wed, 24 Aug 2011 16:31:22 +0000 (09:31 -0700)]
client: only link directories into hierarchy once

Directories can only link into the hierarchy once.  We assert as much
in readdir_r_cb().  Fix link() so that it unlinked the directory from the
old location when relinking somewhere new.  Be careful to do this after
we take inode refs to avoid any unpleasantness.

Fixes: #1429
Reported-by: Sam Lang <samlang@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomon: fix store_state
Sage Weil [Wed, 24 Aug 2011 04:25:13 +0000 (21:25 -0700)]
mon: fix store_state

We need to bound the range we write to disk by m->last_committed; this got
lost in translation in commit dfab2c91f53289b1d527fb87126a639f5d5275f1.

Fixes paxos crashes in handle_begin

mon/Paxos.cc: In function 'void Paxos::handle_begin(MMonPaxos*)', in thread '0x7fc74d11f700'
mon/Paxos.cc: 393: FAILED assert(begin->last_committed == last_committed)

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agojournaler: fix waiting_for_zero clearing
Sage Weil [Wed, 24 Aug 2011 00:33:44 +0000 (17:33 -0700)]
journaler: fix waiting_for_zero clearing

Clear this flag only if we know no subsequent flushes could be waiting on
a prezero operation.

Fixes MDS journaling hang under heavy journal load.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoMerge branch 'master' into wip-decouple-bucket
Yehuda Sadeh [Wed, 24 Aug 2011 01:53:10 +0000 (18:53 -0700)]
Merge branch 'master' into wip-decouple-bucket

14 years agoadd missing include, required for certain environments
Yehuda Sadeh [Wed, 24 Aug 2011 01:52:35 +0000 (18:52 -0700)]
add missing include, required for certain environments

14 years agoMerge remote-tracking branch 'origin/master' into wip-decouple-bucket
Yehuda Sadeh [Wed, 24 Aug 2011 01:52:08 +0000 (18:52 -0700)]
Merge remote-tracking branch 'origin/master' into wip-decouple-bucket

Conflicts:
src/rgw/rgw_rados.cc

14 years agorgw: fix multipart upload
Yehuda Sadeh [Wed, 24 Aug 2011 01:33:12 +0000 (18:33 -0700)]
rgw: fix multipart upload

don't try to reset meta object with category

14 years agoparallelize rados export and import
Colin Patrick McCabe [Tue, 23 Aug 2011 17:45:29 +0000 (10:45 -0700)]
parallelize rados export and import

* use workqueues to parallelize rados export and import

* Put export and import into separate files

* Fix RADOS_SYNC_TMP_SUFFIX_LEN bug

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoWorkQueue: don't be chatty about finishing workers
Colin Patrick McCabe [Tue, 23 Aug 2011 18:13:03 +0000 (11:13 -0700)]
WorkQueue: don't be chatty about finishing workers

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest_rados_tool.sh: fix xattr test
Colin Patrick McCabe [Tue, 23 Aug 2011 18:12:38 +0000 (11:12 -0700)]
test_rados_tool.sh: fix xattr test

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agolibrados: fix IoCtx copy constructor
Colin Patrick McCabe [Tue, 23 Aug 2011 17:57:04 +0000 (10:57 -0700)]
librados: fix IoCtx copy constructor

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agorados_sync:don't need to declare CHANGED_XATTRS 2x
Colin Patrick McCabe [Mon, 22 Aug 2011 19:55:55 +0000 (12:55 -0700)]
rados_sync:don't need to declare CHANGED_XATTRS 2x

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoSome fixes to double-dash support, fix warning
Colin Patrick McCabe [Wed, 24 Aug 2011 01:12:06 +0000 (18:12 -0700)]
Some fixes to double-dash support, fix warning

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agorgw: if pool is empty recreate
Yehuda Sadeh [Wed, 24 Aug 2011 01:06:02 +0000 (18:06 -0700)]
rgw: if pool is empty recreate

14 years agoceph_argparse: handle double dashes consistently
Colin Patrick McCabe [Tue, 23 Aug 2011 23:30:03 +0000 (16:30 -0700)]
ceph_argparse: handle double dashes consistently

Handle double dashes in the ceph_argparse functions, so that any piece
of code doing argument parsing will correctly interpret them.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoinjectargs: binary flags only consume 1 token
Colin Patrick McCabe [Tue, 23 Aug 2011 22:43:52 +0000 (15:43 -0700)]
injectargs: binary flags only consume 1 token

Never consume more than one token when parsing a binary flag.

Basically, your choices are --foo=false, --foo=true, and just --foo.
However, only 1 token will ever be examined.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoconfig: print warning on injectargs parse fail
Colin Patrick McCabe [Tue, 23 Aug 2011 21:46:05 +0000 (14:46 -0700)]
config: print warning on injectargs parse fail

injectargs should print a warning message when its parser fails.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoinjectargs test: test foo=true
Colin Patrick McCabe [Tue, 23 Aug 2011 21:34:08 +0000 (14:34 -0700)]
injectargs test: test foo=true

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomon: allow wildcards for mon cap command matching
Sage Weil [Tue, 23 Aug 2011 22:18:29 +0000 (15:18 -0700)]
mon: allow wildcards for mon cap command matching

We need wildcards, actually.  * is any token, ... is 1 or more tokens.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agocommon/config: fix get_val for booleans
Colin Patrick McCabe [Tue, 23 Aug 2011 21:25:25 +0000 (14:25 -0700)]
common/config: fix get_val for booleans

md_config_t::get_val should return true/false for booleans, not 0/1.
This is for consistency with the setter.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agopipe.c: #define GNU_SOURCE
Colin Patrick McCabe [Mon, 22 Aug 2011 22:06:16 +0000 (15:06 -0700)]
pipe.c: #define GNU_SOURCE

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoqa: add unit tests for mon cap 'allow command ...' stanzas
Sage Weil [Tue, 23 Aug 2011 21:03:47 +0000 (14:03 -0700)]
qa: add unit tests for mon cap 'allow command ...' stanzas

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomon: whitelist individual commands in mon cap string
Sage Weil [Tue, 23 Aug 2011 20:56:46 +0000 (13:56 -0700)]
mon: whitelist individual commands in mon cap string

This lets you whitelist a command prefix.  For example,

 'allow command osd foo'

will let you do any command that begins with 'osd foo', including
'osd foo' and 'osd foo bar baz bam'.

No deny, and no pattern matching.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomon: adjust max_devices when adding to crush map
Sage Weil [Tue, 23 Aug 2011 19:59:02 +0000 (12:59 -0700)]
mon: adjust max_devices when adding to crush map

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agocrush: refuse to add item >= max_devices
Sage Weil [Tue, 23 Aug 2011 19:58:46 +0000 (12:58 -0700)]
crush: refuse to add item >= max_devices

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomon: 'osd gstcrushmap' or 'osd crush set' both work
Sage Weil [Tue, 23 Aug 2011 19:47:17 +0000 (12:47 -0700)]
mon: 'osd gstcrushmap' or 'osd crush set' both work

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomon: fix arg count checks
Sage Weil [Tue, 23 Aug 2011 19:45:02 +0000 (12:45 -0700)]
mon: fix arg count checks

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomon: 'osd crush reweight <name> <weight>'
Sage Weil [Tue, 23 Aug 2011 19:40:14 +0000 (12:40 -0700)]
mon: 'osd crush reweight <name> <weight>'

Reweight a node in the crush map.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomon: 'osd crush rm <name>'
Sage Weil [Tue, 23 Aug 2011 19:33:46 +0000 (12:33 -0700)]
mon: 'osd crush rm <name>'

This is similar to crushtool --remove-item.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomon: 'osd crush add <id> <name> <weight> [<loc1=foo> [<loc2=bar> ...]]'
Sage Weil [Tue, 23 Aug 2011 19:31:35 +0000 (12:31 -0700)]
mon: 'osd crush add <id> <name> <weight> [<loc1=foo> [<loc2=bar> ...]]'

This is identical to the crushtool --add-item functionality, but does not
require a racy and tedious

 - get crush map
 - update crush map
 - set new crush map

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomon: return error message string when no other output string specified
Sage Weil [Tue, 23 Aug 2011 19:26:32 +0000 (12:26 -0700)]
mon: return error message string when no other output string specified

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agocommon/config: honor --
Colin Patrick McCabe [Tue, 23 Aug 2011 18:43:03 +0000 (11:43 -0700)]
common/config: honor --

Argument parsing should stop after --

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomon: remove dead 'setmap' code
Sage Weil [Tue, 23 Aug 2011 18:23:31 +0000 (11:23 -0700)]
mon: remove dead 'setmap' code

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomon: make auto-marking of booting osds 'in' optional
Sage Weil [Tue, 23 Aug 2011 18:21:44 +0000 (11:21 -0700)]
mon: make auto-marking of booting osds 'in' optional

By default we mark a booting OSD 'in' so that it immediately gets data.
Make this optional.

Eventually we may want to make this default to off...

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoclient: kill dentry_of() macro
Sage Weil [Tue, 23 Aug 2011 18:20:53 +0000 (11:20 -0700)]
client: kill dentry_of() macro

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoMerge branch 'next'
Sage Weil [Tue, 23 Aug 2011 16:25:21 +0000 (09:25 -0700)]
Merge branch 'next'

14 years agoosd_types: fix category encoding in object_info_t
Sage Weil [Tue, 23 Aug 2011 16:24:25 +0000 (09:24 -0700)]
osd_types: fix category encoding in object_info_t

This was mis-merged in f6ff0f14e9a5b70d5ce0277975d321f10e3b39c7.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoqa: define _GNU_SOURCE for qa helpers; add btrfs dir makefile
Sage Weil [Tue, 23 Aug 2011 04:18:00 +0000 (21:18 -0700)]
qa: define _GNU_SOURCE for qa helpers; add btrfs dir makefile

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agolibrados: whitespace
Sage Weil [Mon, 22 Aug 2011 01:19:40 +0000 (18:19 -0700)]
librados: whitespace

Don't do

some::class::
method(int foo)
{

}

...because then I can't '^S::method'. :)

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agolibrbd: reimplement copy using read_iterate
Sage Weil [Mon, 22 Aug 2011 23:53:45 +0000 (16:53 -0700)]
librbd: reimplement copy using read_iterate

Ah, so much simpler!

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agorbd: fix check_io for snap
Sage Weil [Mon, 22 Aug 2011 23:52:45 +0000 (16:52 -0700)]
rbd: fix check_io for snap

Need to look at image size for snapshot, not the head version.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agolibrbd: fix copy
Sage Weil [Mon, 22 Aug 2011 23:38:05 +0000 (16:38 -0700)]
librbd: fix copy

This was croaking on sparse images.

Use an image ctx for the dest.

We should probably use read_iterate instead.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoqa: add rbd copy workunit
Sage Weil [Mon, 22 Aug 2011 23:36:19 +0000 (16:36 -0700)]
qa: add rbd copy workunit

Test copying an image and snapshot.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomdcache: documentation for path_traverse
Greg Farnum [Mon, 22 Aug 2011 22:58:27 +0000 (15:58 -0700)]
mdcache: documentation for path_traverse

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomdcache: Reduce the gratuitous references to onfail
Greg Farnum [Mon, 22 Aug 2011 22:58:16 +0000 (15:58 -0700)]
mdcache: Reduce the gratuitous references to onfail

We've been setting flags at the beginning of path_traverse
for a while; use those instead of ongoing comparisons.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomds: remove the unused MDS_TRAVERSE_FAIL flag.
Greg Farnum [Mon, 22 Aug 2011 22:56:35 +0000 (15:56 -0700)]
mds: remove the unused MDS_TRAVERSE_FAIL flag.

This isn't used, and judging by the comments was a horrible lie.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomdcache: handle unreadable null dentries
Greg Farnum [Mon, 22 Aug 2011 22:00:18 +0000 (15:00 -0700)]
mdcache: handle unreadable null dentries

Previously, we were asserting (farther down) if the dentry was
null but blocked by a lock. Instead, we should here be waiting
until it's readable instead of just continuing on.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agolibrbd: specify copy src image as image handle
Sage Weil [Mon, 22 Aug 2011 23:02:36 +0000 (16:02 -0700)]
librbd: specify copy src image as image handle

By specifying via an image handle we can set the snapshot on the src
image.  This also makes the API cleaner.

Fixes: #1416
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoDefine _GNU_SOURCE in src/Makefile.am
Colin Patrick McCabe [Mon, 22 Aug 2011 22:35:13 +0000 (15:35 -0700)]
Define _GNU_SOURCE in src/Makefile.am

We end up needing _GNU_SOURCE in a bunch of places-- to get direct i/o,
pipe2, and some other Linux-specific interfaces.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agopipe.c: #define GNU_SOURCE
Colin Patrick McCabe [Mon, 22 Aug 2011 22:06:16 +0000 (15:06 -0700)]
pipe.c: #define GNU_SOURCE

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoMerge branch 'next'
Sage Weil [Mon, 22 Aug 2011 20:59:02 +0000 (13:59 -0700)]
Merge branch 'next'

14 years agomds: open+pin stray dirfrags on startup
Sage Weil [Mon, 22 Aug 2011 20:58:39 +0000 (13:58 -0700)]
mds: open+pin stray dirfrags on startup

This ensures that the stray dirfrags are always open, which in turn ensures
that whenever we add straydn items the rstats/fragstats will get updated
properly.  This is a better solution than d3d767a.

Now we can assert the stray dirfrag is open in
get_or_create_stray_dentry() instead of calling get_or_open_dirfrag().

Signed-off-by: Sage Weil <sage@newdream.net>