]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
14 years agoosd: instrument osdmap updates
Sage Weil [Thu, 23 Jun 2011 21:36:07 +0000 (14:36 -0700)]
osd: instrument osdmap updates

Messages, epochs, dup epochs.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: clean up numpg*, hb*
Sage Weil [Thu, 23 Jun 2011 21:32:52 +0000 (14:32 -0700)]
osd: clean up numpg*, hb*

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: instrument readable latency too
Sage Weil [Thu, 23 Jun 2011 21:26:34 +0000 (14:26 -0700)]
osd: instrument readable latency too

Time before a write is readable (not necessarily on disk).  Note that if we
get the commit first (e.g. writeahead journal) this value isn't calculated
or logged.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: remove lame rlsum/num
Sage Weil [Thu, 23 Jun 2011 20:45:02 +0000 (13:45 -0700)]
osd: remove lame rlsum/num

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: fix loadavg check
Sage Weil [Thu, 23 Jun 2011 20:44:10 +0000 (13:44 -0700)]
osd: fix loadavg check

Use the syscall, stupid.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: instrument pushes, pull requests
Sage Weil [Thu, 23 Jun 2011 20:39:11 +0000 (13:39 -0700)]
osd: instrument pushes, pull requests

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: add sub_op instrumentation
Sage Weil [Thu, 23 Jun 2011 20:34:53 +0000 (13:34 -0700)]
osd: add sub_op instrumentation

pull subop
push subop

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: fix up log_op_stats to actually work
Sage Weil [Thu, 23 Jun 2011 20:32:59 +0000 (13:32 -0700)]
osd: fix up log_op_stats to actually work

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: rename push applied, committed completions
Sage Weil [Thu, 23 Jun 2011 19:53:49 +0000 (12:53 -0700)]
osd: rename push applied, committed completions

Be consistent.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: clean up client op stats
Sage Weil [Thu, 23 Jun 2011 18:12:43 +0000 (11:12 -0700)]
osd: clean up client op stats

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: fix compilation
Yehuda Sadeh [Thu, 23 Jun 2011 20:32:22 +0000 (13:32 -0700)]
osd: fix compilation

14 years agoRevert "osd: make it compile on older boost libraries"
Yehuda Sadeh [Thu, 23 Jun 2011 21:25:02 +0000 (14:25 -0700)]
Revert "osd: make it compile on older boost libraries"

This reverts commit 116241ef106e6a88a84482f7f0f21219a6d29e33.

14 years agotest_ceph_argparse: fix build
Colin Patrick McCabe [Thu, 23 Jun 2011 20:45:13 +0000 (13:45 -0700)]
test_ceph_argparse: fix build

When this was merged, libcommon.a was not changed to libcommon.la

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agopush global_init_set_globals into preinit callers
Colin Patrick McCabe [Thu, 23 Jun 2011 20:31:50 +0000 (13:31 -0700)]
push global_init_set_globals into preinit callers

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoosd: make it compile on older boost libraries
Yehuda Sadeh [Thu, 23 Jun 2011 20:32:22 +0000 (13:32 -0700)]
osd: make it compile on older boost libraries

14 years agoMerge branch 'next'
Sage Weil [Thu, 23 Jun 2011 20:24:35 +0000 (13:24 -0700)]
Merge branch 'next'

Conflicts:
src/librbd.cc

14 years agoMerge remote branch 'origin/stable' into next
Sage Weil [Thu, 23 Jun 2011 20:16:29 +0000 (13:16 -0700)]
Merge remote branch 'origin/stable' into next

Conflicts:
src/librbd.cc

14 years agocreate test_librados_build
Colin Patrick McCabe [Thu, 23 Jun 2011 17:38:06 +0000 (10:38 -0700)]
create test_librados_build

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agolibrados: fix end_block calculation for aio_read
Yehuda Sadeh [Thu, 23 Jun 2011 00:13:22 +0000 (17:13 -0700)]
librados: fix end_block calculation for aio_read

