]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
13 years agocfuse.cc: use apply_changes API
Colin Patrick McCabe [Fri, 9 Sep 2011 16:32:47 +0000 (09:32 -0700)]
cfuse.cc: use apply_changes API

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
13 years agotestmsgr.cc: use set_val / apply_changes
Colin Patrick McCabe [Fri, 9 Sep 2011 16:30:17 +0000 (09:30 -0700)]
testmsgr.cc: use set_val / apply_changes

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
13 years agoosd/OSD.cc: use set_val / apply_changes API
Colin Patrick McCabe [Fri, 9 Sep 2011 16:28:18 +0000 (09:28 -0700)]
osd/OSD.cc: use set_val / apply_changes API

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
13 years agoFix double dash handling
Colin Patrick McCabe [Wed, 14 Sep 2011 16:53:47 +0000 (09:53 -0700)]
Fix double dash handling

Several functions examine argv in order to set options. Only the last
argument parsing pass should remove the '--' from the argument vector.
If it is removed earlier than that, entries may be parsed as options,
when that was not the user's intent.

This changes fixes the common argument parsing loops so that they do not
remove the double dash. It also rearranges some programs so that the
user's argument parsing loop comes last, rather than coming before the
common argument parsing loops.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
13 years agomds/MDS.cc: don't crash on bad injectargs
Colin Patrick McCabe [Tue, 13 Sep 2011 23:19:31 +0000 (16:19 -0700)]
mds/MDS.cc: don't crash on bad injectargs

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
13 years agodoc: Instructions how to build RPMs.
Tommi Virtanen [Wed, 14 Sep 2011 15:58:03 +0000 (08:58 -0700)]
doc: Instructions how to build RPMs.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
13 years agodoc: Say "radosgw" not "rgw".
Tommi Virtanen [Tue, 13 Sep 2011 19:34:11 +0000 (12:34 -0700)]
doc: Say "radosgw" not "rgw".

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
13 years agodoc: Shrinking of MDSes is not supported yet.
Tommi Virtanen [Tue, 13 Sep 2011 19:32:31 +0000 (12:32 -0700)]
doc: Shrinking of MDSes is not supported yet.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
13 years agoMakefile.am: fix test_librbd
Yehuda Sadeh [Wed, 14 Sep 2011 07:08:40 +0000 (00:08 -0700)]
Makefile.am: fix test_librbd

13 years agoosd/OSD.cc: don't crash on incorrect injectargs
Colin Patrick McCabe [Tue, 13 Sep 2011 20:34:30 +0000 (13:34 -0700)]
osd/OSD.cc: don't crash on incorrect injectargs

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
13 years agoPG: fix typo in PgPriorSet constructor
Samuel Just [Tue, 13 Sep 2011 21:40:27 +0000 (14:40 -0700)]
PG: fix typo in PgPriorSet constructor

down.insert(o) rather than down.insert(0)

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
13 years agotools: fix compile
Colin Patrick McCabe [Tue, 13 Sep 2011 20:40:21 +0000 (13:40 -0700)]
tools: fix compile

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
13 years agoGet rid of silly unused parameter
Colin Patrick McCabe [Mon, 12 Sep 2011 22:47:24 +0000 (15:47 -0700)]
Get rid of silly unused parameter

Apparently we were passing a string to the function so it could do:
rs = rs;

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
13 years agomonclient: reopen session on monmap change
Sage Weil [Tue, 13 Sep 2011 04:23:00 +0000 (21:23 -0700)]
monclient: reopen session on monmap change

If our cur_mon is removed from the monmap, reopen the session.  Do not
call _pick_new_mon() directly or we won't reset state, won't
reauthenticate, etc.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomonclient: use cur_con throughout
Sage Weil [Tue, 13 Sep 2011 04:07:54 +0000 (21:07 -0700)]
monclient: use cur_con throughout

We choose a monitor and open a connection in exactly two places.  Use
cur_con and cur_con->get_peer_addr() everywhere else.

Simplify and clean up handle_monmap a bit.

Also add an assert to catch #1534.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomsgr: send_keepalive to a Connection
Sage Weil [Tue, 13 Sep 2011 03:54:06 +0000 (20:54 -0700)]
msgr: send_keepalive to a Connection

