]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
14 years agomakefile: simplify cdebugpack install rule
Sage Weil [Wed, 20 Oct 2010 20:47:16 +0000 (13:47 -0700)]
makefile: simplify cdebugpack install rule

14 years agodebian: 0.22-4
Sage Weil [Tue, 19 Oct 2010 16:11:25 +0000 (09:11 -0700)]
debian: 0.22-4

14 years agoTestTimers: test SafeTimer as well as Timer
Colin Patrick McCabe [Wed, 20 Oct 2010 00:38:32 +0000 (17:38 -0700)]
TestTimers: test SafeTimer as well as Timer

Test SafeTimer as well as Timer. Test timer shutdown.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoTimer.cc: add testtimers
Colin Patrick McCabe [Wed, 20 Oct 2010 00:02:15 +0000 (17:02 -0700)]
Timer.cc: add testtimers

Add testtimers to test the timer code.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agotest_lost.sh: update timeout, fix payload
Colin Patrick McCabe [Tue, 19 Oct 2010 21:45:14 +0000 (14:45 -0700)]
test_lost.sh: update timeout, fix payload

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoOSDMap: const cleanup
Colin Patrick McCabe [Tue, 19 Oct 2010 17:20:21 +0000 (10:20 -0700)]
OSDMap: const cleanup

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoPG::build_prior: update comment
Colin Patrick McCabe [Tue, 19 Oct 2010 17:09:29 +0000 (10:09 -0700)]
PG::build_prior: update comment

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoosd: track prior_set_lost
Colin Patrick McCabe [Mon, 18 Oct 2010 20:44:51 +0000 (13:44 -0700)]
osd: track prior_set_lost

In the placement group code, track prior_set_lost. This fixes a bug
where a new OSDMap updates an OSD's lost_at time, but the PG code does
not update the PG data structures.

When clearing the peering state, call clear_prior() rather than manually
clearing every prior set.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoosd: fix spacing in OSDMap::print
Colin Patrick McCabe [Mon, 18 Oct 2010 17:31:25 +0000 (10:31 -0700)]
osd: fix spacing in OSDMap::print

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoOSDMap::print: print osd_info_t using ostream op
Colin Patrick McCabe [Fri, 15 Oct 2010 19:16:41 +0000 (12:16 -0700)]
OSDMap::print: print osd_info_t using ostream op

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoosd mon: validate arguments before marking lost
Colin Patrick McCabe [Fri, 15 Oct 2010 19:16:41 +0000 (12:16 -0700)]
osd mon: validate arguments before marking lost

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoosd: test: Add script to test LOST state
Colin Patrick McCabe [Fri, 15 Oct 2010 01:14:27 +0000 (18:14 -0700)]
osd: test: Add script to test LOST state

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agomessenger: Make sure to unlock existing->pipe_lock. There are a few cases in the...
Greg Farnum [Mon, 18 Oct 2010 18:23:50 +0000 (11:23 -0700)]
messenger: Make sure to unlock existing->pipe_lock. There are a few cases in the "open" section where we can go to fail_unlocked while still holding existing->pipe_lock. So unlock it.

14 years agomds: show readdir frag
Sage Weil [Thu, 21 Oct 2010 23:16:34 +0000 (16:16 -0700)]
mds: show readdir frag

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoclient: reset fg after _readdir_get_frag
Sage Weil [Thu, 21 Oct 2010 23:16:20 +0000 (16:16 -0700)]
client: reset fg after _readdir_get_frag

The _readdir_get_frag may remap our frag; update the local variable
accordingly.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoclient: fix skipped dentry on readdir chunk boundaries
Sage Weil [Thu, 21 Oct 2010 23:15:52 +0000 (16:15 -0700)]
client: fix skipped dentry on readdir chunk boundaries

The at_cache_name is the last name successfully passed to the caller.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoclient: fix dcache removal during multiple frags
Sage Weil [Thu, 21 Oct 2010 23:15:03 +0000 (16:15 -0700)]
client: fix dcache removal during multiple frags

We remove unexpected dentries from our cache while processing mds results.
Results are ordered within a frag, but not between them.  Since we can
have multiple frags, only remove results for the current frag, to avoid
removing items from earlier frags.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoclient: show file offsets in hex
Sage Weil [Thu, 21 Oct 2010 23:13:35 +0000 (16:13 -0700)]
client: show file offsets in hex

