Commit Graph

16384 Commits

Author SHA1 Message Date
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
Sage Weil
fc587d6caa client: fix leaked Dir on rename
Need to close old_dentry->dir if the dir is empty.  This was introduced by
ed7ebf35b1.

Fixes: #1509
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-09-07 16:54:15 -07:00
Sage Weil
7077e6795c client: clean up Inode ref counts slightly
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-09-07 16:54:15 -07:00
Samuel Just
be8c16753d OSD: info.pgid gets removed from creating_pgs before _create_lock_new_pg
Fix bug introduced in cd2716c415.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-09-07 16:32:13 -07:00
Sage Weil
c332f9709c rbd: --size is megabytes, not bytes
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-07 15:48:05 -07:00
Sage Weil
523283a5d9 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>
2011-09-07 15:25:18 -07:00
Samuel Just
bf1963c2ef 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>
2011-09-07 15:10:33 -07:00
Yehuda Sadeh
c164904db4 rgw: make loop exit case explicit, removes warning 2011-09-07 10:37:09 -07:00
Sage Weil
61708dc5cc README: update a bit
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-07 10:23:59 -07:00
Samuel Just
fa14765ddc IndexManager: delete index during RemoveOnDelete
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-09-07 10:13:36 -07:00
Samuel Just
cd2716c415 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>
2011-09-07 10:03:04 -07:00
Sage Weil
bce271ee68 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>
2011-09-07 09:48:35 -07:00
Sage Weil
15cd43de64 client: factor out flush_cap_releases() helper
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-07 09:39:53 -07:00
Sage Weil
3444e48462 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>
2011-09-07 08:44:59 -07:00
Sage Weil
f9412b102d 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>
2011-09-07 08:44:59 -07:00
Sage Weil
8f7c72bcb5 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>
2011-09-07 08:44:59 -07:00
Sage Weil
c975bb8815 mds: move Mutation + children out of MDCache.h
Uninline while we're at it.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-07 08:44:59 -07:00
Sage Weil
c46430fb33 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>
2011-09-06 22:07:33 -07:00
Sage Weil
3fc9c2f96c mon: log when we get an error
...before we assert(!err).

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-09-06 21:49:06 -07:00
Brian Chrisman
c29b2213c7 ceph.spec: spec file should be creating /var/run/ceph
Signed-off-by: Brian Chrisman <brchrisman@gmail.com>
2011-09-06 21:08:47 -07:00
Jim Schutt
22fa86cbae 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>
2011-09-06 21:05:38 -07:00
Yehuda Sadeh
2d2746f1ea rgw: fix arg parsing 2011-09-06 20:40:50 -07:00