Commit Graph

18638 Commits

Author SHA1 Message Date
Sage Weil
6613b41564 filestore: guard collection_remove replay
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-03-09 16:32:23 -08:00
Sage Weil
51372a769e filestore: guard replay of collection_add
- set guard on apply
- check guard on replay

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-03-09 16:32:23 -08:00
Sage Weil
4ea6e0d24f filestore: guard replay of basic collection ops
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-03-09 16:32:22 -08:00
Sage Weil
dd284c4f3a filestore: guard collection_rename replay
- check guard on replay
- set guard on apply

Signed-off-by: Sage Weil <sage@newdream.net>
2012-03-09 16:32:22 -08:00
Sage Weil
63d2c93dbe filestore: fix collection_rename error code
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-03-09 16:32:22 -08:00
Sage Weil
e99940d1a2 filestore: guard clone replay
- set guard xattr on clone, clone_range
- check before applying/replaying

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-03-09 16:32:22 -08:00
Sage Weil
f8a047f240 filestore: implement _set_replay_guard, _check_replay_guard
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-03-09 16:32:22 -08:00
Sage Weil
3b47c6ba55 filestore: maintain SequencerPosition during _do_transaction
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-03-09 16:32:22 -08:00
Sage Weil
e81bc971c8 filestore: fgetxattr helpers/wrappers
Also, do the getxattr using fgetxattr, to avoid duplicating code.  This is
slightly slower probably because we open a file handle, but if we care we
should really clean up the code to use lfn_open instead of lfn_find and
avoid the repeated path traversal too.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-03-09 16:32:22 -08:00
Sage Weil
babb1e9032 add SequencerPosition type
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-03-09 16:32:22 -08:00
Sage Weil
a6077f6c37 filestore: pass trans_num into _do_transaction
This gives us the <op_seq, trans_num, op_num> triple to identify every
constituent operation.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-03-09 16:32:22 -08:00
Sage Weil
808812a2a4 filestore: use proper type for readdir_r tmp
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-03-09 16:32:22 -08:00
Sage Weil
118449788a levedb: fix commit
This got reverted back to the old commit, somehow.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-03-09 14:24:14 -08:00
Sage Weil
184b180256 Merge branch 'master' of github.com:ceph/ceph 2012-03-09 14:13:03 -08:00
Samuel Just
7f9cfdd994 RadosModel: fix omap_clear case in RemoveAttrsOp
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2012-03-09 14:12:24 -08:00
Sage Weil
fce180dfe8 Merge branch 'wip-rgw-encode'
Conflicts:
	src/rgw/rgw_cls_api.h

Reviewed-by: Sage Weil <sage@newdream.net>
2012-03-09 14:03:15 -08:00
Sage Weil
799e6f974b rgw: fix rgw_cls_list_ret ctor
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-03-09 14:01:38 -08:00
Yehuda Sadeh
b71d814c89 ceph-object-corpus: added 0.43
Signed-off-by: Yehuda Sadeh <yehuda.sadeh@dreamhost.com>
2012-03-09 14:01:38 -08:00
Yehuda Sadeh
b4f05788c1 test/encoding/import.sh: fix target directory
Signed-off-by: Yehuda Sadeh <yehuda.sadeh@dreamhost.com>
2012-03-09 14:01:38 -08:00
Yehuda Sadeh
b66cdea664 Makefile.am: update link dependencies for some unit tests 2012-03-09 14:01:38 -08:00
Yehuda Sadeh
09949b3d36 rgw: various encoding related fixes
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2012-03-09 14:01:25 -08:00
Sage Weil
e43546dee9 osd: fix watch_lock vs map_lock ordering
watch_lock is inside map_lock (and pg->lock), which means we need to
drop it to take pg->lock here.  That means verifying in
handle_watch_timeout that we haven't raced with another thread canceling
the timeout event, which would be indicated by

 - the entity not appearing in unconnected_watchers
 - the entity having a different (presumably newer) expire time

Fixes: #2103
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Reviewed-by: Samuel Just <samuel.just@dreamhost.com>
2012-03-09 13:34:55 -08:00
Sage Weil
80d9252809 osd: update_heartbeat_peers as needed
Before, we were being very careful about updating the heartbeat peers if
new PGs were created or when certain types of messages were received.
However, the PG can change it's peers in lots of cases (e.g., when
recovery completes), but the OSD doesn't re-aggregate.

Instead, set a flag when each PG updates it's set, and check that flag in
the OSD code periodically or in likely places.  A call in tick() acts as
a catch-all.

The num_created counts can probably be cleaned out now...

Signed-off-by: Sage Weil <sage@newdream.net>
Reviewed-by: Greg Farnum <gregory.farnum@dreamhost.com>
2012-03-09 12:26:22 -08:00
Yehuda Sadeh
619244d81f rgw: implement dump() for encoders
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2012-03-09 00:06:34 -08:00
Yehuda Sadeh
2277fb4536 rgw: add stubs for dencoder test
still need to add some content to the dump methods

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2012-03-08 16:58:00 -08:00
Yehuda Sadeh
71323ffeda Merge remote branch 'origin/wip-2139'
Conflicts:
	src/cls_rgw.cc
	src/rgw/rgw_rados.cc
	src/rgw/rgw_rados.h

