Commit Graph

16505 Commits

Author SHA1 Message Date
Tommi Virtanen
37f1b96922 librbd: Update .gitignore after moving to gtest.
Commits e2ec946858
and 5cb7b3729b
changed the names of binaries created, ignore the
new name or "make distcheck" will whine.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-09-12 15:14:03 -07:00
Colin Patrick McCabe
f74f603d2a get_*_compat_set: get ctor param ordering right
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-09-12 14:31:18 -07:00
Samuel Just
9a1e13cf73 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>
2011-09-12 14:08:41 -07:00
Sage Weil
6228389df8 qa: add test_librbd workunit
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-12 14:01:46 -07:00
Colin Patrick McCabe
e84996de69 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>
2011-09-12 11:38:10 -07:00
Sage Weil
923c60c588 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>
2011-09-12 10:56:37 -07:00
Sage Weil
5cb7b3729b librbd: move c++ tests to gtest
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-12 10:55:08 -07:00
Sage Weil
e2ec946858 librbd: convert C tests to gtest
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-11 21:35:21 -07:00
Sage Weil
9b6f3e1679 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>
2011-09-11 20:14:01 -07:00
Sage Weil
b90be90dfe 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>
2011-09-11 19:19:32 -07:00
Sage Weil
c9159a0410 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>
2011-09-11 18:58:42 -07:00
Sage Weil
6a6322391b 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>
2011-09-11 14:54:33 -07:00
Sage Weil
2b0fab1fcf 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>
2011-09-10 16:12:04 -07:00
Sage Weil
8cb3754ad8 osd: fix leak of osd_lock on pg lookup vs pool deletion race
Fixes: #1520
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-09-10 15:51:27 -07:00
Sage Weil
79ee90b5fb 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>
2011-09-10 13:56:23 -07:00
Samuel Just
405abf5abe 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>
2011-09-09 21:39:44 -07:00
Tommi Virtanen
92fa2ff8fc 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>
2011-09-09 16:26:40 -07:00
Tommi Virtanen
60aea05423 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>
2011-09-09 16:26:40 -07:00
Tommi Virtanen
80f54606b4 doc: Hide TODO note in rbd.8
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-09-09 16:26:40 -07:00
Tommi Virtanen
3f199beeaf doc: Make rbd.8 "pool-name", like the old man page.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-09-09 16:26:40 -07:00
Tommi Virtanen
c25b95552b doc: Remove duplicate paragraph from rbd.8
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-09-09 16:26:39 -07:00
Samuel Just
829ebaa202 ReplicatedPG: Fix src hobject_t construction in clone_range call
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-09-09 14:43:09 -07:00
Josh Durgin
b37b61eb76 workunit: use sudo when first reading /sys... too
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-09-09 14:48:20 -07:00
Greg Farnum
efaf91b665 workunit: and delete root-owned file
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-09-09 13:41:14 -07:00
Greg Farnum
d021b22339 workunit: you need sudo to look at /sys/kernel/debug
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-09-09 13:32:21 -07:00
Greg Farnum
19403c8236 Merge branch 'wip-leaks' 2011-09-09 12:14:25 -07:00
Yehuda Sadeh
9713666c27 rgw: rgw_admin, init gen_secret, gen_key 2011-09-09 12:15:10 -07:00
Sage Weil
ba9cafdd07 debian: no /var/run!
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-09 09:05:43 -07:00
Samuel Just
4281f02193 PG.h: Initialize invalid_hash in Entry()
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-09-08 17:56:00 -07:00
Sage Weil
83c6dd0bec debian: create var/run/ceph
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-08 15:05:16 -07:00
Sage Weil
a73d53fdcb debian: radosgw: add dirs to package
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-08 15:05:16 -07:00
Sage Weil
be43ff55a5 ceph: avoid noise when there is no output
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-08 15:05:16 -07:00
Samuel Just
2eb9baa047 OSD: reset filestore_update_collections to false after do_convertfs
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-09-08 14:54:10 -07:00
Samuel Just
ff639c1142 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>
2011-09-08 14:54:10 -07:00
Greg Farnum
34822ad435 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>
2011-09-08 13:27:25 -07:00
Tommi Virtanen
c16241fd41 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>
2011-09-08 12:59:05 -07:00
Tommi Virtanen
0978178e3d rpm: Create the /etc/ceph directory.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-09-08 12:45:15 -07:00
Tommi Virtanen
b618528968 rpm: Add newly-added files to %files.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-09-08 12:38:12 -07:00
Tommi Virtanen
b4bc9f6104 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>
2011-09-08 12:38:11 -07:00
Sage Weil
3819bebe16 ceph: -o - to stdout, not stderr
Don't guess fd numbers.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-08 10:59:41 -07:00
Greg Farnum
3b0195bf45 Merge branch 'master' into wip-leaks 2011-09-08 10:51:46 -07:00
Greg Farnum
cce539cd0b Merge branch 'master' of ceph.newdream.net:/git/ceph 2011-09-08 09:51:35 -07:00
Greg Farnum
4c0125dd70 mon: Clean up MonSession/Connection leak on MForwards
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-09-08 09:51:10 -07:00
Greg Farnum
2f04acb3cc osd: Clean up PG leak
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-09-08 09:51:10 -07:00
Greg Farnum
11021e8da5 osd: clean up leak on old/unneeded peering messages
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-09-08 09:51:10 -07:00
Greg Farnum
8c5cb59835 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>
2011-09-08 09:51:10 -07:00
Greg Farnum
228bd59216 filestore: free fiemap used for testing fs capabilities
No more memory leak!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-09-08 09:51:10 -07:00
Greg Farnum
676dc9ce6a 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>
2011-09-08 09:51:10 -07:00
Sage Weil
1a44500f79 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>
2011-09-07 21:07:54 -07:00
Sage Weil
1986d98d7a client: some debugging
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-09-07 16:54:15 -07:00