]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
14 years agoMerge remote branch 'origin/osd_pglog_checksums' into unstable
Sage Weil [Thu, 14 Oct 2010 22:18:46 +0000 (15:18 -0700)]
Merge remote branch 'origin/osd_pglog_checksums' into unstable

14 years agoobject store: create OP_COLL_RENAME operation
Colin Patrick McCabe [Thu, 14 Oct 2010 20:41:57 +0000 (13:41 -0700)]
object store: create OP_COLL_RENAME operation

The OP_COLL_RENAME operation is used to rename collections.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agodoc: add object_store.dot
Colin Patrick McCabe [Thu, 14 Oct 2010 21:45:20 +0000 (14:45 -0700)]
doc: add object_store.dot

Add object_store.dot. This graph is a rough sketch of the dependencies
between modules in the object store.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoconf: actually handle long long config options from conf file
Yehuda Sadeh [Thu, 14 Oct 2010 21:42:38 +0000 (14:42 -0700)]
conf: actually handle long long config options from conf file

14 years agoRadosClient: clean up Rados::client use
Colin Patrick McCabe [Wed, 13 Oct 2010 18:20:00 +0000 (11:20 -0700)]
RadosClient: clean up Rados::client use

Forward declare RadosClient in librados.hpp so that we don't ahve to use
so many typecasts in class Rados.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agomds: SimpleLock and subclasses: const cleanup
Colin Patrick McCabe [Wed, 13 Oct 2010 17:33:50 +0000 (10:33 -0700)]
mds: SimpleLock and subclasses: const cleanup

Const cleanup for SimpleLock, ScatterLock, and LocalLock.

Make SimpleLock::get_state_name() nonvirtual, since nobody overrides it.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agolists templates: const cleanup
Colin Patrick McCabe [Wed, 13 Oct 2010 17:33:00 +0000 (10:33 -0700)]
lists templates: const cleanup

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agomdsmonitor: remove unused variable
Colin Patrick McCabe [Tue, 12 Oct 2010 21:42:41 +0000 (14:42 -0700)]
mdsmonitor: remove unused variable

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agomon: add 'ceph health' command
Colin Patrick McCabe [Mon, 11 Oct 2010 23:42:35 +0000 (16:42 -0700)]
mon: add 'ceph health' command

Create MDSMonitor::get_health and OSDMonitor::get_health to check the
health of the MDSes and OSDes, respectively.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agomon: const crusade
Colin Patrick McCabe [Fri, 8 Oct 2010 23:56:22 +0000 (16:56 -0700)]
mon: const crusade

Make print_summary, print, dump, etc. functions const methods.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agomount.ceph: make -v a little more verbose
Colin Patrick McCabe [Fri, 8 Oct 2010 19:13:46 +0000 (12:13 -0700)]
mount.ceph: make -v a little more verbose

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agomount.ceph: const cleanup
Colin Patrick McCabe [Fri, 8 Oct 2010 18:40:04 +0000 (11:40 -0700)]
mount.ceph: const cleanup

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agomount.ceph: allow the user to omit ceph_options
Colin Patrick McCabe [Fri, 8 Oct 2010 17:57:58 +0000 (10:57 -0700)]
mount.ceph: allow the user to omit ceph_options

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agomount.ceph: add usage message
Colin Patrick McCabe [Fri, 8 Oct 2010 01:12:37 +0000 (18:12 -0700)]
mount.ceph: add usage message

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agomount.ceph: argument parsing cleanup
Colin Patrick McCabe [Thu, 7 Oct 2010 22:41:58 +0000 (15:41 -0700)]
mount.ceph: argument parsing cleanup

* Functions that are local to the file are now static

* Don't modify the string argument to mount_resolve_src / parse_options

* Don't segfault when mount_resolve_src / parse_options return NULL

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoosd: on clearing corrupt logs, call pg::write_info
Colin Patrick McCabe [Wed, 6 Oct 2010 23:01:18 +0000 (16:01 -0700)]
osd: on clearing corrupt logs, call pg::write_info

After changing PG::info, call PG::write_info to get the on-disk
information back in sync with the in-memory state.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoMerge branch 'unstable' into osd_pglog_checksums
Colin Patrick McCabe [Wed, 6 Oct 2010 21:51:15 +0000 (14:51 -0700)]
Merge branch 'unstable' into osd_pglog_checksums