This avoids the lookup, if we already have a reference.  Mirrors the
send_message() Connection variant.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agotest_librbd: remove unsigned/signed comparison
Greg Farnum [Mon, 12 Sep 2011 23:02:43 +0000 (16:02 -0700)]
test_librbd: remove unsigned/signed comparison

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agolibrbd: Update .gitignore after moving to gtest.
Tommi Virtanen [Mon, 12 Sep 2011 22:14:03 +0000 (15:14 -0700)]
librbd: Update .gitignore after moving to gtest.

Commits e2ec946858b26788595b39e9da9dcc6ce9c78f73
and 5cb7b3729bfe139cbf15e9e8508a6661483964fe
changed the names of binaries created, ignore the
new name or "make distcheck" will whine.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
13 years agoget_*_compat_set: get ctor param ordering right
Colin Patrick McCabe [Mon, 12 Sep 2011 21:25:17 +0000 (14:25 -0700)]
get_*_compat_set: get ctor param ordering right

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
13 years agoPG: assemble backlog directly rather than queueing on corrupt log
Samuel Just [Mon, 12 Sep 2011 18:35:55 +0000 (11:35 -0700)]
PG: assemble backlog directly rather than queueing on corrupt log

The queue responsible for calling generate_backlog hasn't actually been
started at that stage of startup.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
13 years agoqa: add test_librbd workunit
Sage Weil [Mon, 12 Sep 2011 17:58:44 +0000 (10:58 -0700)]
qa: add test_librbd workunit

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoRemove global ctors/dtors for CompatSet
Colin Patrick McCabe [Mon, 12 Sep 2011 18:32:03 +0000 (11:32 -0700)]
Remove global ctors/dtors for CompatSet

Instead of having global CompatSet objects, just have functions that can
return appropriate CompatSet objects. This avoids global constructor
and destructor ordering issues.

Fixes bug #1512

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
13 years agolibrados: add conf_parse_env()
Sage Weil [Mon, 12 Sep 2011 17:56:37 +0000 (10:56 -0700)]
librados: add conf_parse_env()

With optional env var name, defaults to CEPH_ARGS.

Parse it for librados and librbd api gtests.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agolibrbd: move c++ tests to gtest
Sage Weil [Mon, 12 Sep 2011 17:55:08 +0000 (10:55 -0700)]
librbd: move c++ tests to gtest

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agolibrbd: convert C tests to gtest
Sage Weil [Mon, 12 Sep 2011 04:35:21 +0000 (21:35 -0700)]
librbd: convert C tests to gtest

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agolibrbd: rev LIBRBD_VER_EXTRA for rbd_flush() addition
Sage Weil [Mon, 12 Sep 2011 03:14:01 +0000 (20:14 -0700)]
librbd: rev LIBRBD_VER_EXTRA for rbd_flush() addition

This allows qemu driver to conditionally call it if it exists.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agolibrbd: implement rbd buffered write window
Sage Weil [Mon, 12 Sep 2011 02:19:32 +0000 (19:19 -0700)]
librbd: implement rbd buffered write window

Normal disks have a write cache and acknowledge writes before they reach
the platter.  Among other things, this masks write latency.  A flush
operation is needed when the user really cares that the writes are stable.

Implement a librbd write window that allows a window including the most
recent N bytes of writes to be immediately acked.  An flush operation
blocks while they are pushed out to disk.

This differs from the typical disk in that writes are always immediately
sent to the backend store, while disks will buffer small writes for a time
(and, in fact, can be made to hold small writes in the cache indefinitely
under certain workloads).

Thus, 'rbd_writeback_window' may be a bit of a misnomer...

Currently this applies only to aio writes, not sync writes.  That could
most easily be fixed by reimplementing write in terms of aio_write.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoclient: fix odd crash on rename
Sage Weil [Mon, 12 Sep 2011 01:58:42 +0000 (18:58 -0700)]
client: fix odd crash on rename

If the old_dentry is in the same dir, and it is the last dentry, we need
to keep the dir open.

This is hard to hit because the rename itself will typically instantiate
a null dentry on the target, and it's hard to construct a working where
a racing process makes us drop it.  Fortunately this was triggered
reliably by the snaptest-git-ceph.sh workunit.