Conflicts:

src/librbd.cc

14 years agolibrados: fix end_block calculation for aio_read
Yehuda Sadeh [Thu, 23 Jun 2011 00:13:22 +0000 (17:13 -0700)]
librados: fix end_block calculation for aio_read

Conflicts:

src/librbd.cc

14 years agolibrbd: track block_ofs instead of ofs in aio_sparse_read callback
Yehuda Sadeh [Wed, 22 Jun 2011 19:37:24 +0000 (12:37 -0700)]
librbd: track block_ofs instead of ofs in aio_sparse_read callback

14 years agoAdd ceph_argparse unit test
Colin Patrick McCabe [Thu, 23 Jun 2011 18:13:49 +0000 (11:13 -0700)]
Add ceph_argparse unit test

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoceph_argparse_witharg: fix dashes in args
Colin Patrick McCabe [Thu, 23 Jun 2011 17:45:54 +0000 (10:45 -0700)]
ceph_argparse_witharg: fix dashes in args

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agocommon/Throttle: Remove unused return type on Throttle::get()
Jim Schutt [Wed, 22 Jun 2011 18:26:25 +0000 (12:26 -0600)]
common/Throttle: Remove unused return type on Throttle::get()

Signed-off-by: Jim Schutt <jaschut@sandia.gov>
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agolibceph: delogbalize, again
Colin Patrick McCabe [Thu, 23 Jun 2011 17:11:07 +0000 (10:11 -0700)]
libceph: delogbalize, again

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoMakefile: add missing common/dout.h header to dist tarball
Sage Weil [Thu, 23 Jun 2011 16:54:37 +0000 (09:54 -0700)]
Makefile: add missing common/dout.h header to dist tarball

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agolibrados: fix end_block calculation for aio_read
Yehuda Sadeh [Thu, 23 Jun 2011 00:13:22 +0000 (17:13 -0700)]
librados: fix end_block calculation for aio_read

14 years agoproflogger: only register one event for all loggers
Sage Weil [Wed, 22 Jun 2011 23:39:45 +0000 (16:39 -0700)]
proflogger: only register one event for all loggers

If we already did logger_start(), don't schedule a new event.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agolibrados: deglobalize, again
Colin Patrick McCabe [Wed, 22 Jun 2011 23:03:57 +0000 (16:03 -0700)]
librados: deglobalize, again

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoOSDMap: kill some deadcode, deglobalize
Colin Patrick McCabe [Wed, 22 Jun 2011 23:03:19 +0000 (16:03 -0700)]
OSDMap: kill some deadcode, deglobalize

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agolibrados: deglobalize
Colin Patrick McCabe [Wed, 22 Jun 2011 22:19:37 +0000 (15:19 -0700)]
librados: deglobalize

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoAnchorServer: fix return values in add().
Greg Farnum [Wed, 22 Jun 2011 23:41:09 +0000 (16:41 -0700)]
AnchorServer: fix return values in add().

I accidentally didn't set the return value in my new branch. (Not
that they're read anywhere.) While I'm at it, document what they mean.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agouclient: change snaprealm refcounting to erase at 0 refs.
Greg Farnum [Wed, 22 Jun 2011 22:06:57 +0000 (15:06 -0700)]
uclient: change snaprealm refcounting to erase at 0 refs.

This is more idiomatic and less confusing than having 0 refs be
still alive, and -1 be the point of destruction.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomount.ceph, rbd: Output errors to stderr, not stdout.
Tommi Virtanen [Wed, 22 Jun 2011 19:52:44 +0000 (12:52 -0700)]
mount.ceph, rbd: Output errors to stderr, not stdout.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agomount.ceph, errno: Avoid printing binary, clarify message.
Tommi Virtanen [Wed, 22 Jun 2011 19:48:51 +0000 (12:48 -0700)]
mount.ceph, errno: Avoid printing binary, clarify message.

Payload is a binary key, printing it to stdout is not helpful.