14 years agov0.23~rc (new unstable branch)
Sage Weil [Wed, 6 Oct 2010 21:33:21 +0000 (14:33 -0700)]
v0.23~rc (new unstable branch)

14 years agoMerge branch 'testing' into unstable
Sage Weil [Wed, 6 Oct 2010 20:42:04 +0000 (13:42 -0700)]
Merge branch 'testing' into unstable

Conflicts:
src/osd/ReplicatedPG.cc

14 years agoosd: fix pull completion tests, again
Sage Weil [Fri, 24 Sep 2010 21:50:05 +0000 (14:50 -0700)]
osd: fix pull completion tests, again

op->complete==false is inconclusive.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: log error instead of crashing on failed pull attempt
Sage Weil [Tue, 7 Sep 2010 17:01:58 +0000 (10:01 -0700)]
osd: log error instead of crashing on failed pull attempt

If peering screws up and the primary mistakenly tries to pull an object
from us we don't have, log an error instead of crashing.  This will still
throw off recovery (it will hang), but that's better than crashing
outright.

14 years agoosd: save corrupt pg_logs to a special collection
Colin Patrick McCabe [Wed, 6 Oct 2010 19:09:00 +0000 (12:09 -0700)]
osd: save corrupt pg_logs to a special collection

If the PG log is corrupt when we start up, save it to a special
collection so that we can examine it later.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoosd: clean out redundant (and wrong) complete calculation
Sage Weil [Fri, 24 Sep 2010 20:57:00 +0000 (13:57 -0700)]
osd: clean out redundant (and wrong) complete calculation

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: make sparse data/clone push behave with partial object push
Sage Weil [Fri, 24 Sep 2010 18:43:37 +0000 (11:43 -0700)]
osd: make sparse data/clone push behave with partial object push

We can't error out if we don't get everything we want in one go now that
we support pushing objects in pieces.  Remove this check entirely, since
we don't have a good error handling case anyway.

14 years agoMerge branch 'osd_lost_objects' into unstable
Sage Weil [Wed, 6 Oct 2010 16:45:16 +0000 (09:45 -0700)]
Merge branch 'osd_lost_objects' into unstable

14 years agorgw: change default content type to binary/octet-stream
Yehuda Sadeh [Wed, 6 Oct 2010 07:06:51 +0000 (00:06 -0700)]
rgw: change default content type to binary/octet-stream

14 years agomonclient: fix leaks in build_initial_monmap address lookup
Sage Weil [Wed, 6 Oct 2010 05:04:13 +0000 (22:04 -0700)]
monclient: fix leaks in build_initial_monmap address lookup

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomonclient: fix off-by-one buffer overrun
Sage Weil [Wed, 6 Oct 2010 05:02:55 +0000 (22:02 -0700)]
monclient: fix off-by-one buffer overrun

Still leaked, though.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoaddr_parsing: remove unused mount_path logic
Sage Weil [Wed, 6 Oct 2010 05:01:34 +0000 (22:01 -0700)]
addr_parsing: remove unused mount_path logic

This was breaking parsing if any of the hosts included a ":port" too.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoMerge remote branch 'origin/testing' into unstable
Sage Weil [Tue, 5 Oct 2010 23:47:37 +0000 (16:47 -0700)]
Merge remote branch 'origin/testing' into unstable

14 years agoMerge branch 'unstable' of ssh://ceph.newdream.net/home/sage/ceph.newdream.net/git...
Sage Weil [Tue, 5 Oct 2010 23:47:34 +0000 (16:47 -0700)]
Merge branch 'unstable' of ssh://ceph.newdream.net/home/sage/ceph.newdream.net/git/ceph into unstable

14 years agocdebugpack: add a utility to generate a debug package
Yehuda Sadeh [Tue, 5 Oct 2010 23:16:18 +0000 (16:16 -0700)]
cdebugpack: add a utility to generate a debug package

14 years agoosd: ignore info queries on deleting pgs
Sage Weil [Tue, 5 Oct 2010 22:45:18 +0000 (15:45 -0700)]
osd: ignore info queries on deleting pgs

Since we cancel deletion on pg change, we will only receive these from
old primaries, so we can safely ignore.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: cancel deletion on pg change
Sage Weil [Tue, 5 Oct 2010 22:41:40 +0000 (15:41 -0700)]
osd: cancel deletion on pg change