Fixes: #1519
Signed-off-by: Sage Weil <sage@newdream.net>
13 years agorbd: show progress
Sage Weil [Sun, 11 Sep 2011 21:54:33 +0000 (14:54 -0700)]
rbd: show progress

Show progress for any rbd _with_progress operations, and for import/export.

Resolves: #1495, #1496
Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomon: stray PGInfo is not an error
Sage Weil [Sat, 10 Sep 2011 23:12:04 +0000 (16:12 -0700)]
mon: stray PGInfo is not an error

It is normal to get these immediately after we delete a pool.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: fix leak of osd_lock on pg lookup vs pool deletion race
Sage Weil [Sat, 10 Sep 2011 22:51:27 +0000 (15:51 -0700)]
osd: fix leak of osd_lock on pg lookup vs pool deletion race

Fixes: #1520
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agostore_test: fix warning
Sage Weil [Sat, 10 Sep 2011 20:56:23 +0000 (13:56 -0700)]
store_test: fix warning

test/store_test.cc:318: warning: suggest a space before ';' or explicit braces around empty body in 'for' statement

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoPG: generate backlog when confronted with corrupt log
Samuel Just [Sat, 10 Sep 2011 04:39:27 +0000 (21:39 -0700)]
PG: generate backlog when confronted with corrupt log

Currently we throw out the log and start up anyway.  With this change, we
would throw out the log, generate a fresh backlog, and then start up.
That may not be the best possible thing, but it's better than what we
currently do.  Indirectly fixes #1502.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
13 years agoman: Generate manpages from doc/man.
Tommi Virtanen [Fri, 9 Sep 2011 23:25:14 +0000 (16:25 -0700)]
man: Generate manpages from doc/man.

Keeping the generated files in version control lets us
support builds from scratch without requiring the full
documentation toolchain to be installed.

The files were just copied over from build-doc/output/man,
after a ./admin/build-doc call. When redoing this, also
take care to remove any roff output if a file was removed
from doc/man, and update Makefile.am.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
13 years agodoc: Convert manpages to doc/man/.
Tommi Virtanen [Fri, 9 Sep 2011 23:21:52 +0000 (16:21 -0700)]
doc: Convert manpages to doc/man/.

Includes various content cleanups: layout of synopsis, layout
of comments in examples, typos.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
13 years agodoc: Hide TODO note in rbd.8
Tommi Virtanen [Fri, 9 Sep 2011 20:41:32 +0000 (13:41 -0700)]
doc: Hide TODO note in rbd.8

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
13 years agodoc: Make rbd.8 "pool-name", like the old man page.
Tommi Virtanen [Fri, 9 Sep 2011 20:40:42 +0000 (13:40 -0700)]
doc: Make rbd.8 "pool-name", like the old man page.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
13 years agodoc: Remove duplicate paragraph from rbd.8
Tommi Virtanen [Fri, 9 Sep 2011 20:40:18 +0000 (13:40 -0700)]
doc: Remove duplicate paragraph from rbd.8

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
13 years agoReplicatedPG: Fix src hobject_t construction in clone_range call
Samuel Just [Fri, 9 Sep 2011 21:35:47 +0000 (14:35 -0700)]
ReplicatedPG: Fix src hobject_t construction in clone_range call

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
13 years agoworkunit: use sudo when first reading /sys... too
Josh Durgin [Fri, 9 Sep 2011 21:47:42 +0000 (14:47 -0700)]
workunit: use sudo when first reading /sys... too

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agoworkunit: and delete root-owned file
Greg Farnum [Fri, 9 Sep 2011 20:41:14 +0000 (13:41 -0700)]
workunit: and delete root-owned file

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agoworkunit: you need sudo to look at /sys/kernel/debug
Greg Farnum [Fri, 9 Sep 2011 20:32:21 +0000 (13:32 -0700)]
workunit: you need sudo to look at /sys/kernel/debug

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agoMerge branch 'wip-leaks'
Greg Farnum [Fri, 9 Sep 2011 19:14:25 +0000 (12:14 -0700)]
Merge branch 'wip-leaks'

13 years agorgw: rgw_admin, init gen_secret, gen_key
Yehuda Sadeh [Fri, 9 Sep 2011 19:15:10 +0000 (12:15 -0700)]
rgw: rgw_admin, init gen_secret, gen_key