Key name is often "client", make the message easier to understand.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agomount.ceph, rbd: Avoid clobbering errno with printf and strerror calls.
Tommi Virtanen [Wed, 22 Jun 2011 19:47:34 +0000 (12:47 -0700)]
mount.ceph, rbd: Avoid clobbering errno with printf and strerror calls.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agorun-cli-tests: Pass through CCACHE_DIR and such env vars.
Tommi Virtanen [Wed, 22 Jun 2011 22:23:14 +0000 (15:23 -0700)]
run-cli-tests: Pass through CCACHE_DIR and such env vars.

Commit 7cd50f29d5cbf8deb64d00318b39c281119c0e03 makes the binaries
use libtool's "executable wrappers", which will transparently relink
the executables if they think that's needed. The test for that is
somewhat flawed: if the mtimes match, the binary might or might not
get relinked. In practise, this causes relinks on gitbuilder all the
time.

As of earlier commit 5a0bc6b78f2e40ec9255a1ea49f77ef9ea4690a6, we
started sanitizing the environment passed to the clitests. This meant
we also stripped away CCACHE_DIR and other settings, needed to
properly relink the binaries. Re-add CCACHE_DIR, CC, CXX to clitests
environment.

To handle the case where CCACHE_DIR etc are not set in the first
place, we need an extra wrapper script. Otherwise, ccache might see an
empty string as the env value, and naturally couldn't access a
directory by that name.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoRemove "#include debug.h" from config.h
Colin Patrick McCabe [Wed, 22 Jun 2011 20:42:28 +0000 (13:42 -0700)]
Remove "#include debug.h" from config.h

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agolibrbd: Remove derr uses
Colin Patrick McCabe [Wed, 22 Jun 2011 21:41:00 +0000 (14:41 -0700)]
librbd: Remove derr uses

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoMerge branch 'next'
Sage Weil [Wed, 22 Jun 2011 20:58:38 +0000 (13:58 -0700)]
Merge branch 'next'

Conflicts:
src/librbd.cc

14 years agoclient: always use get_snap_context() accessor
Sage Weil [Wed, 22 Jun 2011 19:45:35 +0000 (12:45 -0700)]
client: always use get_snap_context() accessor

There were a few places where we were using the member directly and not the
accessor, which rebuilds the internal value when needed.  This caused
inconsistent behavior based on whether debugging was enabled or not, since
we used the accessor to print the regenerated value.

Passes all snaps workunits with debugging off.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agolibrbd.cc: de-globalize
Colin Patrick McCabe [Wed, 22 Jun 2011 20:38:06 +0000 (13:38 -0700)]
librbd.cc: de-globalize

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoAnchorServer: overwrite old Anchor backpointers when proper.
Greg Farnum [Tue, 21 Jun 2011 00:55:54 +0000 (17:55 -0700)]
AnchorServer: overwrite old Anchor backpointers when proper.

Sometimes when we do an AnchorTable update, it's because the inode
in question got moved. However, if the inode had multiple references,
its Anchor wasn't removed by decrementing its count, and so the add
function simply noted that it already had the Anchor and returned.

This obviously wasn't the proper behavior in cases where the inode
was getting moved -- we want to update its back pointer! So do so.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agouclient: Update statfs to match the kernel client and its block sizing.
Greg Farnum [Mon, 20 Jun 2011 19:17:24 +0000 (12:17 -0700)]
uclient: Update statfs to match the kernel client and its block sizing.

Make it better match the kernel client, and its scheme to use a large
block size so we don't overflow 32-bit systems. This isn't presently
a serious concern since FUSE doesn't work on 32-bit systems anyway,
but the output of df should match even so.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agouclient: fix flush_caps(Inode*,int)
Greg Farnum [Fri, 17 Jun 2011 18:52:13 +0000 (11:52 -0700)]
uclient: fix flush_caps(Inode*,int)