If the primary changes, cancel deletion so that the new primary has the
benefit of considering whether they need anything we have.  Before we were
only canceling if our role changed, but that makes little sense.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoconfig: fix address list parsing
Sage Weil [Tue, 5 Oct 2010 22:37:39 +0000 (15:37 -0700)]
config: fix address list parsing

Skip past comma, whitespace.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agocmon: better error handling
Colin Patrick McCabe [Tue, 5 Oct 2010 22:08:10 +0000 (15:08 -0700)]
cmon: better error handling

If we can't create the mon0/magic file, show an error message rather
than calling assert(). These cases are probably cluster configuration
problems.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoconf: cconf return default values from config.cc if not found
Yehuda Sadeh [Tue, 5 Oct 2010 22:02:01 +0000 (15:02 -0700)]
conf: cconf return default values from config.cc if not found

14 years agomds: allow do_null_snapflush on multiversion inodes
Sage Weil [Tue, 5 Oct 2010 19:38:43 +0000 (12:38 -0700)]
mds: allow do_null_snapflush on multiversion inodes

The _do_snap_update() can handle a multiversion inode.  Behave when
_do_null_snapflush() encounters one.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agosignal handlers: be more elaborate about caught signals
Yehuda Sadeh [Tue, 5 Oct 2010 19:25:48 +0000 (12:25 -0700)]
signal handlers: be more elaborate about caught signals

14 years agomds: don't call mrk_dirty_rstat for base/root inodes
Sage Weil [Tue, 5 Oct 2010 19:16:02 +0000 (12:16 -0700)]
mds: don't call mrk_dirty_rstat for base/root inodes

Base inodes have no parent.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: fix EMetaBlob dir_layout lifecycle
Sage Weil [Tue, 5 Oct 2010 18:53:32 +0000 (11:53 -0700)]
mds: fix EMetaBlob dir_layout lifecycle

Initialize, delete pointer.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: set root dir_layout during mkfs
Sage Weil [Tue, 5 Oct 2010 18:17:29 +0000 (11:17 -0700)]
mds: set root dir_layout during mkfs

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: use helper to update inode from EMetaBlob during replay
Sage Weil [Tue, 5 Oct 2010 18:17:21 +0000 (11:17 -0700)]
mds: use helper to update inode from EMetaBlob during replay

Removes 3 copies of this code.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: set dir layout during replay
Sage Weil [Tue, 5 Oct 2010 18:14:19 +0000 (11:14 -0700)]
mds: set dir layout during replay

Need to copy layout from the EMetaBlob::fullbit into the inode.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: set root inode default_file_layout on mkfs
Sage Weil [Tue, 5 Oct 2010 18:07:22 +0000 (11:07 -0700)]
mds: set root inode default_file_layout on mkfs

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: fix typo in EMetaBlob encoder
Sage Weil [Tue, 5 Oct 2010 18:05:55 +0000 (11:05 -0700)]
mds: fix typo in EMetaBlob encoder

This was wrongly setting the dir_layout_exists flag to true.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: less chatty in log about caps
Sage Weil [Tue, 5 Oct 2010 17:43:29 +0000 (10:43 -0700)]
osd: less chatty in log about caps

14 years agomds: zero inode layout for dirs
Sage Weil [Tue, 5 Oct 2010 17:21:38 +0000 (10:21 -0700)]
mds: zero inode layout for dirs

These aren't used for anything.

Also rename the default_dir_layout to _log_, since that's all that we now
use it for.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agodump backtrace when getting sigsegv and sigabrt
Yehuda Sadeh [Tue, 5 Oct 2010 19:04:07 +0000 (12:04 -0700)]
dump backtrace when getting sigsegv and sigabrt

14 years agoclient: Fix truncate_seq/truncate_length initialization.
Greg Farnum [Tue, 5 Oct 2010 16:25:38 +0000 (09:25 -0700)]
client: Fix truncate_seq/truncate_length initialization.
Initializing to 0 was causing file_to_extents to get called on every inode
since the MDS initializes truncate_seq to 1 and truncate_length to -1.
This revealed itself as a crash on directory inodes, which have their
layouts zeroed since merging the file_layouts branch.
To make clearer, assert that anything being truncated is a file inode.