This makes it easy to pick out frags and offsets.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: fix inodestat encoding when frags are present
Sage Weil [Thu, 21 Oct 2010 20:07:38 +0000 (13:07 -0700)]
mds: fix inodestat encoding when frags are present

Also simplify the max_size check calculation.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: do not finish_scatter_gather_update_accounted on dirfraglock
Sage Weil [Thu, 21 Oct 2010 19:48:07 +0000 (12:48 -0700)]
mds: do not finish_scatter_gather_update_accounted on dirfraglock

This needs to match finish_scatter_gather_update, and we don't
update/project the dirfrag there.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoobjecter: reconnect on osd disconnect
Sage Weil [Thu, 21 Oct 2010 18:37:45 +0000 (11:37 -0700)]
objecter: reconnect on osd disconnect

If the connection closes to an OSD, we need to reconnect and resubmit our
ops.  Otherwise we just hang.  This is problematic if it is a transient
error, since we'll only retry if the OSDMap reflects a change, and that
won't happen for transient network/socket errors and such.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoobjecter: pause writes when FULL flag is set
Sage Weil [Thu, 21 Oct 2010 17:59:49 +0000 (10:59 -0700)]
objecter: pause writes when FULL flag is set

Also, subscribe to all osdmap updates while FULL flag is set, so that we
discover when it is unset.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoobjecter: always set READ or WRITE flag
Sage Weil [Thu, 21 Oct 2010 18:05:55 +0000 (11:05 -0700)]
objecter: always set READ or WRITE flag

We should set either (or both).  Assert if we don't.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agorgw: return 204 on successful removal of bucket/object
Yehuda Sadeh [Thu, 21 Oct 2010 16:53:37 +0000 (09:53 -0700)]
rgw: return 204 on successful removal of bucket/object

14 years agoMerge remote branch 'origin/testing' into unstable
Greg Farnum [Wed, 20 Oct 2010 16:24:59 +0000 (09:24 -0700)]
Merge remote branch 'origin/testing' into unstable

14 years agomon: Don't force a wait of paxos_propose_interval seconds on every commit.
Greg Farnum [Wed, 20 Oct 2010 02:48:47 +0000 (19:48 -0700)]
mon: Don't force a wait of paxos_propose_interval seconds on every commit.

Instead, we wait
1) Until last_commit_time + paxos_propose_interval
2) If past paxos_propose_interval, for paxos_min_wait seconds.

14 years agoObjecter::shutdown(): call SafeTimer::Join()
Colin Patrick McCabe [Tue, 19 Oct 2010 22:55:21 +0000 (15:55 -0700)]
Objecter::shutdown(): call SafeTimer::Join()

Objecter::shutdown() needs to call Timer::join() to ensure that
concurrently exectuting events in other threads get flushed before the
Objecter and its Timer are destroyed.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agobtrfs_ioc_test.c: added a unitest
Yehuda Sadeh [Tue, 19 Oct 2010 21:44:27 +0000 (14:44 -0700)]
btrfs_ioc_test.c: added a unitest

14 years agoSimpleMessenger::Pipe::Accept(): fix open
Colin Patrick McCabe [Mon, 18 Oct 2010 23:53:28 +0000 (16:53 -0700)]
SimpleMessenger::Pipe::Accept(): fix open

When not replacing an existing pipe, zero the 'existing' pointer.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoRevert "Revert "messenger: introduce a "halt_delivery" flag, checked by queue_delivery.""
Greg Farnum [Tue, 19 Oct 2010 15:57:22 +0000 (08:57 -0700)]
Revert "Revert "messenger: introduce a "halt_delivery" flag, checked by queue_delivery.""

This reverts commit d44267c2d6a77d4a3cda1e44ec7c58a19be51cc4.
The problem with this code was that it's possible for the Pipe
to be reused after calling discard_queue(), and we didn't
account for that. So, with this revert, it now sets halt_delivery=false
at the end of discard_queue() and the Pipe is ready for continued use.

14 years agofilestore: deliberate crash on ENOSPC or EIO
Sage Weil [Mon, 18 Oct 2010 20:28:42 +0000 (13:28 -0700)]
filestore: deliberate crash on ENOSPC or EIO

Neither of these are handled, so crash when we hit them.  This ensures we
don't blindly continue on with a partially applied transaction and corrupt
our store any further.

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