This function was just broken before. You need to be setting
flushing_cap_tids for the caps you're actually flushing, which
in this case is in->dirty_caps, not the horribly-named "flush"
variable.
Also, rename "flush" to "retain" since that's what it actually is!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agouclient: only change the auth_cap if the mseq is newer
Greg Farnum [Fri, 17 Jun 2011 18:08:26 +0000 (11:08 -0700)]
uclient: only change the auth_cap if the mseq is newer

Previously we just trusted the MDS' reported auth status, which meant
that even if the MDS was always right it could encode the stat while
auth, then export, and then have us decode the stat after getting
an IMPORT and set the auth cap right back!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomds: Include the pinner in nested auth pin debugging output.
Greg Farnum [Thu, 16 Jun 2011 21:33:15 +0000 (14:33 -0700)]
mds: Include the pinner in nested auth pin debugging output.

This will make identifying stuck pins a lot easier.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agolibrbd: track block_ofs instead of ofs in aio_sparse_read callback
Yehuda Sadeh [Wed, 22 Jun 2011 19:37:24 +0000 (12:37 -0700)]
librbd: track block_ofs instead of ofs in aio_sparse_read callback

14 years agoRevert "debian: ceph-client-tools depends on librados2, librbd"
Sage Weil [Wed, 22 Jun 2011 18:04:22 +0000 (11:04 -0700)]
Revert "debian: ceph-client-tools depends on librados2, librbd"

This reverts commit 96ef8a67bcf4a4a43f0a5c38224314abdd88a12c.

14 years agolibrbd: fix read_iterate for the case where block ofs is not 0
Yehuda Sadeh [Wed, 22 Jun 2011 17:51:18 +0000 (10:51 -0700)]
librbd: fix read_iterate for the case where block ofs is not 0

Conflicts:

src/librbd.cc

14 years agolibrbd: fix read_iterate for the case where block ofs is not 0
Yehuda Sadeh [Wed, 22 Jun 2011 17:51:18 +0000 (10:51 -0700)]
librbd: fix read_iterate for the case where block ofs is not 0

14 years agoMerge remote branch 'origin/stable' into next
Sage Weil [Wed, 22 Jun 2011 17:09:48 +0000 (10:09 -0700)]
Merge remote branch 'origin/stable' into next

Conflicts:
src/librbd.cc

14 years agoosd: fix merge
Sage Weil [Wed, 22 Jun 2011 15:56:47 +0000 (08:56 -0700)]
osd: fix merge

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agosignals unit test: fix
Colin Patrick McCabe [Wed, 22 Jun 2011 11:17:49 +0000 (04:17 -0700)]
signals unit test: fix

Ensure that the signal waits for us to call sigsuspend, rather than
getting delievered to another thread. We do this by using SIGPIPE as our
signal of choice. SIGPIPE is blocked in all Ceph threads by default.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoMerge branch 'wip_snap_trimmer'
Samuel Just [Wed, 22 Jun 2011 18:42:14 +0000 (11:42 -0700)]
Merge branch 'wip_snap_trimmer'

14 years agoReplicatedPG: clean up OpContext use in do_op
Samuel Just [Wed, 15 Jun 2011 23:57:02 +0000 (16:57 -0700)]
ReplicatedPG: clean up OpContext use in do_op

do_op, make_writeable, and friends now update new_obs, new_snapset, and
new_stats rather than updating those structures directly in case the
transaction fails to apply.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoReplicatedPG: Replica collection removal
Samuel Just [Tue, 14 Jun 2011 22:29:44 +0000 (15:29 -0700)]
ReplicatedPG: Replica collection removal

Previously, snap collections and their contents on the replica would be
removed by the primary via a shipped transaction.  However, these
operations are not represented in the log and are therefore not
reconstructed during recovery.  Now, the replica, once recovery has
advanced adequately (last_complete_ondisk.epoch >=
info.history.last_epoch_started), replica will take each collection
from purged snaps, remove the objects, and then remove the collection.
Once the snap has made it into purged_snaps, it is guarranteed that no
further operations will require that snap collection, so this is safe.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoReplicatedPG, PG: fill out state machine
Samuel Just [Tue, 7 Jun 2011 16:11:58 +0000 (09:11 -0700)]
ReplicatedPG, PG: fill out state machine