14 years agomds: fix LocalLock xlocking by replacing default
Greg Farnum [Tue, 5 Oct 2010 00:00:54 +0000 (17:00 -0700)]
mds: fix LocalLock xlocking by replacing default

14 years agoosd: read_log: clear the pagelog if it is corrupt
Colin Patrick McCabe [Tue, 5 Oct 2010 18:01:33 +0000 (11:01 -0700)]
osd: read_log: clear the pagelog if it is corrupt

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoMerge branch 'unstable' into osd_pglog_checksums
Colin Patrick McCabe [Tue, 5 Oct 2010 18:05:07 +0000 (11:05 -0700)]
Merge branch 'unstable' into osd_pglog_checksums

14 years agomds: fix ESession/ESessions event id type again
Sage Weil [Tue, 5 Oct 2010 17:12:59 +0000 (10:12 -0700)]
mds: fix ESession/ESessions event id type again

Not sure how many times we've screwed this one up!

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agofilestore: drop unused parse_coll() declaration
Sage Weil [Mon, 4 Oct 2010 15:59:22 +0000 (08:59 -0700)]
filestore: drop unused parse_coll() declaration

Signed-off-by: Sage Weil <sage@newdream.net>
15 years agoMerge branch 'testing' into unstable
Sage Weil [Mon, 4 Oct 2010 18:21:51 +0000 (11:21 -0700)]
Merge branch 'testing' into unstable

Conflicts:
src/mds/Locker.cc

15 years agoMerge branch 'file_layouts' into unstable
Greg Farnum [Mon, 4 Oct 2010 18:08:14 +0000 (11:08 -0700)]
Merge branch 'file_layouts' into unstable

Conflicts:
src/mds/CInode.cc
src/mds/CInode.h
src/mds/MDCache.cc
src/mds/SimpleLock.h

15 years agoadd set layout ops to ceph_strings
Greg Farnum [Thu, 30 Sep 2010 18:36:57 +0000 (11:36 -0700)]
add set layout ops to ceph_strings

15 years agocephfs: Wrote and committed cephfs
Greg Farnum [Wed, 29 Sep 2010 23:06:35 +0000 (16:06 -0700)]
cephfs: Wrote and committed cephfs

15 years agomds: Conditionally encode default dir layout.
Greg Farnum [Wed, 29 Sep 2010 21:18:23 +0000 (14:18 -0700)]
mds: Conditionally encode default dir layout.

Previously we unconditionally encoded the standard layout, which
on a directory inode is meaningless. So, use that spot to fill
in the default dir layout, if it exists. Otherwise, zero-fill.
This lets us display default directory layouts without changing
the protocol, which is good.

15 years agoclient: update test_ioctls to test new stuff
Greg Farnum [Tue, 28 Sep 2010 21:14:41 +0000 (14:14 -0700)]
client: update test_ioctls to test new stuff

15 years agoalways throw by value; always catch by const ref
Colin Patrick McCabe [Mon, 4 Oct 2010 17:47:30 +0000 (10:47 -0700)]
always throw by value; always catch by const ref

Always throw exceptions by value rather than as pointers. Always catch
exceptions as const references to avoid unecessary copying. This fixes a
few minor memory leaks and should simplify handling exceptions in the
future.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
15 years agoclient: import ioctl header from ceph-client
Greg Farnum [Tue, 28 Sep 2010 21:13:06 +0000 (14:13 -0700)]
client: import ioctl header from ceph-client

15 years agomds: fix setlayout truncation check.
Greg Farnum [Fri, 24 Sep 2010 23:11:50 +0000 (16:11 -0700)]
mds: fix setlayout truncation check.

The trunc_seq is initialized to 1 in prepare_new_inode.

15 years agomds: misc fixes for dir default layout projection
Greg Farnum [Fri, 24 Sep 2010 23:10:58 +0000 (16:10 -0700)]
mds: misc fixes for dir default layout projection

15 years agomds: If a projected inode has a dir_layout, we now encode it to disk.
Greg Farnum [Fri, 24 Sep 2010 18:40:57 +0000 (11:40 -0700)]
mds: If a projected inode has a dir_layout, we now encode it to disk.