13 years agodebian: no /var/run!
Sage Weil [Fri, 9 Sep 2011 16:05:43 +0000 (09:05 -0700)]
debian: no /var/run!

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoPG.h: Initialize invalid_hash in Entry()
Samuel Just [Fri, 9 Sep 2011 00:50:39 +0000 (17:50 -0700)]
PG.h: Initialize invalid_hash in Entry()

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
13 years agodebian: create var/run/ceph
Sage Weil [Thu, 8 Sep 2011 22:03:29 +0000 (15:03 -0700)]
debian: create var/run/ceph

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agodebian: radosgw: add dirs to package
Sage Weil [Thu, 8 Sep 2011 22:03:21 +0000 (15:03 -0700)]
debian: radosgw: add dirs to package

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoceph: avoid noise when there is no output
Sage Weil [Thu, 8 Sep 2011 19:48:00 +0000 (12:48 -0700)]
ceph: avoid noise when there is no output

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoOSD: reset filestore_update_collections to false after do_convertfs
Samuel Just [Thu, 8 Sep 2011 21:52:54 +0000 (14:52 -0700)]
OSD: reset filestore_update_collections to false after do_convertfs

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
13 years agoobject.h: initalize hobject_t correctly
Samuel Just [Thu, 8 Sep 2011 21:51:02 +0000 (14:51 -0700)]
object.h: initalize hobject_t correctly

key previously was erroneously initialized to soid.oid.name in one
constructor.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
13 years agoworkunits: make file_layout.sh more robust
Greg Farnum [Thu, 8 Sep 2011 20:27:19 +0000 (13:27 -0700)]
workunits: make file_layout.sh more robust

We don't have a great way to guarantee mdsmap updates, but they
should happen on their own and we can loop. Closes #1518.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agorpm: Include ceph.spec in release tarball.
Tommi Virtanen [Thu, 8 Sep 2011 19:59:05 +0000 (12:59 -0700)]
rpm: Include ceph.spec in release tarball.

This lets users say "rpmbuild -ta ceph-XXX.tgz".

Closes: #1521
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
13 years agorpm: Create the /etc/ceph directory.
Tommi Virtanen [Thu, 8 Sep 2011 19:45:15 +0000 (12:45 -0700)]
rpm: Create the /etc/ceph directory.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
13 years agorpm: Add newly-added files to %files.
Tommi Virtanen [Thu, 8 Sep 2011 19:30:37 +0000 (12:30 -0700)]
rpm: Add newly-added files to %files.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
13 years agorpm: Build without tcmalloc, by default.
Tommi Virtanen [Thu, 8 Sep 2011 19:30:05 +0000 (12:30 -0700)]
rpm: Build without tcmalloc, by default.

You can still say "rpmbuild -ba --with tcmalloc ceph.spec"
if you have it.

Add BuildRequires on google-perftools when building with tcmalloc.
Ensure it's the right architecture.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
13 years agoceph: -o - to stdout, not stderr
Sage Weil [Thu, 8 Sep 2011 17:59:41 +0000 (10:59 -0700)]
ceph: -o - to stdout, not stderr

Don't guess fd numbers.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoMerge branch 'master' into wip-leaks
Greg Farnum [Thu, 8 Sep 2011 17:51:46 +0000 (10:51 -0700)]
Merge branch 'master' into wip-leaks

13 years agoMerge branch 'master' of ceph.newdream.net:/git/ceph
Greg Farnum [Thu, 8 Sep 2011 16:51:35 +0000 (09:51 -0700)]
Merge branch 'master' of ceph.newdream.net:/git/ceph

13 years agomon: Clean up MonSession/Connection leak on MForwards
Greg Farnum [Thu, 8 Sep 2011 16:50:00 +0000 (09:50 -0700)]
mon: Clean up MonSession/Connection leak on MForwards

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agoosd: Clean up PG leak
Greg Farnum [Thu, 8 Sep 2011 16:49:33 +0000 (09:49 -0700)]
osd: Clean up PG leak

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agoosd: clean up leak on old/unneeded peering messages
Greg Farnum [Thu, 8 Sep 2011 16:49:11 +0000 (09:49 -0700)]
osd: clean up leak on old/unneeded peering messages

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agoosd: Sessions get weak pointers to Connections
Greg Farnum [Wed, 7 Sep 2011 22:39:53 +0000 (15:39 -0700)]
osd: Sessions get weak pointers to Connections