src/os/FileStore.cc

14 years agodebian: sign/publish specific deb version
Sage Weil [Mon, 18 Oct 2010 19:55:49 +0000 (12:55 -0700)]
debian: sign/publish specific deb version

14 years agodebian: update standards-version; fix ceph-client-tools-dbg
Sage Weil [Mon, 18 Oct 2010 18:01:15 +0000 (11:01 -0700)]
debian: update standards-version; fix ceph-client-tools-dbg

14 years agofilestore: deliberate crash on ENOSPC or EIO
Sage Weil [Mon, 18 Oct 2010 20:28:07 +0000 (13:28 -0700)]
filestore: deliberate crash on ENOSPC or EIO

Neither of these are handled, so crash when we hit them.  This ensures we
don't blindly continue on with a partially applied transaction and corrupt
our store any further.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomessenger: Make sure to unlock existing->pipe_lock.
Greg Farnum [Mon, 18 Oct 2010 18:23:50 +0000 (11:23 -0700)]
messenger: Make sure to unlock existing->pipe_lock.
There are a few cases in the "open" section where we can go to
fail_unlocked while still holding existing->pipe_lock. So unlock it.

14 years agodebian: update scripts to do packaging fixes
Sage Weil [Mon, 18 Oct 2010 17:19:28 +0000 (10:19 -0700)]
debian: update scripts to do packaging fixes

14 years agoRevert "messenger: introduce a "halt_delivery" flag, checked by queue_delivery."
Sage Weil [Mon, 18 Oct 2010 03:15:02 +0000 (20:15 -0700)]
Revert "messenger: introduce a "halt_delivery" flag, checked by queue_delivery."

This reverts commit 69be0df61d29a093dbeadf6dbcd4e18b429d0a22.

14 years agomon: add 'mds rm <gid>' and 'mds rmfailed <id>' commands
Sage Weil [Mon, 18 Oct 2010 03:04:32 +0000 (20:04 -0700)]
mon: add 'mds rm <gid>' and 'mds rmfailed <id>' commands

For cleaning up the mds map when things get weird.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoMerge remote branch 'origin/testing' into testing
Sage Weil [Mon, 18 Oct 2010 03:00:03 +0000 (20:00 -0700)]
Merge remote branch 'origin/testing' into testing

14 years agoMerge branch 'rc' into unstable
Sage Weil [Fri, 15 Oct 2010 23:43:16 +0000 (16:43 -0700)]
Merge branch 'rc' into unstable

Conflicts:
configure.ac
src/mds/ScatterLock.h

14 years agov0.22 v0.22
Sage Weil [Fri, 15 Oct 2010 20:49:46 +0000 (13:49 -0700)]
v0.22

14 years agodebian: no libgoogle-perftools-dev on lenny
Sage Weil [Fri, 15 Oct 2010 22:34:38 +0000 (15:34 -0700)]
debian: no libgoogle-perftools-dev on lenny

14 years agomds: cleanup: clarify issue_seq in cap release debug output
Sage Weil [Fri, 15 Oct 2010 16:38:31 +0000 (09:38 -0700)]
mds: cleanup: clarify issue_seq in cap release debug output

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: cleanup: print waiter masks in hex
Sage Weil [Fri, 15 Oct 2010 16:38:08 +0000 (09:38 -0700)]
mds: cleanup: print waiter masks in hex

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: use correct helper when pinning past snaprealm parent
Sage Weil [Fri, 15 Oct 2010 16:37:40 +0000 (09:37 -0700)]
mds: use correct helper when pinning past snaprealm parent

The heler also updates the SnapRealm::open_past_parents, which is needed
for the have_past_parents_open() check.

That is used when, among other things, we import caps; not updating it
prevented the cap import from sending the client cap message, which makes
the mds<->client cap relationship get out of sync.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: take nestlock wrlock when projecting rstat into dirfrag
Sage Weil [Fri, 15 Oct 2010 14:59:29 +0000 (07:59 -0700)]
mds: take nestlock wrlock when projecting rstat into dirfrag