15 years agomds: Implement op CEPH_MDS_OP_SETDIRLAYOUT.
Greg Farnum [Fri, 24 Sep 2010 00:13:05 +0000 (17:13 -0700)]
mds: Implement op CEPH_MDS_OP_SETDIRLAYOUT.

Implement handler functions, add to inode projection machinery, etc.

15 years agomds: zero out the layout in handle_client_setlayout
Greg Farnum [Thu, 23 Sep 2010 23:36:37 +0000 (16:36 -0700)]
mds: zero out the layout in handle_client_setlayout

Could have led to an invalid layout by mistake.

15 years agomds: Look for and make use of directory tree default layouts, if existent.
Greg Farnum [Thu, 23 Sep 2010 20:33:16 +0000 (13:33 -0700)]
mds: Look for and make use of directory tree default layouts, if existent.

15 years agofilestore: make list_collections() list all dirs
Sage Weil [Mon, 4 Oct 2010 15:50:31 +0000 (08:50 -0700)]
filestore: make list_collections() list all dirs

coll_t is now unstructured; list all dirs besides '.' and '..'.

The old coll_t::parse() was broken.  Remove it.  Fixes
a4138c905053cf79a03b50fa766c08ad718b8c58.

Signed-off-by: Sage Weil <sage@newdream.net>
15 years agoosd: make load_pgs verbose
Sage Weil [Mon, 4 Oct 2010 15:44:38 +0000 (08:44 -0700)]
osd: make load_pgs verbose

Show what it's skipping any why.

Signed-off-by: Sage Weil <sage@newdream.net>
15 years agomds: fix setlayout truncation check.
Greg Farnum [Fri, 24 Sep 2010 23:11:50 +0000 (16:11 -0700)]
mds: fix setlayout truncation check.

The trunc_seq is initialized to 1 in prepare_new_inode.

15 years agomds: zero out the layout in handle_client_setlayout
Greg Farnum [Thu, 23 Sep 2010 23:36:37 +0000 (16:36 -0700)]
mds: zero out the layout in handle_client_setlayout

Could have led to an invalid layout by mistake.

15 years agomds: remove unused CompatSet mds_features.
Greg Farnum [Wed, 22 Sep 2010 23:36:05 +0000 (16:36 -0700)]
mds: remove unused CompatSet mds_features.

All the MDS features are stored in the MDSMap::mdsmap_compat

15 years agomon: add 'mds fail N' command
Sage Weil [Fri, 1 Oct 2010 22:54:56 +0000 (15:54 -0700)]
mon: add 'mds fail N' command

Manually mark an mds rank as failed.  The daemon should kill itself when
it finds out.

Note that this doesn't do any sanity checks, so it can also be used to
adjust state in an otherwise inconsistent mdsmap due to other bugs (one
where, say, an mds in up but has no info, or not up but not in the failed
set.)

Signed-off-by: Sage Weil <sage@newdream.net>
15 years agobuffer::list::copy: complain about invalid strings
Colin Patrick McCabe [Fri, 1 Oct 2010 18:09:30 +0000 (11:09 -0700)]
buffer::list::copy: complain about invalid strings

Raise an exception when someone feeds us a "string" that has embedded
NULL characters.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
15 years agomds: fix and use add_replica_stray() helper for handle_dentry_unlink
Sage Weil [Fri, 1 Oct 2010 19:48:59 +0000 (12:48 -0700)]
mds: fix and use add_replica_stray() helper for handle_dentry_unlink

Eliminate duplicate code by using (and fixing) the helper.

Signed-off-by: Sage Weil <sage@newdream.net>
15 years agomds: fix stray replica push on _rename_prepare_witness()
Sage Weil [Fri, 1 Oct 2010 19:43:20 +0000 (12:43 -0700)]
mds: fix stray replica push on _rename_prepare_witness()

We need to push all parents of the straydn to the target.  This changed
a while back with the mdsdir stuff but this bit of code wasn't updated.
Updated to mirror send_dentry_unlink().