Move snap_trimmer functionality into snap_trimmer_machine.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoReplicatePG,PG: SnapTrimmer state machine skeleton
Samuel Just [Fri, 20 May 2011 21:56:51 +0000 (14:56 -0700)]
ReplicatePG,PG: SnapTrimmer state machine skeleton

Currently, snap_trimmer does not wait for replicas to apply the object
removal repops before updating the info with the removed snapshot and
sending out infos.  Thus, there is a race between the replica applying
the object removal transactions and recieving the info prompting it to
remove its local snap collection.  In the cases where the info beats the
transaction to the file system, we get the infamous -39 ENOTEMPTY error
crashing the OSD.

One solution would be to block in snap_trimmer until we get the
responses.  This would, unfortunately, tie up a disk_tp thread.  Moving
to a state machine would:
a) guarrantee that the snap_trimmer state is cleaned up when the pg
resets (using on_change())
b) remove the necessity of blocking in a disk_tp thread (we currently
unlock and relock the pg lock between operations causing us to block on
another thread using the pg).  Rather than unlocking and relocking, we
would instead unlock and requeue ourselves in the snap_trim_wq while we
wait allowing the thread to do something else.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoReplicatedPG: factor object trimming out of snap_trimmer
Samuel Just [Mon, 6 Jun 2011 19:05:15 +0000 (12:05 -0700)]
ReplicatedPG: factor object trimming out of snap_trimmer

object trimming has been moved to trim_object which is called from
snap_trimmer.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoReplicatedPG: split get_obs_to_trim from snap_trimmer
Samuel Just [Mon, 6 Jun 2011 16:29:47 +0000 (09:29 -0700)]
ReplicatedPG: split get_obs_to_trim from snap_trimmer

Factor code for getting next collection/objects to trim into
get_obs_to_trim.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoReplicatedPG,PG: update snap_collections on replica
Samuel Just [Wed, 8 Jun 2011 18:23:56 +0000 (11:23 -0700)]
ReplicatedPG,PG: update snap_collections on replica

Previously, snap_collections did not get updated on the replica.  As a
result, snap collections would not necessarily get trimmed when the
replica recieved and updated purged_snaps via a pg info from the
primary.  Now, the log entries in sub_op_modified are scanned to check
for any new snap collections.  The first and last snaps on a clone entry
are possibly new snap collections.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoReplicatedPG: update pull_info and data_subset in sub_op_push
Samuel Just [Fri, 17 Jun 2011 23:23:58 +0000 (16:23 -0700)]
ReplicatedPG: update pull_info and data_subset in sub_op_push

data_subset and data_needed in pull_info need to be updated with the
results of running calc_clone_subsets in sub_op_push

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoFileStore: die if we get an ENOENT on a clone
Samuel Just [Mon, 20 Jun 2011 16:28:32 +0000 (09:28 -0700)]
FileStore: die if we get an ENOENT on a clone

During recovery, ignoring this would allow a bug in the osd to
erroneously mark the pg clean with incorrectly recovered objects.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agolibrbd: fix read_iterate for the case where block ofs is not 0
Yehuda Sadeh [Wed, 22 Jun 2011 17:51:18 +0000 (10:51 -0700)]
librbd: fix read_iterate for the case where block ofs is not 0

Conflicts:

src/librbd.cc

14 years agoMakefile.am: use libtool convenience libraries
Colin Patrick McCabe [Wed, 22 Jun 2011 17:33:52 +0000 (10:33 -0700)]
Makefile.am: use libtool convenience libraries

Use libtool convenience libraries rather than explicitly forcing .a
files (static code archives) to be generated or including library .c
files directly into applications.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoMerge branch 'next'
Sage Weil [Wed, 22 Jun 2011 17:10:14 +0000 (10:10 -0700)]
Merge branch 'next'