We were already checking that we _can_ wrlock before doing the rstat
projection (if we can't, we mark_dirty_rstat() on the inode), but we
weren't actually taking the wrlock to prevent lock state changes while
that happened.

This bug eventually manifested itself as a failed assertion at the
now familiar
mds/CInode.cc: In function 'virtual void CInode::decode_lock_state(int, ceph::bufferlist&)':
mds/CInode.cc:1364: FAILED assert(pf->rstat == rstat)

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomessenger: introduce timeouts on pipes.
Greg Farnum [Fri, 15 Oct 2010 18:21:02 +0000 (11:21 -0700)]
messenger: introduce timeouts on pipes.

This will return read errors on a pipe if it gets no data
for the given period of time (default 15 minutes). In a stateful
session the Connection will hang around and the next write will
initiate standard reconnect, so things keep working but we don't
rack up hundreds of useless threads!

14 years agorgw: small cleanup
Yehuda Sadeh [Fri, 15 Oct 2010 17:41:58 +0000 (10:41 -0700)]
rgw: small cleanup

14 years agoAdd RGW_PRINT_CONTINUE to control wether we print the 100-continue header
Wido den Hollander [Mon, 27 Sep 2010 19:21:25 +0000 (21:21 +0200)]
Add RGW_PRINT_CONTINUE to control wether we print the 100-continue header

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
14 years agoconf: only set sig handler if wasn't set already
Yehuda Sadeh [Fri, 15 Oct 2010 17:16:52 +0000 (10:16 -0700)]
conf: only set sig handler if wasn't set already

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
14 years agomon: do not assert if paxosv < monmap->epoch
Henry C Chang [Thu, 14 Oct 2010 11:57:02 +0000 (19:57 +0800)]
mon: do not assert if paxosv < monmap->epoch

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomon: do not delete mon->monmap which is not created by new
Henry C Chang [Thu, 14 Oct 2010 11:52:41 +0000 (19:52 +0800)]
mon: do not delete mon->monmap which is not created by new

Signed-off-by: Sage Weil <sage@newdream.net>
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 agomds: fix can_scatter_pin() to be only SYNC and MIX
Sage Weil [Thu, 14 Oct 2010 22:07:16 +0000 (15:07 -0700)]
mds: fix can_scatter_pin() to be only SYNC and MIX

Those are the only states where the replica can effectively prevent the
lock from cycling in a way that would force a frozen dirfrag beneath
the scatterpinned inode to update/journal something
(accounted_fragstat/rstat).

Signed-off-by: Sage Weil <sage@newdream.net>
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 agoFix bug #487: osd: fix hang during mkfs
Colin Patrick McCabe [Thu, 14 Oct 2010 18:51:47 +0000 (11:51 -0700)]
Fix bug #487: osd: fix hang during mkfs

If the user has turned on journalling, but left osd_journal_size at 0,
normally we would use the existing size of the journal without
modifications. If the journal doesn't exist (i.e., we are running
mkjournal()), we have to check for this condition and return an error.
We can't create a journal if we don't know what size that journal needs
to be.

This fixes a bug where an extremely small journal file was being
created, leading to an infinite loop in FileJournal::wrap_read_bl().

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoFileJournal.h: add attribute __packed where needed
Colin Patrick McCabe [Thu, 14 Oct 2010 18:12:49 +0000 (11:12 -0700)]
FileJournal.h: add attribute __packed where needed

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agomessenger: introduce a "halt_delivery" flag, checked by queue_delivery.
Greg Farnum [Thu, 14 Oct 2010 18:05:51 +0000 (11:05 -0700)]
messenger: introduce a "halt_delivery" flag, checked by queue_delivery.
Defaults to false, is set to true by destroy_queue.

14 years agoosd: fix MOSDBoot versioning
Sage Weil [Wed, 13 Oct 2010 19:11:14 +0000 (12:11 -0700)]
osd: fix MOSDBoot versioning

1 is what it was before; make it 2.

Signed-off-by: Sage Weil <sage@newdream.net>
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 agoqa: add ffsb
Sage Weil [Wed, 13 Oct 2010 17:09:27 +0000 (10:09 -0700)]
qa: add ffsb

14 years agoprefix git sha1 with commit:
Sage Weil [Wed, 13 Oct 2010 15:50:55 +0000 (08:50 -0700)]
prefix git sha1 with commit:

This just makes it into a link when pasted directly into redmine.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: don't assert on mismatched rbytes
Sage Weil [Tue, 12 Oct 2010 22:26:15 +0000 (15:26 -0700)]
mds: don't assert on mismatched rbytes

