]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
14 years agomds: fix _freeze_dir assert for refragment case
Sage Weil [Tue, 12 Apr 2011 22:32:17 +0000 (15:32 -0700)]
mds: fix _freeze_dir assert for refragment case

The is_freezeable_dir() is true at freeze time but not forever after over
the lifetime of the freeze.  We split later on and _freeze_dir on the new
fragments, so this assertion isn't necessarily true then.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: fix choose_lock_state() on xlocked object
Sage Weil [Tue, 12 Apr 2011 22:10:54 +0000 (15:10 -0700)]
mds: fix choose_lock_state() on xlocked object

This crops up on inodes during clientreplay when we reconnect the cap
on the newly created (and still xlocked) object.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: Use syncfs when available
Colin Patrick McCabe [Wed, 13 Apr 2011 20:28:52 +0000 (13:28 -0700)]
osd: Use syncfs when available

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agorgw: create bucket with empty name should return a valid error
Yehuda Sadeh [Wed, 13 Apr 2011 20:29:24 +0000 (13:29 -0700)]
rgw: create bucket with empty name should return a valid error

14 years agorgw: recreation of bucket returns success
Yehuda Sadeh [Wed, 13 Apr 2011 17:38:11 +0000 (10:38 -0700)]
rgw: recreation of bucket returns success

unless it was owned by a different user, at which case it
returns -EEXIST.

14 years agomds: update rstats on stray dir when you rename over existing inode.
Greg Farnum [Wed, 13 Apr 2011 17:36:05 +0000 (10:36 -0700)]
mds: update rstats on stray dir when you rename over existing inode.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agosample.ceph.conf: add log file and pid file
Colin Patrick McCabe [Wed, 13 Apr 2011 17:02:25 +0000 (10:02 -0700)]
sample.ceph.conf: add log file and pid file

These really should be included in a sample...

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agovstart.sh: use "log file" instead of "log dir"
Colin Patrick McCabe [Wed, 13 Apr 2011 16:59:16 +0000 (09:59 -0700)]
vstart.sh: use "log file" instead of "log dir"

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agorgw: listing non existent bucket returns NoSuchBucket
Yehuda Sadeh [Wed, 13 Apr 2011 15:45:43 +0000 (08:45 -0700)]
rgw: listing non existent bucket returns NoSuchBucket

14 years agoMerge remote branch 'origin/mon_mds'
Sage Weil [Wed, 13 Apr 2011 02:57:18 +0000 (19:57 -0700)]
Merge remote branch 'origin/mon_mds'

14 years agoosd: move MAX_CEPH_OBJECT_NAME_LEN into object.h
Colin Patrick McCabe [Wed, 13 Apr 2011 00:20:21 +0000 (17:20 -0700)]
osd: move MAX_CEPH_OBJECT_NAME_LEN into object.h

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoosd: check obj name length to avoid ENAMETOOLONG
Colin Patrick McCabe [Tue, 12 Apr 2011 23:41:06 +0000 (16:41 -0700)]
osd: check obj name length to avoid ENAMETOOLONG

Since the object store is ultimately based on ext3, ext4, or btrfs, and
object names ultimately get translated into file names, we need to
impose a corresponding limit on the length of ceph object names.

Otherwise, the "writeback" thread in the FileStore gets ENAMETOOLONG,
and the transaction does not succeed, even though we journalled it.

Perhaps we will extend or eliminate MAX_CEPH_OBJECT_NAME_LEN at some
point by using prehashing or some other technique. Until then, we need
to be sure to check for this.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agolibrbd: don't write to stdout
Josh Durgin [Tue, 12 Apr 2011 23:39:48 +0000 (16:39 -0700)]
librbd: don't write to stdout

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agoAdd test_mutate
Colin Patrick McCabe [Tue, 12 Apr 2011 21:05:21 +0000 (14:05 -0700)]
Add test_mutate

Add test_mutate, in an effort to track down an objecter bug.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomdsmap: initialize standby_for_rank
Sage Weil [Tue, 12 Apr 2011 21:00:24 +0000 (14:00 -0700)]
mdsmap: initialize standby_for_rank