14 years agorbd: --help/-h
Sage Weil [Wed, 22 Jun 2011 03:34:42 +0000 (20:34 -0700)]
rbd: --help/-h

14 years agolibrbd: sparse read cleanup, fixes
Yehuda Sadeh [Wed, 22 Jun 2011 05:40:28 +0000 (22:40 -0700)]
librbd: sparse read cleanup, fixes

Conflicts:

src/librbd.cc

14 years agolibrbd: fix and cleanup a bit read_iterate
Yehuda Sadeh [Tue, 21 Jun 2011 23:31:44 +0000 (16:31 -0700)]
librbd: fix and cleanup a bit read_iterate

14 years agolibrbd: sparse read cleanup, fixes
Yehuda Sadeh [Wed, 22 Jun 2011 05:40:28 +0000 (22:40 -0700)]
librbd: sparse read cleanup, fixes

14 years agolibrbd: fix and cleanup a bit read_iterate
Yehuda Sadeh [Tue, 21 Jun 2011 23:31:44 +0000 (16:31 -0700)]
librbd: fix and cleanup a bit read_iterate

14 years agorgw: some cleanups
Yehuda Sadeh [Tue, 21 Jun 2011 18:37:43 +0000 (11:37 -0700)]
rgw: some cleanups

14 years agoqa: simple rbd import/export test
Sage Weil [Wed, 22 Jun 2011 03:31:00 +0000 (20:31 -0700)]
qa: simple rbd import/export test

Fixes: #1211
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoObjecter.cc: de-globalize
Colin Patrick McCabe [Tue, 21 Jun 2011 23:59:37 +0000 (16:59 -0700)]
Objecter.cc: de-globalize

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoinitialize g_ceph_context in common_preinit
Colin Patrick McCabe [Tue, 21 Jun 2011 20:00:04 +0000 (13:00 -0700)]
initialize g_ceph_context in common_preinit

Initialize g_ceph_context in common_preinit rather than in a global
constructor.

Add comments to all of the major initialization functions.

We still set globals in common_preinit, for the time being.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoCephContext: not copyable
Colin Patrick McCabe [Tue, 21 Jun 2011 23:16:09 +0000 (16:16 -0700)]
CephContext: not copyable

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomake misc items as not copyable
Sage Weil [Tue, 21 Jun 2011 22:58:59 +0000 (15:58 -0700)]
make misc items as not copyable

These structures are all not copyable.  Make sure we get a link error if
we try.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years ago[dex]list: not copyable
Sage Weil [Tue, 21 Jun 2011 16:05:15 +0000 (09:05 -0700)]
[dex]list: not copyable

The list items are embedded in other structures; copying the list will lead
to duplicated references and other badness.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomsgr: avoid copying Pipe* xlist
Sage Weil [Tue, 21 Jun 2011 22:57:46 +0000 (15:57 -0700)]
msgr: avoid copying Pipe* xlist

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoMerge branch 'stable' into next
Sage Weil [Tue, 21 Jun 2011 22:54:54 +0000 (15:54 -0700)]
Merge branch 'stable' into next

Conflicts:
src/osd/OSD.cc

14 years agomds: make avoid copying sessionmap by_state xlist
Sage Weil [Tue, 21 Jun 2011 22:54:34 +0000 (15:54 -0700)]
mds: make avoid copying sessionmap by_state xlist

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: do misdirected request checks before pg active test
Sage Weil [Tue, 21 Jun 2011 22:54:13 +0000 (15:54 -0700)]
osd: do misdirected request checks before pg active test

We can process+discard a misdirected or invalid request without the pg
being active.  Reorder a few other checks too.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: avoid copying snap client_caps xlist
Sage Weil [Tue, 21 Jun 2011 16:07:03 +0000 (09:07 -0700)]
mds: avoid copying snap client_caps xlist

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomon: do not copy subscription xlist
Sage Weil [Mon, 20 Jun 2011 22:39:16 +0000 (15:39 -0700)]
mon: do not copy subscription xlist