14 years agoMerge branch 'testing' into rc
Sage Weil [Tue, 12 Oct 2010 22:15:05 +0000 (15:15 -0700)]
Merge branch 'testing' into rc

14 years agoadd rc to release.sh
Sage Weil [Tue, 12 Oct 2010 19:47:24 +0000 (12:47 -0700)]
add rc to release.sh

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 agomds: fix const-ness of is_dirty()
Sage Weil [Tue, 12 Oct 2010 20:59:44 +0000 (13:59 -0700)]
mds: fix const-ness of is_dirty()

This was fixed before, got lost somehow.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomon: don't include endl on clock drift warning
Greg Farnum [Tue, 12 Oct 2010 19:42:31 +0000 (12:42 -0700)]
mon: don't include endl on clock drift warning

14 years agoMakefile: add cdebugpack.in to EXTRA_DIST
Sage Weil [Tue, 12 Oct 2010 18:17:13 +0000 (11:17 -0700)]
Makefile: add cdebugpack.in to EXTRA_DIST

14 years agomds: Fix projection in rename code paths.
Greg Farnum [Mon, 11 Oct 2010 16:40:29 +0000 (09:40 -0700)]
mds: Fix projection in rename code paths.
We aren't actually projecting the inode unless destdn->is_auth(),
so check for that before projecting the snaprealm (which requires
a projected inode)!
Then on rename_apply, open the snaprealm on non-auth MDSes.

14 years agomds: CInode doesn't always call assimilate_dirty_rstate_inodes_finish
Greg Farnum [Fri, 8 Oct 2010 21:38:19 +0000 (14:38 -0700)]
mds: CInode doesn't always call assimilate_dirty_rstate_inodes_finish

This was causing a mis-match in the projection code, since
assimilate_...finish() calls pop_and_dirty_projected_inode(), but
the first half is only called on CEPH_LOCK_INEST locks. So make them match!

14 years agomds: Locker::local_wrlock_finish now calls finish_waiters!
Greg Farnum [Fri, 8 Oct 2010 21:35:58 +0000 (14:35 -0700)]
mds: Locker::local_wrlock_finish now calls finish_waiters!

Fixes a bug that could cause requests to hang since they were
put to sleep and never woken up.

14 years agomds: MDCache should adjust_nested_anchors once the op's been logged.
Greg Farnum [Thu, 7 Oct 2010 20:04:26 +0000 (13:04 -0700)]
mds: MDCache should adjust_nested_anchors once the op's been logged.
Fixes crashes from assert(nested_anchors >= 0) failures
when updating at the wrong point.

14 years agomds: avoid EXCL if mds_caps_wanted in _do_cap_update
Sage Weil [Tue, 12 Oct 2010 04:25:17 +0000 (21:25 -0700)]
mds: avoid EXCL if mds_caps_wanted in _do_cap_update

The file_excl() trigger asserts mds_caps_wanted is empty.  The caller
shouldn't call it if that's the case.  If it is, just go to LOCK instead.
All we're doing is picking a state to move to that will allow us to
update max_size.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: bump dirstat.version during link/unlink/mtime update
Sage Weil [Tue, 12 Oct 2010 04:13:00 +0000 (21:13 -0700)]
mds: bump dirstat.version during link/unlink/mtime update

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: fix get_xlock() assert on slave xlock
Sage Weil [Tue, 12 Oct 2010 03:57:46 +0000 (20:57 -0700)]
mds: fix get_xlock() assert on slave xlock

If we do a slave request xlock, the state is LOCK, not XLOCK.  Weaken
the SimpleLock::get_xlock() assert accordingly.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: bump rstat version in predirty_journal_parents
Sage Weil [Tue, 12 Oct 2010 03:51:19 +0000 (20:51 -0700)]
mds: bump rstat version in predirty_journal_parents

When we propagate the rstat to inode in predirty_journal_parents (because
we hold the nestlock), bump the rstat version as well.  This avoids
confusing any replicas, who expect the rstat to have a new version or to
remain unchanged when the lock scatters.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agofilestore: don't start commit if nothing new is _applied_
Sage Weil [Fri, 8 Oct 2010 17:45:51 +0000 (10:45 -0700)]
filestore: don't start commit if nothing new is _applied_