This is initialized in MDSMonitor anyway; do so where for completeness.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomon: simplify mds follow checks
Sage Weil [Tue, 12 Apr 2011 21:13:56 +0000 (14:13 -0700)]
mon: simplify mds follow checks

Instead of assigning followers in the last_beacon laggy check loop, do it
at the end, the same way we let standby nodes take over.

This also fixes a bug where a non-standby node (say, up:replay) that used
to be up:standby-replay and has standby_for_rank set gets reset back to
up:standby-replay.

Fixes: #1001
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomon: simplify mds laggy check
Sage Weil [Tue, 12 Apr 2011 20:54:53 +0000 (13:54 -0700)]
mon: simplify mds laggy check

We should never have a laggy standby, so technically this doesn't change
any behavior, but it makes the flow less confusing.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomon: don't take over for a standby-replay
Sage Weil [Tue, 12 Apr 2011 20:33:32 +0000 (13:33 -0700)]
mon: don't take over for a standby-replay

If a standby-replay is laggy we shouldn't "take over" for them (they're
not part of the cluster yet).  They should be removed like a regular
standby.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agorados-tool: use init_with_config interface
Colin Patrick McCabe [Tue, 12 Apr 2011 21:04:06 +0000 (14:04 -0700)]
rados-tool: use init_with_config interface

Programs that use both librados and common_init should use
init_with_config.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomds: improve scatterlog debug msg
Sage Weil [Mon, 11 Apr 2011 21:54:59 +0000 (14:54 -0700)]
mds: improve scatterlog debug msg

14 years agomds: clear flush state on rejoin ack
Sage Weil [Wed, 6 Apr 2011 22:12:57 +0000 (15:12 -0700)]
mds: clear flush state on rejoin ack

If we sent scatterlock state during rejoin, the auth will send us an inode
base.  Clear scatterlock flush state if that happens.

Fixes: #637
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: send any dirty scatterlock state on rejoin
Sage Weil [Wed, 6 Apr 2011 22:09:39 +0000 (15:09 -0700)]
mds: send any dirty scatterlock state on rejoin

Not just inodes for auth dirfrags, but for any inode with dirty scatterlock
state.  Include the root inode.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: reset dirty->flushing on rejoin scatterflush
Sage Weil [Wed, 6 Apr 2011 20:29:38 +0000 (13:29 -0700)]
mds: reset dirty->flushing on rejoin scatterflush

Reset dirty/flushing state during rejoin.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: drop debugging cruft
Sage Weil [Tue, 12 Apr 2011 18:08:43 +0000 (11:08 -0700)]
mds: drop debugging cruft

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: make _create_system_file dirty dentries properly
Sage Weil [Tue, 12 Apr 2011 18:08:39 +0000 (11:08 -0700)]
mds: make _create_system_file dirty dentries properly

Properly dirty the new dentries so they get written to the directory
objects later on.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: fix create_mydir_hierarchy to save dir
Sage Weil [Tue, 12 Apr 2011 18:07:54 +0000 (11:07 -0700)]
mds: fix create_mydir_hierarchy to save dir