xlist is not copyable.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoqa: clean up after snaptest-multiple-capsnaps.sh
Sage Weil [Tue, 21 Jun 2011 22:52:46 +0000 (15:52 -0700)]
qa: clean up after snaptest-multiple-capsnaps.sh

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoDispatcher: prevent copying
Colin Patrick McCabe [Tue, 21 Jun 2011 22:46:42 +0000 (15:46 -0700)]
Dispatcher: prevent copying

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomsgr: only SO_REUSEADDR when specific port is specified
Sage Weil [Tue, 21 Jun 2011 19:47:32 +0000 (12:47 -0700)]
msgr: only SO_REUSEADDR when specific port is specified

In general SO_REUSEADDR is slightly dangerous, but avoids waiting for the
timeout when restarting servers.  This is important when binding to a
specific port.

When binding to a random port, it doesn't matter.  Also, it appears that
two processes can bind() to the same port with that flag set, and then one
will fail with EADDRINUSE on listen().  That's racy when starting up
daemons that should be binding to unique/random ports.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomon: fix log state trimming
Sage Weil [Tue, 21 Jun 2011 19:13:04 +0000 (12:13 -0700)]
mon: fix log state trimming

We need to stash last_consumed in order for trimming to work.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoMerge branch 'wip-globalfoo'
Colin Patrick McCabe [Tue, 21 Jun 2011 19:28:44 +0000 (12:28 -0700)]
Merge branch 'wip-globalfoo'

14 years agomon: add 'log ....' command
Sage Weil [Tue, 21 Jun 2011 19:13:38 +0000 (12:13 -0700)]
mon: add 'log ....' command

Just sticks something in the central log.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoConvert g_ceph_context to a pointer.
Colin Patrick McCabe [Tue, 21 Jun 2011 19:28:16 +0000 (12:28 -0700)]
Convert g_ceph_context to a pointer.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agogitignore: add test_libcommon_build
Colin Patrick McCabe [Tue, 21 Jun 2011 19:07:12 +0000 (12:07 -0700)]
gitignore: add test_libcommon_build

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoinode_load_vec_t: de-globalize
Colin Patrick McCabe [Tue, 21 Jun 2011 18:31:50 +0000 (11:31 -0700)]
inode_load_vec_t: de-globalize

Don't call ceph_clock_now from the constructor of inode_load_vec_t.
Update the classes that contain inode_load_vec_t to reflect this.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoCreate test_libcommon_build
Colin Patrick McCabe [Fri, 17 Jun 2011 19:19:11 +0000 (12:19 -0700)]
Create test_libcommon_build

Create test_libcommon_build to test for references to g_ceph_context and
other libglobal symbols from within libcommon.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoDecayCounter: take a utime_t in ::decode
Colin Patrick McCabe [Tue, 21 Jun 2011 17:49:49 +0000 (10:49 -0700)]
DecayCounter: take a utime_t in ::decode

We need to initialize the last_decay time of the DecayCounter when
decoding it. This is not found in the encoded information, but instead
is set to the current time. We need to pass this in explicitly now
because of deglobalization.

This also reduces the number of calls to gettimeofday, which is good in
general.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoThread.cc: deglobalize
Colin Patrick McCabe [Tue, 21 Jun 2011 00:12:01 +0000 (17:12 -0700)]
Thread.cc: deglobalize

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agocommon_init: de-globalize
Colin Patrick McCabe [Tue, 21 Jun 2011 00:01:54 +0000 (17:01 -0700)]
common_init: de-globalize

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agofilestore: fix fiemap
Yehuda Sadeh [Mon, 20 Jun 2011 18:00:51 +0000 (11:00 -0700)]
filestore: fix fiemap

14 years agorbd: fix read_iterate for sparse read
Yehuda Sadeh [Mon, 20 Jun 2011 17:58:26 +0000 (10:58 -0700)]
rbd: fix read_iterate for sparse read