We were starting a commit if we had started a new op, but that left a
window in which the op could be being journaled, and nothing new has been
applied to disk.  With this fix we only commit if committing/committed
will increase.  Now the check matches the

 committing_seq = applied_seq;

a few lines down, and all is well.

The actual crash this fixes was:

2010-10-07 16:20:36.245301 7f07e66d3710 filestore(/mnt/osd3) taking snap 'snap_23230'
2010-10-07 16:20:36.245428 7f07e66d3710 filestore(/mnt/osd3) snap create 'snap_23230' got -1 File exists
os/FileStore.cc: In function 'void FileStore::sync_entry()':
os/FileStore.cc:1738: FAILED assert(r == 0)
 ceph version 0.22~rc (1d77c14bc310aed31d6cfeb2c87e87187d3527ea)
 1: (FileStore::sync_entry()+0x6ee) [0x793148]
 2: (FileStore::SyncThread::entry()+0x19) [0x761d43]
 3: (Thread::_entry_func(void*)+0x20) [0x667822]
 4: (()+0x68ba) [0x7f07eac248ba]
 5: (clone()+0x6d) [0x7f07e9bd802d]

Signed-off-by: Sage Weil <sage@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 agocdebugpack: update Makefile.am, add missing line
Yehuda Sadeh [Fri, 8 Oct 2010 20:55:13 +0000 (13:55 -0700)]
cdebugpack: update Makefile.am, add missing line

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 agomon: class library encodes/decodes activated class
Yehuda Sadeh [Fri, 8 Oct 2010 06:20:24 +0000 (23:20 -0700)]
mon: class library encodes/decodes activated class

This fixes bug #470

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: fix merge_log cut point
Sage Weil [Thu, 7 Oct 2010 23:16:48 +0000 (16:16 -0700)]
osd: fix merge_log cut point

Look at the eversion.version field (not the whole eversion) when deciding
what is divergent.  That way if we have

our log: 100'10 (0'0) m 10000004d3a.00000000/head by client4225.1:18529
new log: 122'10 (0'0) m 10000004d3a.00000000/head by client4225.1:18529

The 100'10 is divergent and the 122'10 wins and we don't get a dup
reqid in the log.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: loosen caller_ops asserts
Sage Weil [Thu, 7 Oct 2010 23:15:45 +0000 (16:15 -0700)]
osd: loosen caller_ops asserts

The problem is that merge_log adds new items to the log before it unindexes
divergent items, and that behavior is needed by the current implementation
of merge_old_entry().  Since the divergent items may be the same requests
(and frequently are) these asserts needs to be loosened up.

Now, the most recent addition "wins," and we only remove the entry in
unindex() if it points to us.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: move to boot state if down OR wrong address in map
Sage Weil [Thu, 7 Oct 2010 23:09:25 +0000 (16:09 -0700)]
osd: move to boot state if down OR wrong address in map

Saw an OSD that was up in the map, but the address didn't match.  Caused
all kinds of strange behavior.  I'm not sure what I had in mind when the
original test only checked for down AND same address before moving to boot
state, since having the wrong address is clearly bad news.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agocdebugpack: behave when /bin/sh is dash
Sage Weil [Thu, 7 Oct 2010 16:47:34 +0000 (09:47 -0700)]
cdebugpack: behave when /bin/sh is dash

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agocdebugpack: man page
Sage Weil [Thu, 7 Oct 2010 16:38:37 +0000 (09:38 -0700)]
cdebugpack: man page

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agocdebugpack: include cdebugpack.XXXX dir in tarball
Sage Weil [Thu, 7 Oct 2010 16:31:31 +0000 (09:31 -0700)]
cdebugpack: include cdebugpack.XXXX dir in tarball

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agocdebugpack: include .tar.gz in usage filename
Sage Weil [Thu, 7 Oct 2010 16:31:13 +0000 (09:31 -0700)]
cdebugpack: include .tar.gz in usage filename

14 years agocdebugpack: include in deb, rpm
Sage Weil [Thu, 7 Oct 2010 16:25:26 +0000 (09:25 -0700)]
cdebugpack: include in deb, rpm

14 years agomds: respawn (instead of suicide) on being marked down
Sage Weil [Thu, 7 Oct 2010 14:52:50 +0000 (07:52 -0700)]
mds: respawn (instead of suicide) on being marked down

This makes temporarily laggy daemons will restart and rejoin the cluster
in standby mode.

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