Mark the dentries dirty so they get saved to disk (they're not journaled!).
This fixes rstat problems on startup, where populate_mydir was recreating
the entries and munging rstats accordingly.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoradosacl: read Ceph configuration file
Colin Patrick McCabe [Tue, 12 Apr 2011 17:55:25 +0000 (10:55 -0700)]
radosacl: read Ceph configuration file

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agocephtool: don't print anything on SIGTERM, SIGINT
Colin Patrick McCabe [Tue, 12 Apr 2011 16:38:50 +0000 (09:38 -0700)]
cephtool: don't print anything on SIGTERM, SIGINT

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomds: don't crash on bad export_dir command
Sage Weil [Mon, 11 Apr 2011 17:18:26 +0000 (10:18 -0700)]
mds: don't crash on bad export_dir command

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: fix file_eval on subtree roots
Sage Weil [Mon, 11 Apr 2011 17:14:21 +0000 (10:14 -0700)]
mds: fix file_eval on subtree roots

We were going from mix->sync when we shouldn't.  Fix mis-coded filelock
and look at _lock_ state, not inode's!

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoMerge remote branch 'origin/dead-code'
Sage Weil [Mon, 11 Apr 2011 23:30:10 +0000 (16:30 -0700)]
Merge remote branch 'origin/dead-code'

14 years agoosd: fix ref leak on pg when queueing
Sage Weil [Mon, 11 Apr 2011 23:22:11 +0000 (16:22 -0700)]
osd: fix ref leak on pg when queueing

op_wq.queue() takes a ref; don't take one here too.  We were leaking like
crazy.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: take reference for RepModify
Sage Weil [Mon, 11 Apr 2011 23:21:41 +0000 (16:21 -0700)]
osd: take reference for RepModify

We put in the completions on done; take the matching reference.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: fix race in op enqueuing
Sage Weil [Mon, 11 Apr 2011 23:18:39 +0000 (16:18 -0700)]
osd: fix race in op enqueuing

This is never really exposed except when op_threads == 0.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomon: simplify osd health output
Sage Weil [Mon, 11 Apr 2011 16:43:25 +0000 (09:43 -0700)]
mon: simplify osd health output

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: only log scrub errors (not ok's)
Sage Weil [Mon, 11 Apr 2011 16:36:25 +0000 (09:36 -0700)]
osd: only log scrub errors (not ok's)

Otherwise we fill up the error log with "foo is ok!" messages.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoTestSnaps: Fix compile error
Samuel Just [Mon, 11 Apr 2011 16:45:57 +0000 (09:45 -0700)]
TestSnaps: Fix compile error

Introduced in 0e371de79e4047b92317dee353f6d75c2aba4260.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agocfuse: pass through SIGTERM, SIGINT to FUSE
Colin Patrick McCabe [Sat, 9 Apr 2011 01:14:13 +0000 (18:14 -0700)]
cfuse: pass through SIGTERM, SIGINT to FUSE

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoceph_fuse_ll_main: restructure error handling
Colin Patrick McCabe [Fri, 8 Apr 2011 22:52:40 +0000 (15:52 -0700)]
ceph_fuse_ll_main: restructure error handling

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agolibrbdtest: check for error on out of bounds I/O
Josh Durgin [Sat, 9 Apr 2011 00:39:04 +0000 (17:39 -0700)]
librbdtest: check for error on out of bounds I/O

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agolibrbd: check for out of bounds I/O in all forms of read/write
Josh Durgin [Sat, 9 Apr 2011 00:38:07 +0000 (17:38 -0700)]
librbd: check for out of bounds I/O in all forms of read/write

This was found by qemu-io tests, which tried to read and write past
the end of an rbd image. The test hung waiting for a completion that
was never scheduled, since it did not check the return value of
rbd_aio_write.

Reported-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agocfuse recognizing same xattr subset as kernel client
Brian Chrisman [Fri, 8 Apr 2011 22:42:16 +0000 (15:42 -0700)]
cfuse recognizing same xattr subset as kernel client

Hopefully this patch is formatted/signed off correctly.

Signed-off-by: Brian Chrisman <brchrisman@gmail.com>
14 years agoTestSnaps.cc: allow client id to be overridden
Samuel Just [Fri, 8 Apr 2011 23:13:14 +0000 (16:13 -0700)]
TestSnaps.cc: allow client id to be overridden

CEPH_CLIENT_ID environment variable if set now overrides the rados
client id for testsnaps

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agorgw: utility, not daemon
Sage Weil [Fri, 8 Apr 2011 20:11:45 +0000 (13:11 -0700)]
rgw: utility, not daemon

- we don't want to open a log file
- we don't want to print a stability warning
- we don't want to fork (not that we do, but anyway!)

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoCDir: check_rstats will now print out dir stats whenever there's a bug.
Greg Farnum [Fri, 8 Apr 2011 18:17:48 +0000 (11:17 -0700)]
CDir: check_rstats will now print out dir stats whenever there's a bug.

Previously it only printed out dir stats at high debug levels, which
meant you could get output of the dentries without seeing what the
totals were supposed to be!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoobsync: preserve ACLs
Colin Patrick McCabe [Fri, 8 Apr 2011 00:03:11 +0000 (17:03 -0700)]
obsync: preserve ACLs

Preserve ACLs by default. Also add --no-preserve-acls option to disable
this behavior.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoobsync: escape obj names between S3 and local FS
Colin Patrick McCabe [Thu, 7 Apr 2011 22:16:15 +0000 (15:16 -0700)]
obsync: escape obj names between S3 and local FS

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoosd: futz with stat again.
Greg Farnum [Thu, 7 Apr 2011 23:17:20 +0000 (16:17 -0700)]
osd: futz with stat again.

We really need to fill in the result, even if it's that the object
doesn't exist!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agotest/osd: Add latency stat collection to TestSnaps.cc/RadosModel.h
Samuel Just [Tue, 5 Apr 2011 19:04:45 +0000 (12:04 -0700)]
test/osd: Add latency stat collection to TestSnaps.cc/RadosModel.h

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoReplicatedPG: fix error in snap_trimmer
Samuel Just [Thu, 7 Apr 2011 21:38:48 +0000 (14:38 -0700)]
ReplicatedPG: fix error in snap_trimmer

newsnaps continued to be used after it was swapped with coi.snaps.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agocrush, clitest: Port old test_crushtool.sh to clitest.
Tommi Virtanen [Thu, 7 Apr 2011 22:05:02 +0000 (15:05 -0700)]
crush, clitest: Port old test_crushtool.sh to clitest.

Also test --help, while we're at it.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoosd: more futzing with stat
Sage Weil [Thu, 7 Apr 2011 21:57:41 +0000 (14:57 -0700)]
osd: more futzing with stat

We can get here when the object doesn't exist if the client specifies
may read and may write (in this case, Filer::probe).  Look at the exists
bit in the object context.  If the object is supposed to exist, we should never get ENOENT from stat.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agolibceph: Make header usable from plain old C.
Tommi Virtanen [Thu, 7 Apr 2011 18:47:35 +0000 (11:47 -0700)]
libceph: Make header usable from plain old C.

Fixes: #986
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agocrush: Remove dead code.
Tommi Virtanen [Thu, 7 Apr 2011 21:42:05 +0000 (14:42 -0700)]
crush: Remove dead code.

The Makefile never integrated with the surrounding automake
setup, and is unused.

The test helper has failed to compile for quite a long time.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agocrush: Remove dead code.
Tommi Virtanen [Thu, 7 Apr 2011 21:34:37 +0000 (14:34 -0700)]
crush: Remove dead code.

Looks like these never went anywhere.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoradosgw: Remove PHP setting from VirtualHost documentation
Wido den Hollander [Thu, 7 Apr 2011 10:23:34 +0000 (12:23 +0200)]
radosgw: Remove PHP setting from VirtualHost documentation

Signed-off-by: Wido den Hollander <wido@widodh.nl>
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: Remove dead code.
Tommi Virtanen [Thu, 7 Apr 2011 21:25:12 +0000 (14:25 -0700)]
osd: Remove dead code.

RAID4PG has been "temporarily ripped out" for 3.5 years.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agomsg, os: Remove dead code.
Tommi Virtanen [Thu, 7 Apr 2011 21:22:39 +0000 (14:22 -0700)]
msg, os: Remove dead code.

Looks like these never went anywhere.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agotest-obsync.py: add test for --follow-symlinks
Colin Patrick McCabe [Thu, 7 Apr 2011 21:22:15 +0000 (14:22 -0700)]
test-obsync.py: add test for --follow-symlinks

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest-obsync: some fixes, be more verbose
Colin Patrick McCabe [Thu, 7 Apr 2011 21:10:29 +0000 (14:10 -0700)]
test-obsync: some fixes, be more verbose

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoboto_tool.py: fix rmbucket
Colin Patrick McCabe [Thu, 7 Apr 2011 17:53:37 +0000 (10:53 -0700)]
boto_tool.py: fix rmbucket

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoobsync: add --follow-symlinks
Colin Patrick McCabe [Thu, 7 Apr 2011 17:25:10 +0000 (10:25 -0700)]
obsync: add --follow-symlinks

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoReplicatedPG: tolerate ENOENT when statting.
Greg Farnum [Thu, 7 Apr 2011 21:03:39 +0000 (14:03 -0700)]
ReplicatedPG: tolerate ENOENT when statting.

This got broken in commit f842bcf893e42a4cefda07d0bbf86303b17ddcd7
so that on any MDS restart the OSD would die. Bad OSD! Bad!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoqa: Remove fsx workunit.
Tommi Virtanen [Thu, 7 Apr 2011 21:07:24 +0000 (14:07 -0700)]
qa: Remove fsx workunit.

Covered better by autotest, these days.

14 years agocommon, msg: Remove dead code.
Tommi Virtanen [Thu, 7 Apr 2011 21:06:53 +0000 (14:06 -0700)]
common, msg: Remove dead code.

Looks like these never went anywhere.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agocrush.old: Remove dead code.
Tommi Virtanen [Thu, 7 Apr 2011 20:45:04 +0000 (13:45 -0700)]
crush.old: Remove dead code.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoebofs: Remove dead code.
Tommi Virtanen [Thu, 7 Apr 2011 19:40:26 +0000 (12:40 -0700)]
ebofs: Remove dead code.

Nothing has used the EboFS object storage in years.

Fix usage string of dupstore.

FileJournal and Journal are now part of OSD proper, not
EboFS.

The old scripts in src/jobs are probably broken, but
not touching them further right now.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoosbdb: Remove dead code.
Tommi Virtanen [Thu, 7 Apr 2011 19:24:06 +0000 (12:24 -0700)]
osbdb: Remove dead code.

Nothing has used the BerkeleyDB-backed object storage in years.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoclitest: Disabled problematic rados test, for now.
Tommi Virtanen [Thu, 7 Apr 2011 19:03:36 +0000 (12:03 -0700)]
clitest: Disabled problematic rados test, for now.

Failed on gitbuilder due to odd libtool interaction.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoclitest: Add more simple basic functionality tests.
Tommi Virtanen [Thu, 7 Apr 2011 18:12:38 +0000 (11:12 -0700)]
clitest: Add more simple basic functionality tests.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agolibrados-config: Distribute the librados-config.8 manpage.
Tommi Virtanen [Thu, 7 Apr 2011 17:53:05 +0000 (10:53 -0700)]
librados-config: Distribute the librados-config.8 manpage.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agolibrados: Stop bundling the now-unused headers.
Tommi Virtanen [Thu, 7 Apr 2011 16:39:48 +0000 (09:39 -0700)]
librados: Stop bundling the now-unused headers.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agobuffer: Move atomic.h include from buffer.h to buffer.cc
Tommi Virtanen [Wed, 6 Apr 2011 21:03:02 +0000 (14:03 -0700)]
buffer: Move atomic.h include from buffer.h to buffer.cc

Fix up other places that failed to include atomic.h even
if they used atomic_t directly.

Fixes: #979
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agobuffer, atomic: Explicitly include assert.h where asserts are used.
Tommi Virtanen [Thu, 7 Apr 2011 00:00:39 +0000 (17:00 -0700)]
buffer, atomic: Explicitly include assert.h where asserts are used.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agobuffer: Move buffer::raw* out of the header.
Tommi Virtanen [Wed, 6 Apr 2011 20:42:20 +0000 (13:42 -0700)]
buffer: Move buffer::raw* out of the header.

This paves the way for getting librados.hpp clean of atomic_t
leaking to client code.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agobuffer: Move functions touching buffer::raw internals into buffer.cc
Tommi Virtanen [Wed, 6 Apr 2011 20:53:42 +0000 (13:53 -0700)]
buffer: Move functions touching buffer::raw internals into buffer.cc

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agobuffer: Move functions touching buffer::raw internals into buffer.cc
Tommi Virtanen [Wed, 6 Apr 2011 20:53:25 +0000 (13:53 -0700)]
buffer: Move functions touching buffer::raw internals into buffer.cc

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agobuffer: Move functions touching buffer::raw internals into buffer.cc
Tommi Virtanen [Wed, 6 Apr 2011 20:51:23 +0000 (13:51 -0700)]
buffer: Move functions touching buffer::raw internals into buffer.cc

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agobuffer: Move functions touching buffer::raw internals into buffer.cc
Tommi Virtanen [Wed, 6 Apr 2011 20:50:46 +0000 (13:50 -0700)]
buffer: Move functions touching buffer::raw internals into buffer.cc

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agobuffer: Move functions touching buffer::raw internals into buffer.cc
Tommi Virtanen [Wed, 6 Apr 2011 20:48:59 +0000 (13:48 -0700)]
buffer: Move functions touching buffer::raw internals into buffer.cc

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agobuffer: Move functions touching buffer::raw internals into buffer.cc
Tommi Virtanen [Wed, 6 Apr 2011 20:48:02 +0000 (13:48 -0700)]
buffer: Move functions touching buffer::raw internals into buffer.cc

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agobuffer: Move buffer accounting into functions, don't expose atomic_t.
Tommi Virtanen [Wed, 6 Apr 2011 18:41:57 +0000 (11:41 -0700)]
buffer: Move buffer accounting into functions, don't expose atomic_t.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agopybind: Distribute the test script, too. Fixes "make distcheck".
Tommi Virtanen [Thu, 7 Apr 2011 17:26:13 +0000 (10:26 -0700)]
pybind: Distribute the test script, too. Fixes "make distcheck".

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoRevert "mds: rip out rename linkmerge support"
Sage Weil [Wed, 6 Apr 2011 23:34:36 +0000 (16:34 -0700)]
Revert "mds: rip out rename linkmerge support"

This reverts commit d467fbfd1714ef04faf41e604d6a78e33ef7fa10.

The linkmerge stuff _is_ needed for reintegrating multi-linked stray
inodes back into the hierarchy.  E.g.,

 touch a
 ln a b
 rm a

The MDS will want to renamed the stray inode to the b dentry.

Conflicts:

src/mds/Server.cc

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoconfig: complain if --name gives an invalid type
Colin Patrick McCabe [Wed, 6 Apr 2011 19:32:39 +0000 (12:32 -0700)]
config: complain if --name gives an invalid type

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoConfFile: add support for backslashes
Colin Patrick McCabe [Wed, 6 Apr 2011 18:51:07 +0000 (11:51 -0700)]
ConfFile: add support for backslashes

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agopybind: install ceph-pybind-test on debug builds
Colin Patrick McCabe [Wed, 6 Apr 2011 00:45:11 +0000 (17:45 -0700)]
pybind: install ceph-pybind-test on debug builds

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoconf: small code cleanups
Colin Patrick McCabe [Tue, 5 Apr 2011 21:36:24 +0000 (14:36 -0700)]
conf: small code cleanups

md_config_t: store a ConfFile by value rather than by pointer.

ConfFile::parse_file: negate error when returning errors.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoosd: fix signed/unsigned comp
Sage Weil [Tue, 5 Apr 2011 21:38:48 +0000 (14:38 -0700)]
osd: fix signed/unsigned comp

warning: osd/ReplicatedPG.cc:1208: comparison between signed and unsigned integer expressions

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoConfUtils: new parser
Colin Patrick McCabe [Mon, 4 Apr 2011 20:06:35 +0000 (13:06 -0700)]
ConfUtils: new parser

A new parser for ConfUtils that outputs a list of syntax errors when
files are wrong.

It also checks that configuration files are valid utf-8 and don't contain
embedded nulls.

Also added a few more unit tests.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoosd: simplify stat
Sage Weil [Tue, 5 Apr 2011 19:36:10 +0000 (12:36 -0700)]
osd: simplify stat

We don't actually need to stat the object (again) since we have the size
(and mtime) in the object_info_t.  Keep the existing stat in there, tho,
and assert the answer matches for the time being, since I saw behavior
that suggested they were out of sync.  See #933.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agolibrbd: remove unnecessary includes
Josh Durgin [Tue, 5 Apr 2011 04:10:09 +0000 (21:10 -0700)]
librbd: remove unnecessary includes

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agoconfig: expand metavariables when needed
Colin Patrick McCabe [Mon, 4 Apr 2011 20:35:11 +0000 (13:35 -0700)]
config: expand metavariables when needed

md_config_t::get_val_from_config_file now has an option that causes it
to expand metavariables. This is necessary because many callers want
metavariables to be expanded in the results they get back.

md_config_t::set_val should expand metavariables.

Remove some unecessary typecasts from
md_config_t::get_val_from_config_file()

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoconfig: add ability to complain about parse errs
Colin Patrick McCabe [Fri, 1 Apr 2011 23:52:02 +0000 (16:52 -0700)]
config: add ability to complain about parse errs

Change the ConfUtils interface so that we have a way to return
information about parse errors.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoconfutils: test unicode parsing
Colin Patrick McCabe [Fri, 1 Apr 2011 23:09:27 +0000 (16:09 -0700)]
confutils: test unicode parsing

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoconfig: fix metavariable substitution
Colin Patrick McCabe [Mon, 4 Apr 2011 18:12:07 +0000 (11:12 -0700)]
config: fix metavariable substitution

common_init: Do metavariable expansion as a separate step after the
configuration, argv, and env have been read. This ensures that we get
the correct values for the metavariables.

Change librados to follow suit.

config: Enforce the "no metavariables in default values" restriction.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoconfig: remove some unecessary g_conf references
Colin Patrick McCabe [Mon, 4 Apr 2011 16:25:37 +0000 (09:25 -0700)]
config: remove some unecessary g_conf references

Class methods of md_config_t should refer to the enclosing config.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agocclass: add bindir option
Josh Durgin [Fri, 1 Apr 2011 23:59:28 +0000 (16:59 -0700)]
cclass: add bindir option

Ceph binaries don't live in /usr/local on autotest machines.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agoclient: close snaprealm on last cap removal during reconnect
Sage Weil [Fri, 1 Apr 2011 23:21:27 +0000 (16:21 -0700)]
client: close snaprealm on last cap removal during reconnect

The invariant is is_any_caps() IFF in->snaprealm, where is_any_caps() is
!caps.empty || exporting_mds >= 0.  If we clear exporting_mds and caps can
be non-empty, we need to drop the snaprealm reference.

Fixes crash like

client/Client.cc: In function 'void Client::add_update_cap(Inode*, int, uint64_t, unsigned int, unsigned int, unsigned int, inodeno_t, int)', in thread '0x7f213df10700'
client/Client.cc: 2244: FAILED assert(in->snaprealm == 0)
client/Client.cc: In function 'void Client::add_update_cap(Inode*, int, uint64_t, unsigned int, unsigned int, unsigned int, inodeno_t, int)', in thread '0x7f213df10700'
client/Client.cc: 2244: FAILED assert(in->snaprealm == 0)
 ceph version 0.25-570-g8ea9380 (commit:8ea938000624b5d67237b52cceee83b04d310d3c)
 1: (ceph::__ceph_assert_fail(char const*, char const*, int, char const*)+0x53) [0x7bd566]
 2: (Client::add_update_cap(Inode*, int, unsigned long, unsigned int, unsigned int, unsigned int, inodeno_t, int)+0xe6) [0x64af82]
 3: (Client::add_update_inode(InodeStat*, utime_t, int)+0xca2) [0x63e1ec]
 4: (Client::insert_trace(MetaRequest*, utime_t, int)+0x5cf) [0x63f4cb]
 5: (Client::handle_client_reply(MClientReply*)+0x915) [0x6448c7]
 6: (Client::ms_dispatch(Message*)+0x167) [0x644d5b]
 7: (Messenger::ms_deliver_dispatch(Message*)+0x63) [0x62e911]
 8: (SimpleMessenger::dispatch_entry()+0x6fd) [0x61ace1]
 9: (SimpleMessenger::DispatchThread::entry()+0x2c) [0x610b90]
 10: (Thread::_entry_func(void*)+0x23) [0x62d7f3]
 11: (()+0x68ba) [0x7f21418e98ba]
 12: (clone()+0x6d) [0x7f21407e502d]
 ceph version 0.25-570-g8ea9380 (commit:8ea938000624b5d67237b52cceee83b04d310d3c)

triggered by an MDS reconnect on a 3-node cluster.  (Workload in this case
was just csyn --syn makedirs 7 7 7.)

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: fix trim_non_auth assert for base inodes
Sage Weil [Fri, 1 Apr 2011 22:51:41 +0000 (15:51 -0700)]
mds: fix trim_non_auth assert for base inodes

No parent dentry for base dirfrags (e.g., root).

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>