We were previously setting up a reference loop. But the only way
to get Sessions is via the Connection, so let's just give Sessions
the pointer, and give Connections a counted ref.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agofilestore: free fiemap used for testing fs capabilities
Greg Farnum [Wed, 7 Sep 2011 15:37:17 +0000 (08:37 -0700)]
filestore: free fiemap used for testing fs capabilities

No more memory leak!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agoWorkQueue: don't deliberately leak memory
Greg Farnum [Tue, 6 Sep 2011 20:59:14 +0000 (13:59 -0700)]
WorkQueue: don't deliberately leak memory

We can't do that if we're trying to be Valgrind-clean, so just
make the lock name part of the class.
As best I can tell, that ordered initialization is safe because
data members are initialized in the order they are declared. See eg
http://xenon.arcticus.com/c-morsels-initializer-list-execution-order

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agoceph: clean up command output
Sage Weil [Thu, 8 Sep 2011 04:07:54 +0000 (21:07 -0700)]
ceph: clean up command output

Open + truncate output file _once_, and concatenate output of each command
to that fd.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoclient: some debugging
Sage Weil [Wed, 7 Sep 2011 23:51:15 +0000 (16:51 -0700)]
client: some debugging

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoclient: fix leaked Dir on rename
Sage Weil [Wed, 7 Sep 2011 23:50:29 +0000 (16:50 -0700)]
client: fix leaked Dir on rename

Need to close old_dentry->dir if the dir is empty.  This was introduced by
ed7ebf35b124a236b88a478c33db82f015a8d4a4.

Fixes: #1509
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoclient: clean up Inode ref counts slightly
Sage Weil [Wed, 7 Sep 2011 23:06:01 +0000 (16:06 -0700)]
client: clean up Inode ref counts slightly

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoOSD: info.pgid gets removed from creating_pgs before _create_lock_new_pg
Samuel Just [Wed, 7 Sep 2011 23:29:25 +0000 (16:29 -0700)]
OSD: info.pgid gets removed from creating_pgs before _create_lock_new_pg

Fix bug introduced in cd2716c4151f5c0996bb4d0cf08961f8da281dac.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
13 years agorbd: --size is megabytes, not bytes
Sage Weil [Wed, 7 Sep 2011 22:48:05 +0000 (15:48 -0700)]
rbd: --size is megabytes, not bytes

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoosd: take ondisk_read_lock on src_oids
Sage Weil [Wed, 7 Sep 2011 20:28:21 +0000 (13:28 -0700)]
osd: take ondisk_read_lock on src_oids

We need to take the ondisk read lock on src oids for multiobject operations
(like clonerange) to ensure that written data has hit disk before we
clone it elsewhere.

Order of acquisition doesn't actually matter here, since the ondisk locks
are all leaves in the lock dependency hierarchy.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoobject.h: make hobject key private, prevent objects where key == oid
Samuel Just [Wed, 7 Sep 2011 21:25:02 +0000 (14:25 -0700)]
object.h: make hobject key private, prevent objects where key == oid

There should be no difference between an object with a key identical to
its name and an object with the same name but no key.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
13 years agorgw: make loop exit case explicit, removes warning
Yehuda Sadeh [Wed, 7 Sep 2011 17:36:37 +0000 (10:36 -0700)]
rgw: make loop exit case explicit, removes warning

13 years agoREADME: update a bit
Sage Weil [Wed, 7 Sep 2011 17:23:39 +0000 (10:23 -0700)]
README: update a bit

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoIndexManager: delete index during RemoveOnDelete
Samuel Just [Wed, 7 Sep 2011 17:13:36 +0000 (10:13 -0700)]
IndexManager: delete index during RemoveOnDelete

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
13 years agoOSD: use creating_pgs[pgid].history in get_or_create_pg for new pg
Samuel Just [Wed, 7 Sep 2011 16:59:15 +0000 (09:59 -0700)]
OSD: use creating_pgs[pgid].history in get_or_create_pg for new pg

If info.pgid is in creating_pgs, we should use the history from
creating_pgs.  The history passed in will be an empty history from a
creation probe in that case.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
13 years agoclient: add inode on IMPORT
Sage Weil [Wed, 7 Sep 2011 16:48:35 +0000 (09:48 -0700)]
client: add inode on IMPORT

