Commit Graph

16139 Commits

Author SHA1 Message Date
Josh Durgin
fa757b7f28 Makefile.am: install coverage files for libtool outputs as well
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-08-26 13:06:41 -07:00
Yehuda Sadeh
67cc408f44 librados: watch request should wait for safe response 2011-08-26 11:43:47 -07:00
Sage Weil
3a4d19369f 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>
2011-08-26 09:47:03 -07:00
Sage Weil
85496ffa53 mds: fix shadow
Coverity cid 29

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-26 09:11:16 -07:00
Sage Weil
09b08c5d34 fix utime.h #include recursion
Coverity cid 11, 13

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-26 09:11:16 -07:00
Sage Weil
528703b9c6 crush: comment fall-thru
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-26 09:11:16 -07:00
Sage Weil
75e53e92fb mds: remove unused Mutation in do_rmdir_rollback()
Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-25 13:04:22 -07:00
Greg Farnum
b826749255 workunits: make file_layout test setting only one parameter
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-08-25 12:51:06 -07:00
Greg Farnum
4dba8bc25e 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>
2011-08-25 12:51:06 -07:00
Greg Farnum
df8f3cbb98 cephfs: fix the stripe_count documentation.
Whoops!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-08-25 12:51:06 -07:00
Greg Farnum
d066cc8fb4 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>
2011-08-25 12:51:06 -07:00
Greg Farnum
65b3050759 mds: allow setting all options on a file layout.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-08-25 12:51:06 -07:00
Sage Weil
05063867e2 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>
2011-08-25 12:37:18 -07:00
Yehuda Sadeh
a439e15061 rgw: remove some compilation warnings 2011-08-25 12:11:58 -07:00
Yehuda Sadeh
1e929cee95 rgw: don't override ret value in do_read_permisions 2011-08-25 12:06:16 -07:00
Yehuda Sadeh
b7b5f2e29b rgw: return correct bucket missing error when needed 2011-08-25 11:25:19 -07:00
Yehuda Sadeh
e478e92d06 rgw: fix 500 error on bucket creation 2011-08-25 11:11:17 -07:00
Sage Weil
9538e87e06 rgw: fix clitest 2011-08-24 17:32:07 -07:00
Colin Patrick McCabe
5fb216e05a MonClient: fix possible null dereference
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-24 17:20:35 -07:00
Colin Patrick McCabe
2488e446ca mds/Server.c: fix memory leak in err path
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-24 17:20:35 -07:00
Yehuda Sadeh
44c68b1c61 rgw: don't check for zero content when creating a bucket 2011-08-24 17:07:32 -07:00
Yehuda Sadeh
94fefce5ea rgw: rgw_admin bucket stats dumps owner 2011-08-24 17:01:04 -07:00
Sage Weil
6dce3b1a45 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>
2011-08-24 16:54:02 -07:00
Sage Weil
3ef32bc6b6 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>
2011-08-24 16:51:15 -07:00
Yehuda Sadeh
0b1ad60830 rgw: add radosgw_admin bucket stats 2011-08-24 16:41:34 -07:00
Sage Weil
2a4cf8f887 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>
2011-08-24 16:25:49 -07:00
Colin Patrick McCabe
53b3e1463d librados: fix memory leak in error path
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-24 15:51:38 -07:00
Colin Patrick McCabe
94af6a4c87 test/confutils.cc: fix resource leak
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-24 15:46:22 -07:00
Sage Weil
f2381f97de client: carry inode reference across calls to _flush
Also drop the unused _flush Context* argument.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-24 15:04:10 -07:00
Yehuda Sadeh
2ba01bbb8b rgw: fix prepare_get_obj when ENOENT 2011-08-24 15:02:48 -07:00
Colin Patrick McCabe
ebae5a727b 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>
2011-08-24 14:50:26 -07:00
Colin Patrick McCabe
57fd56cf10 do_kernel_showmapped: fix resource leak
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-24 14:43:08 -07:00
Sage Weil
d34743da5e Merge remote branch 'origin/next' 2011-08-24 14:40:42 -07:00
Sage Weil
d69aa5909e 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>
2011-08-24 14:38:25 -07:00
Colin Patrick McCabe
a1afa6d7d1 rados_sync: fix resource leak on err
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-24 14:15:04 -07:00
Colin Patrick McCabe
ad1b2b0cad CephBroker.cc: fix allocation/deallocation mismatch
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-24 14:15:04 -07:00
Colin Patrick McCabe
2e1f2c1d18 test_rados_tool.sh: test export with --workers
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-24 14:15:04 -07:00
Colin Patrick McCabe
6fd4f3a138 rados_sync: make number of worker threads configurable
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-24 14:15:03 -07:00
Yehuda Sadeh
76718b0854 rgw: clear warning 2011-08-24 13:17:20 -07:00
Yehuda Sadeh
1a0027413b Merge branch 'wip-decouple-bucket' 2011-08-24 12:29:32 -07:00
Sage Weil
e9b739f8dd 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>
2011-08-24 11:01:00 -07:00
Sage Weil
23d94a4c5a Revert "pipe.c: #define GNU_SOURCE"
This reverts commit ae9ba2249e.

This is handled in master by the Makefile.
2011-08-24 09:38:09 -07:00
Sage Weil
c2e4047a88 Merge branch 'next' 2011-08-24 09:38:01 -07:00
Sage Weil
6c6fa6dffd 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>
2011-08-24 09:31:22 -07:00
Sage Weil
eaaefece77 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 dfab2c91f5.

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>
2011-08-24 09:10:23 -07:00
Sage Weil
ba44cdebcd 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>
2011-08-24 09:10:23 -07:00
Yehuda Sadeh
d630693b58 Merge branch 'master' into wip-decouple-bucket 2011-08-23 18:53:10 -07:00
Yehuda Sadeh
2144c7a4f9 add missing include, required for certain environments 2011-08-23 18:52:35 -07:00
Yehuda Sadeh
190b89364c Merge remote-tracking branch 'origin/master' into wip-decouple-bucket
Conflicts:
	src/rgw/rgw_rados.cc
2011-08-23 18:52:08 -07:00
Yehuda Sadeh
adf1efe9a9 rgw: fix multipart upload
don't try to reset meta object with category
2011-08-23 18:33:12 -07:00