This fixes a crash like:
mds/MDCache.cc: In function 'void MDCache::adjust_subtree_auth(CDir*, std::pair<int, int>, bool)':
mds/MDCache.cc:644: FAILED assert(root)
 ceph version 0.22~rc (0e67718a365b42969e785f544ea3b4258bb2407f)
 1: (MDCache::add_replica_dir(ceph::buffer::list::iterator&, CInode*, int, std::list<Context*, std::allocator<Context*> >&)+0x1c1) [0x536a91]
 2: (MDCache::add_replica_stray(ceph::buffer::list&, int)+0xdb) [0x536fab]
 3: (Server::handle_slave_rename_prep(MDRequest*)+0x1113) [0x4d5c33]
 4: (Server::dispatch_slave_request(MDRequest*)+0x21b) [0x4de80b]
 5: (Server::handle_slave_request(MMDSSlaveRequest*)+0x145) [0x4e1955]
 6: (MDS::_dispatch(Message*)+0x2598) [0x49e038]
...

Signed-off-by: Sage Weil <sage@newdream.net>
15 years agoosd: revamp forgetting lost objects
Sage Weil [Fri, 1 Oct 2010 19:32:59 +0000 (12:32 -0700)]
osd: revamp forgetting lost objects

The old forget lost objects rewrote history in the PG log, which is asking
for all kinds of trouble.  Instead, add new logs events to indicate that
an object is LOST (deleted) or LOST_REVERTed (reverted to an older
version).

The LOST_REVERT case means we may need to recover the old version from
another node and rewrite the version number.  This isn't implemented yet;
for now we just assert.

Signed-off-by: Sage Weil <sage@newdream.net>
15 years agoosd: revamp forgetting lost objects
Sage Weil [Fri, 1 Oct 2010 19:32:59 +0000 (12:32 -0700)]
osd: revamp forgetting lost objects

The old forget lost objects rewrote history in the PG log, which is asking
for all kinds of trouble.  Instead, add new logs events to indicate that
an object is LOST (deleted) or LOST_REVERTed (reverted to an older
version).

The LOST_REVERT case means we may need to recover the old version from
another node and rewrite the version number.  This isn't implemented yet;
for now we just assert.

Signed-off-by: Sage Weil <sage@newdream.net>
15 years agoosd: move PG::Info::coll to PG::coll
Colin Patrick McCabe [Fri, 1 Oct 2010 18:56:42 +0000 (11:56 -0700)]
osd: move PG::Info::coll to PG::coll

It's best not to have data members in PG::Info that are not serialized
and sent over the wire. Cache coll directly inside PG instead.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
15 years agoosd: cache coll_t in PG
Colin P. McCabe [Fri, 1 Oct 2010 01:13:44 +0000 (18:13 -0700)]
osd: cache coll_t in PG

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
15 years agoosd: fix recovery_primary loop on local clone
Sage Weil [Fri, 1 Oct 2010 05:00:06 +0000 (22:00 -0700)]
osd: fix recovery_primary loop on local clone

When we take the clone branch, we update the missing map.  This invalidates
our current iterator, which can cause badness.  Instead, increment the
iterator near the top of the loop so we don't have to worry about it.

Signed-off-by: Sage Weil <sage@newdream.net>
15 years agogitignore: Ignore cscope and vim temporary files
Colin P. McCabe [Fri, 1 Oct 2010 01:13:44 +0000 (18:13 -0700)]
gitignore: Ignore cscope and vim temporary files

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
15 years agoosd: generalize coll_t to a string
Colin Patrick McCabe [Thu, 30 Sep 2010 23:59:53 +0000 (16:59 -0700)]
osd: generalize coll_t to a string

coll_t is now a string. META_COLL and TEMP_COLL are just constants now.

Now there is a constructor that takes pgid_t and snapid_t, rather than
factory methods. It's clear what that constructor does, so wrapping it
in factory methods should be unecessary.

Bump coll_t serialization version to 3. Implement decoding for the old
versions.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
15 years agomds: drop bad assert
Sage Weil [Thu, 30 Sep 2010 17:54:23 +0000 (10:54 -0700)]
mds: drop bad assert

Introduced by f1921c3a952726e025773979a7597de793897058.  Should probably
audit this code.

Signed-off-by: Sage Weil <sage@newdream.net>
15 years agoMakefile: add missing include
Sage Weil [Wed, 29 Sep 2010 19:02:30 +0000 (12:02 -0700)]
Makefile: add missing include

Signed-off-by: Sage Weil <sage@newdream.net>
15 years agointerval_set: hide data members
Colin McCabe [Wed, 29 Sep 2010 02:00:28 +0000 (19:00 -0700)]
interval_set: hide data members