If we get an IMPORT and don't have the inode, add it.  This fixes a race
like:

 mds0 -> client .. mknod reply (or similar)
 mds0 -> mds1 .. migrate cap
 mds1 -> client .. send IMPORT
 client <- mds1 .. rx IMPORT, but don't have inode
 client <- mds0 .. rx mknod reply, add it.

With this fix, we add the inode and set up the cap on IMPORT, and when we
get the mknod reply we update the inode immutable fields that aren't
present in the cap message (rdev, symlink target).

Fixes: #1513
Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoclient: factor out flush_cap_releases() helper
Sage Weil [Wed, 7 Sep 2011 16:39:53 +0000 (09:39 -0700)]
client: factor out flush_cap_releases() helper

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomds: bracket LOCK|AUTH -> PREXLOCK transition with start/finish_locking
Sage Weil [Thu, 1 Sep 2011 23:32:24 +0000 (16:32 -0700)]
mds: bracket LOCK|AUTH -> PREXLOCK transition with start/finish_locking

Unlike other lock transitions, we are moving to an _unstable_ state and
then taking our (x)lock.  That means that if we don't actually finish for
some reason (lock order changes, request is canceled, whatever) we leave
things in an unstable state--in this case, PREXLOCK, where nothing else
will touch it.

Call cancel_lock in drop_locks (or in acquire_locks when the order changes)
to clean up after an aborted lock attempt.

Original but reproduced (though not easily) by multimds collection task
fsstress_thrash_subtrees.yaml.

Fixes: #1425
Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomds: _finish_xlock helper
Sage Weil [Thu, 1 Sep 2011 23:28:42 +0000 (16:28 -0700)]
mds: _finish_xlock helper

Factor out _finish_xlock helper to move from XLOCKDONE (or, later,
PREXLOCK) to a non-xlock state.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomds: mutation: add start/finish locking hooks
Sage Weil [Thu, 1 Sep 2011 23:27:49 +0000 (16:27 -0700)]
mds: mutation: add start/finish locking hooks

Keep track of which lock we are currently working on locking in the
Mutation.  Use helpers to make sure we start/finish locking in a sane
way.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomds: move Mutation + children out of MDCache.h
Sage Weil [Thu, 1 Sep 2011 21:56:48 +0000 (14:56 -0700)]
mds: move Mutation + children out of MDCache.h

Uninline while we're at it.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agolibrbd: {remove,resize,snap_rollback}_with_progress
Sage Weil [Wed, 7 Sep 2011 05:07:33 +0000 (22:07 -0700)]
librbd: {remove,resize,snap_rollback}_with_progress

C and C++ APIs.  Mirrors the copy_with_progress addition.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agomon: log when we get an error
Sage Weil [Wed, 7 Sep 2011 04:49:06 +0000 (21:49 -0700)]
mon: log when we get an error

...before we assert(!err).

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoceph.spec: spec file should be creating /var/run/ceph
Brian Chrisman [Wed, 7 Sep 2011 04:08:47 +0000 (21:08 -0700)]
ceph.spec: spec file should be creating /var/run/ceph

Signed-off-by: Brian Chrisman <brchrisman@gmail.com>
13 years agoosd: nss build of OSD.cc needs CRYPTO_CXXFLAGS since
Jim Schutt [Wed, 7 Sep 2011 04:05:38 +0000 (21:05 -0700)]
osd: nss build of OSD.cc needs CRYPTO_CXXFLAGS since

nss build fails like this:

if /bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I.   \
-D__KERNEL_STRICT_NAMES -Wall -D__CEPH__ -D_FILE_OFFSET_BITS=64 -D_REENTRANT \
-D_THREAD_SAFE -D__STDC_FORMAT_MACROS -D_GNU_SOURCE -rdynamic   -Winit-self \
-Wpointer-arith -fno-strict-aliasing -Wnon-virtual-dtor -Wno-invalid-offsetof \
-Wstrict-null-sentinel   -g -MT OSD.lo -MD -MP -MF ".deps/OSD.Tpo" -c -o OSD.lo `test \
                -f 'osd/OSD.cc' || echo './'`osd/OSD.cc; \
        then mv -f ".deps/OSD.Tpo" ".deps/OSD.Plo"; else rm -f ".deps/OSD.Tpo"; exit \