Signed-off-by: Yehuda Sadeh <yehuda.sadeh@dreamhost.com>
2012-03-08 16:15:18 -08:00
Yehuda Sadeh
64e3ffb26d Merge branch 'master' of ssh://github.com/ceph/ceph 2012-03-08 15:54:14 -08:00
Alex Elder
ac28b6036d ceph: document the way files are laid out
This adds a document that I wrote about how Ceph client file data
is striped across Ceph objects to the repository.  It's a text
document.  Someone with better document preparation skills than I
should use the content below as a basis for something prettier if
that's appropriate.

[Made a few edits... -sage]

Signed-off-by: Alex Elder <elder@dreamhost.com>
Signed-off-by: Sage Weil <sage@newdream.net>
2012-03-08 15:18:59 -08:00
Sage Weil
1ed1d46682 librados: fix unit test for omap_get_vals_by_key rename
Signed-off-by: Sage Weil <sage@newdream.net>
2012-03-08 15:09:30 -08:00
Sage Weil
ce43bd5351 osd: format time nicely in ops_in_flight output
Signed-off-by: Sage Weil <sage@newdream.net>
2012-03-08 15:06:39 -08:00
Sage Weil
934ee487fe librados: fix map -> std::map in header, string -> std::string
Signed-off-by: Sage Weil <sage@newdream.net>
2012-03-08 15:06:19 -08:00
Sage Weil
fafbddd9cb doc: example of diagnosing radosgw hang
Signed-off-by: Sage Weil <sage@newdream.net>
2012-03-08 15:02:02 -08:00
Sage Weil
99cb994586 doc: explain how unfound objects happen
Signed-off-by: Sage Weil <sage@newdream.net>
2012-03-08 14:55:21 -08:00
Sage Weil
47ce7adee6 doc: make osd failure example include >3 osds
More realistic.

Signed-off-by: Sage Weil <sage@newdream.net>
2012-03-08 14:55:08 -08:00
Sage Weil
80864a1204 testrados: fix omap_get_vals_by_keys call
Signed-off-by: Sage Weil <sage@newdream.net>
2012-03-08 14:46:56 -08:00
Sage Weil
e7e3baebd6 osd: add zero_to field to PG::OndiskLog; track zeroed region of pg log
Track which region of the log has been zeroed on disk.  This may be
different from tail if 'osd preserved trimmed log = false' in the config.

Only zero the portion of the log we need to.  This avoids rezeroing regions
or missing bits when 'osd preserved trimmed log' was off and is then turned
on.

Signed-off-by: Sage Weil <sage@newdream.net>
Reviewed-by: Samuel Just <samuel.just@dreamhost.com>
2012-03-08 14:30:09 -08:00
Sage Weil
ed6cc47b18 filestore: use FL_ALLOC_PUNCH_HOLE to zero, when available
First try the FL_ALLOC_PUNCH_HOLE fallocate() flag.  If we get EOPNOTSUPP,
fall back to writing zeros.

Check for fallocate(2) with configure.  Also, avoid this if we are not
Linux, since I'm not sure about the hard-coded FL_ALLOC_PUNCH_HOLE being
correct on other platforms.

Signed-off-by: Sage Weil <sage@newdream.net>
Reviewed-by: Samuel Just <samuel.just@dreamhost.com>
2012-03-08 14:30:06 -08:00
Sage Weil
1468d95101 osd: fix op_wq vs pg->lock ordering
map_lock
 -> pg->lock
   -> op_wq

Fixes: #2153
Signed-off-by: Sage Weil <sage@newdream.net>
Reviewed-by: Samuel Just <samuel.just@dreamhost.com>
2012-03-08 14:16:59 -08:00
Yehuda Sadeh
c0aa33192d Merge branch 'master' of ssh://skinny/home/yehudasa/ceph 2012-03-07 22:58:42 -08:00
Yehuda Sadeh
5f8bbf1ff2 Merge branch 'wip-rgw-new-atomic' 2012-03-07 22:53:32 -08:00
Yehuda Sadeh
465a88eae8 rgw: append the currect bucket marker when removing bucket
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2012-03-07 22:52:24 -08:00
Yehuda Sadeh
8ce3d229de Merge branch 'master' of ssh://skinny/home/yehudasa/ceph 2012-03-07 22:39:46 -08:00
Yehuda Sadeh
89648a0d1a Merge branch 'wip-rgw-omap' 2012-03-07 22:35:40 -08:00
Yehuda Sadeh
72d678b85f cls_rgw: fix rgw_bucket_init_index
was failing to error in case header already existed

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2012-03-07 22:25:47 -08:00
Yehuda Sadeh
eaafc5784d rgw: remove extra unused params from omap_get()
and also rename it to omap_get_all()

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2012-03-07 22:19:25 -08:00
Yehuda Sadeh
765962dc8c rgw: add cls_cxx_map_clear
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2012-03-07 22:18:57 -08:00
Samuel Just
afe2598a58 leveldb: drop compaction unit test
Signed-off-by: Samuel Just <rexludorum@gmail.com>
2012-03-07 21:59:44 -08:00
Samuel Just
4d6578ca62 ReplicatedPG,librados: add filter_prefix to omap_get_vals
Signed-off-by: Samuel Just <rexludorum@gmail.com>
2012-03-07 17:20:23 -08:00
Yehuda Sadeh
e0744390f6 rgw: use prefix filter for bucket listing
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2012-03-07 17:10:18 -08:00
Yehuda Sadeh
4c908442fb objclass, cls_rgw: add prefix to omap_get_vals() 2012-03-07 17:03:45 -08:00