]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
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 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 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 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 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 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 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 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>
14 years agodebug: always append to log
Sage Weil [Thu, 7 Oct 2010 14:52:02 +0000 (07:52 -0700)]
debug: always append to log

We were truncating if we were in log_per_instance mode.  But normally those
logs don't exist.  And if they do, we probably don't want to truncate
them.  This is particularly true if we respawn ourselves (e.g. after being
marked down) and restart with the same pid.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoinit-ceph: DTRT when cconf returns host = localhost
Sage Weil [Wed, 6 Oct 2010 23:32:43 +0000 (16:32 -0700)]
init-ceph: DTRT when cconf returns host = localhost

cconf behavior was just changed by bcf1bdef56a256d4857dd4f9d859acca631cc347

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agodebugpack: add ceph-pg-dump
Yehuda Sadeh [Thu, 7 Oct 2010 03:30:11 +0000 (20:30 -0700)]
debugpack: add ceph-pg-dump

14 years agocdebugpack: save some more info
Yehuda Sadeh [Thu, 7 Oct 2010 03:04:38 +0000 (20:04 -0700)]
cdebugpack: save some more info

ceph.conf
ceph -s
ceph osd dump
ceph mds dump

14 years agomds: Check the lock state, not the inode state!
Greg Farnum [Wed, 6 Oct 2010 23:35:14 +0000 (16:35 -0700)]
mds: Check the lock state, not the inode state!

This was causing a lot of slowdowns.
Additionally, pin the inode when exporting caps -- otherwise it could
disappear out from under a cap ack. This was probably just exposed
by fixing the lock check.

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: 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 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>
14 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

14 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

14 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

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

14 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.

14 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

14 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>
14 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

14 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.

14 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

14 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.

14 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.

14 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.

14 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.

14 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>
14 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>
14 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.

14 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.

14 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

14 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>
14 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>
14 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>
14 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>
14 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>