1; fi  g++ -DHAVE_CONFIG_H -I. -I. -I. -D__KERNEL_STRICT_NAMES -Wall -D__CEPH__ \
-D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_THREAD_SAFE -D__STDC_FORMAT_MACROS \
-D_GNU_SOURCE -rdynamic -Winit-self -Wpointer-arith -fno-strict-aliasing \
-Wnon-virtual-dtor -Wno-invalid-offsetof -Wstrict-null-sentinel -g -MT OSD.lo -MD -MP \
-MF .deps/OSD.Tpo -c osd/OSD.cc  -fPIC -DPIC -o .libs/OSD.o In file included from \
./os/LFNIndex.h:27,  from ./os/HashIndex.h:20,
                 from ./os/FileStore.h:26,
                 from osd/OSD.cc:25:
./common/ceph_crypto.h:44:22: error: pk11pub.h: No such file or directory

Commit d59f34ab made FileStore.h include HashIndex.h, which ultimately
results in OSD.cc including ceph_crypto.h.

Signed-off-by: Jim Schutt <jaschut@sandia.gov>
13 years agorgw: fix arg parsing
Yehuda Sadeh [Wed, 7 Sep 2011 03:40:50 +0000 (20:40 -0700)]
rgw: fix arg parsing

13 years agorbd: fix command option parsing, honor --
Colin Patrick McCabe [Wed, 7 Sep 2011 01:01:20 +0000 (18:01 -0700)]
rbd: fix command option parsing, honor --

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
13 years agocephtool: add --concise option again
Josh Durgin [Wed, 7 Sep 2011 00:27:17 +0000 (17:27 -0700)]
cephtool: add --concise option again

This was accidentally removed in the arg parsing conversion.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agorgw: prepare for supporting other meta headers
Yehuda Sadeh [Tue, 6 Sep 2011 23:57:17 +0000 (16:57 -0700)]
rgw: prepare for supporting other meta headers

13 years agoosdmaptool: fix typo in argument
Josh Durgin [Wed, 7 Sep 2011 00:10:55 +0000 (17:10 -0700)]
osdmaptool: fix typo in argument

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agodoc: Note that mkcephfs can't do upgrades etc.
Tommi Virtanen [Tue, 6 Sep 2011 23:08:58 +0000 (16:08 -0700)]
doc: Note that mkcephfs can't do upgrades etc.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
13 years agodoc: mkcephfs ssh's directly as root@
Tommi Virtanen [Tue, 6 Sep 2011 22:55:37 +0000 (15:55 -0700)]
doc: mkcephfs ssh's directly as root@

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
13 years agomkcephfs: Config $user is irrelevant when we want to run as root.
Tommi Virtanen [Tue, 6 Sep 2011 21:55:28 +0000 (14:55 -0700)]
mkcephfs: Config $user is irrelevant when we want to run as root.

It used to just not sudo if $user was empty, on non-ssh do_root_cmd's.
This bug was exposed by commit 47b09e2f0463f6a5ea8cc8e127b012a0cf1ec4af.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
13 years agoMerge branch 'wip-argparse'
Colin Patrick McCabe [Tue, 6 Sep 2011 22:39:30 +0000 (15:39 -0700)]
Merge branch 'wip-argparse'

Conflicts:
src/rgw/rgw_admin.cc

13 years agoceph tool: convert to new-style arg parsing
Colin Patrick McCabe [Thu, 1 Sep 2011 00:42:18 +0000 (17:42 -0700)]
ceph tool: convert to new-style arg parsing

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
13 years agoceph_argparse: remove unused macros, functions
Colin Patrick McCabe [Tue, 6 Sep 2011 22:19:45 +0000 (15:19 -0700)]
ceph_argparse: remove unused macros, functions

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
13 years agocfuse: use new-style argument parsing stuff
Colin Patrick McCabe [Tue, 6 Sep 2011 22:16:09 +0000 (15:16 -0700)]
cfuse: use new-style argument parsing stuff

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
13 years agocmon: use new argument parsing stuff
Colin Patrick McCabe [Tue, 6 Sep 2011 22:12:33 +0000 (15:12 -0700)]
cmon: use new argument parsing stuff

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>