This change makes interval_set::m and interval_set::_size private data
members in interval_set, instead of public. This change also creates a
non-const iterator. Using this iterator, users can modify the length of
an interval. So now, all users can use the iterators rather than
interacting with the class internals directly.

15 years agoMakefile: add missing include
Sage Weil [Wed, 29 Sep 2010 19:02:30 +0000 (12:02 -0700)]
Makefile: add missing include

Signed-off-by: Sage Weil <sage@newdream.net>
15 years agomon: Fix issue first addressed in 2c5a3d99aa3be5ce114072e84f73a0a6426e63fd.
Greg Farnum [Wed, 29 Sep 2010 17:39:49 +0000 (10:39 -0700)]
mon: Fix issue first addressed in 2c5a3d99aa3be5ce114072e84f73a0a6426e63fd.
We were properly falling out of the while loop when we reached end(), but
not checking for it in the following if-else. Now we do!
Reported-by: Henry C Chang <henry_c_chang@tcloudcomputing.com>
15 years agoosd: do not request backlog from peers with empty pg
Sage Weil [Wed, 29 Sep 2010 15:25:27 +0000 (08:25 -0700)]
osd: do not request backlog from peers with empty pg

This avoids stalling out peering, because the peer just responds with
another 'empty' PG::Info in response (which we already have).

Signed-off-by: Sage Weil <sage@newdream.net>
15 years agoosd: try to object from other replica(s) on EOF
Sage Weil [Wed, 29 Sep 2010 15:24:34 +0000 (08:24 -0700)]
osd: try to object from other replica(s) on EOF

If during recovery we are unable to pull from a replica due to reaching
EOF (e.g., zeroed out object), pull from the next available replica (if
any).

Eventually this should be extended to do the same when a checksum fails.

Signed-off-by: Sage Weil <sage@newdream.net>
15 years agoAdd the setup-chroot.sh script
Colin Patrick McCabe [Wed, 29 Sep 2010 02:22:50 +0000 (19:22 -0700)]
Add the setup-chroot.sh script

The setup-chroot.sh script is very handy for building the server in a
chroot environment. I thought I would share it here in case anyone else
finds it useful.

15 years agoosd: clarify comment in recovery code
Sage Weil [Mon, 27 Sep 2010 22:41:32 +0000 (15:41 -0700)]
osd: clarify comment in recovery code

Signed-off-by: Sage Weil <sage@newdream.net>
15 years agomsgr: Don't take over old pipes if they're lossy.
Greg Farnum [Tue, 28 Sep 2010 18:45:43 +0000 (11:45 -0700)]
msgr: Don't take over old pipes if they're lossy.
Fixes bug #443.

15 years agoImplement interval_set::const_iterator
Colin Patrick McCabe [Wed, 15 Sep 2010 22:23:15 +0000 (15:23 -0700)]
Implement interval_set::const_iterator

15 years agoRename interval_set::begin and end
Colin Patrick McCabe [Mon, 27 Sep 2010 19:06:06 +0000 (12:06 -0700)]
Rename interval_set::begin and end

Rename interval_set::begin and end to interval_set::range_begin and
interval_set::range_end, respectively.

15 years agorgw: send 100-continue response only if requested
Yehuda Sadeh [Mon, 27 Sep 2010 16:37:07 +0000 (09:37 -0700)]
rgw: send 100-continue response only if requested

15 years agomds: set PREXLOCK next state to LOCK
Sage Weil [Mon, 27 Sep 2010 15:33:27 +0000 (08:33 -0700)]
mds: set PREXLOCK next state to LOCK

This really shouldn't happen (!), but if it does, at least avoid getting
the primary state out of sync with the replicas.

Signed-off-by: Sage Weil <sage@newdream.net>
15 years agomds: don't block request on freezing if we're already auth_pinned.
Sage Weil [Mon, 27 Sep 2010 15:31:34 +0000 (08:31 -0700)]
mds: don't block request on freezing if we're already auth_pinned.

If we already auth_pinned, we're past the gates; don't stop on freezable.

This screws up xlock: the lock moves to PREXLOCK state, but the request
that would normally xlock it gets deferred because of a racing freezing
of the tree.  Then the PREXLOCK gather kicks in and badness happens.

Signed-off-by: Sage Weil <sage@newdream.net>