]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
12 years agoMerge branch 'next'
Samuel Just [Fri, 15 Mar 2013 18:21:35 +0000 (11:21 -0700)]
Merge branch 'next'

12 years agoFileJournal: queue_pos \in [get_top(), header.max_size)
Samuel Just [Wed, 13 Mar 2013 23:04:23 +0000 (16:04 -0700)]
FileJournal: queue_pos \in [get_top(), header.max_size)

If queue_pos == header.max_size when we create the entry
header magic, the entry will be rejected at get_top() on
replay.

Fixes: #4436
Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoOSD: expand_pg_num after pg removes
Samuel Just [Fri, 15 Mar 2013 01:52:02 +0000 (18:52 -0700)]
OSD: expand_pg_num after pg removes

Otherwise:
1) expand_pg_num removes a splitting pg entry
2) peering thread grabs pg lock and starts split
3) OSD::consume_map grabs pg lock and starts removal

At step 2), we run afoul of the assert(is_splitting)
check in split_pgs.  This way, the would be splitting
pg is marked as removed prior to the splitting state
being updated.

Backport: bobtail
Fixes: #4449
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoPG: ignore non MISSING pg query in ReplicaActive
Samuel Just [Fri, 15 Mar 2013 02:59:36 +0000 (19:59 -0700)]
PG: ignore non MISSING pg query in ReplicaActive

1) Replica sends notify
2) Prior to processing notify, primary queues query to replica
3) Primary processes notify and activates sending MOSDPGLog
to replica.
4) Primary does do_notifies at end of process_peering_events
and sends to Query.
5) Replica sees MOSDPGLog and activates
6) Replica sees Query and asserts.

In the above case, the Replica should simply ignore the old
Query.

Fixes: #4050
Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'next'
Sage Weil [Fri, 15 Mar 2013 04:11:35 +0000 (21:11 -0700)]
Merge branch 'next'

Conflicts:
src/mon/AuthMonitor.cc

12 years agomon: only try to bump max if leader
Sage Weil [Fri, 15 Mar 2013 04:10:09 +0000 (21:10 -0700)]
mon: only try to bump max if leader

I broke this in 4637752db6f8520abba160b4817323379c4a7fe0 when I
restructured this function.  Only try to increase the max if we are
the leader.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoceph-disk-activate: identify cluster .conf by fsid
Sage Weil [Fri, 15 Mar 2013 04:05:07 +0000 (21:05 -0700)]
ceph-disk-activate: identify cluster .conf by fsid

Determine what cluster the disk belongs to by checking the fsid defined
in /etc/ceph/*.conf.  Previously we hard-coded 'ceph'.

Note that this has the nice side-effect that if we have a disk with a
bad/different fsid, we now fail to activate it.  Previously, we would
mount and start ceph-osd, but the daemon would fail to authenticate
because it was part of the wrong cluster.

Fixes: #3253
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodebian/control: Fix for moved file
Gary Lowell [Tue, 12 Mar 2013 23:59:42 +0000 (16:59 -0700)]
debian/control:  Fix for moved file

The ceph-mds.conf file moced from the ceph package to the
ceph-mds package.  Add replaces/breaks statements to the
control file to handle this on upgrade.

Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
12 years agoceph-disk-activate: abort if target position is already mounted
Sage Weil [Thu, 14 Mar 2013 23:18:26 +0000 (16:18 -0700)]
ceph-disk-activate: abort if target position is already mounted

If the target position is already a mount point, fail to move our mount
over to it.  This usually indicates that a different osd.N from a
different cluster instances is in that position.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agorados/test.sh fails in the nightly run
David Zafman [Thu, 14 Mar 2013 20:40:54 +0000 (13:40 -0700)]
rados/test.sh fails in the nightly run

Make test more robust by using my_snaps vector for snap IDs

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agoMerge remote-tracking branch 'origin/wip-osd-addr-api'
Noah Watkins [Thu, 14 Mar 2013 20:27:27 +0000 (13:27 -0700)]
Merge remote-tracking branch 'origin/wip-osd-addr-api'

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agodebian: add start ceph-mds-all on ceph-mds install
Sage Weil [Thu, 14 Mar 2013 19:33:08 +0000 (12:33 -0700)]
debian: add start ceph-mds-all on ceph-mds install

This ensures that when we then start individual mds instances, we can
stop ceph-mds-all and they will get stopped.  We do the same already for
ceph-all.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 41897fcba168b409fd370d0b26016fe4d30c5a59)

12 years agodebian: add start ceph-mds-all on ceph-mds install
Sage Weil [Thu, 14 Mar 2013 19:33:08 +0000 (12:33 -0700)]
debian: add start ceph-mds-all on ceph-mds install

This ensures that when we then start individual mds instances, we can
stop ceph-mds-all and they will get stopped.  We do the same already for
ceph-all.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibcephfs: add ceph_get_osd_addr interface
Noah Watkins [Thu, 14 Mar 2013 19:15:41 +0000 (12:15 -0700)]
libcephfs: add ceph_get_osd_addr interface

Return the network address for an OSD by ID.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agoRevert "ceph-disk-activate: rely on default/configured keyring path"
Sage Weil [Thu, 14 Mar 2013 19:05:52 +0000 (12:05 -0700)]
Revert "ceph-disk-activate: rely on default/configured keyring path"

This reverts commit 936b8f20af1d390976097c427b6e92da4b39b218.

This is necessary because we mount the osd in a temporary location.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoRevert "ceph-disk-activate: don't override default or configured osd journal path"
Sage Weil [Thu, 14 Mar 2013 19:04:44 +0000 (12:04 -0700)]
Revert "ceph-disk-activate: don't override default or configured osd journal path"

This reverts commit 813e9fe2b4291a1c1922ef78f031daa9b78fe53b.

We run --mkfs with the osd disk mounted in a temporary location, so it is
necessary to explicitly pass in these paths.

If we want to support journals in a different location, we need to make
ceph-disk-prepare update the journal symlink accordingly.. not control it via
the config option.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge pull request #109 from dalgaaf/wip-da-performance-1-v2
Sage Weil [Thu, 14 Mar 2013 18:41:04 +0000 (11:41 -0700)]
Merge pull request #109 from dalgaaf/wip-da-performance-1-v2

prefer prefix ++/--operator for e.g. iterators for performance reasons

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge pull request #108 from ceph/wip-refuse-last-mon-remove
Sage Weil [Thu, 14 Mar 2013 18:38:21 +0000 (11:38 -0700)]
Merge pull request #108 from ceph/wip-refuse-last-mon-remove

mon: refuse "mon remove" if only one mon left

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomonmaptool.cc: prefer prefix ++operator for iterators 109/head
Danny Al-Gaaf [Thu, 14 Mar 2013 17:13:55 +0000 (18:13 +0100)]
monmaptool.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomon/PGMonitor.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 17:13:31 +0000 (18:13 +0100)]
mon/PGMonitor.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomon/MonmapMonitor.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 17:13:00 +0000 (18:13 +0100)]
mon/MonmapMonitor.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomon/Monitor.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 17:12:36 +0000 (18:12 +0100)]
mon/Monitor.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomon/MonMap.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 17:12:16 +0000 (18:12 +0100)]
mon/MonMap.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomon/MDSMonitor.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 17:11:53 +0000 (18:11 +0100)]
mon/MDSMonitor.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomon/LogMonitor.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 17:11:02 +0000 (18:11 +0100)]
mon/LogMonitor.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomon/AuthMonitor.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 17:10:08 +0000 (18:10 +0100)]
mon/AuthMonitor.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomds/mdstypes.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 17:09:48 +0000 (18:09 +0100)]
mds/mdstypes.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomds/SnapServer.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 17:09:22 +0000 (18:09 +0100)]
mds/SnapServer.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomds/SnapServer.h: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 16:45:09 +0000 (17:45 +0100)]
mds/SnapServer.h: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomds/SnapServer.h: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 16:44:41 +0000 (17:44 +0100)]
mds/SnapServer.h: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomds/Mutation.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 16:44:20 +0000 (17:44 +0100)]
mds/Mutation.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomds/MDSTableServer.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 16:43:58 +0000 (17:43 +0100)]
mds/MDSTableServer.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomds/MDSTableClient.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 16:43:36 +0000 (17:43 +0100)]
mds/MDSTableClient.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomds/MDSMap.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 16:43:12 +0000 (17:43 +0100)]
mds/MDSMap.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomds/MDS.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 16:42:53 +0000 (17:42 +0100)]
mds/MDS.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomds/MDLog.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 16:42:32 +0000 (17:42 +0100)]
mds/MDLog.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomds/MDCache.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 16:41:08 +0000 (17:41 +0100)]
mds/MDCache.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomds/MDBalancer.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 16:40:14 +0000 (17:40 +0100)]
mds/MDBalancer.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomds/Locker.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 14:19:35 +0000 (15:19 +0100)]
mds/Locker.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomds/MDCache.h: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 14:08:03 +0000 (15:08 +0100)]
mds/MDCache.h: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomds/CInode.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 14:07:39 +0000 (15:07 +0100)]
mds/CInode.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomds/CDir.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 18:21:45 +0000 (19:21 +0100)]
mds/CDir.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomds/AnchorServer.h: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 14:02:20 +0000 (15:02 +0100)]
mds/AnchorServer.h: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomds/AnchorServer.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 14:01:03 +0000 (15:01 +0100)]
mds/AnchorServer.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomds/AnchorClient.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 13:59:44 +0000 (14:59 +0100)]
mds/AnchorClient.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agolibrbd/internal.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 13:31:04 +0000 (14:31 +0100)]
librbd/internal.cc: prefer prefix ++operator for iterators

Prefer prefix ++operator for iterators, move iterator declaration into
the related for loop.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agolibrbd/ImageCtx.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 13:26:41 +0000 (14:26 +0100)]
librbd/ImageCtx.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agolibrados/RadosClient.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 13:24:49 +0000 (14:24 +0100)]
librados/RadosClient.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agolibrados/IoCtxImpl.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 13:23:37 +0000 (14:23 +0100)]
librados/IoCtxImpl.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agolibcephfs.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 13:21:35 +0000 (14:21 +0100)]
libcephfs.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agokv_flat_btree_async.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 13:20:04 +0000 (14:20 +0100)]
kv_flat_btree_async.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agokey_value_store/cls_kvs.cc: prefer prefix --operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 13:12:36 +0000 (14:12 +0100)]
key_value_store/cls_kvs.cc: prefer prefix --operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agocrush/CrushWrapper.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 13:08:22 +0000 (14:08 +0100)]
crush/CrushWrapper.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agocrush/CrushCompiler.cc: prefer prefix --operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 13:04:46 +0000 (14:04 +0100)]
crush/CrushCompiler.cc: prefer prefix --operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agocommon/lockdep.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 13:02:56 +0000 (14:02 +0100)]
common/lockdep.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoclient/SyntheticClient.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Thu, 14 Mar 2013 12:57:00 +0000 (13:57 +0100)]
client/SyntheticClient.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomon: refuse "mon remove" if only one mon left 108/head
Dan Mick [Thu, 14 Mar 2013 18:02:12 +0000 (11:02 -0700)]
mon: refuse "mon remove" if only one mon left

Fixes: #4439
Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoosd: data loss: low space handling
David Zafman [Wed, 13 Mar 2013 03:49:25 +0000 (20:49 -0700)]
osd: data loss: low space handling

Add check whether to allow writing ops based on failsafe full percentage
Check for failsafe nearfull warning or full error message every heartbeat
Use clock to limit messages to every 30 secs (osd_op_complaint_time)

Feature: #4197

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agoceph_common.sh: Fix sed regex in get_local_daemon_list
Gary Lowell [Thu, 14 Mar 2013 06:39:34 +0000 (23:39 -0700)]
ceph_common.sh:  Fix sed regex in get_local_daemon_list

In get_local_daemon_list() the sed expression trimming the cluster
name from the host name was trimming too much if the host name
contained hyphens.

Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
12 years agoSimplify may_write()
David Zafman [Tue, 12 Mar 2013 23:47:36 +0000 (16:47 -0700)]
Simplify may_write()

CEPH_MDS_OP_CREATE has CEPH_MDS_OP_WRITE bit set so already checked

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agoMerge branch 'wip_omap_snaps'
Samuel Just [Thu, 14 Mar 2013 02:59:39 +0000 (19:59 -0700)]
Merge branch 'wip_omap_snaps'

Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agoOSD: remove snap_mapper entries in RemoveWQ
Samuel Just [Wed, 6 Mar 2013 22:55:28 +0000 (14:55 -0800)]
OSD: remove snap_mapper entries in RemoveWQ

This is a somewhat ugly hack for now until we implement
pg resurrection.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPG: check and repair snap_mapper entries during scrub
Samuel Just [Mon, 4 Mar 2013 20:37:46 +0000 (12:37 -0800)]
PG: check and repair snap_mapper entries during scrub

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoOSD,PG: add upgrade procedure for snap_mapper
Samuel Just [Mon, 4 Mar 2013 19:16:05 +0000 (11:16 -0800)]
OSD,PG: add upgrade procedure for snap_mapper

Also, sub_op_modify transactions currently carry the operations
for creating snap links in the shipped transaction.  To handle
ops shipped by unenlightened osds, transactions can now be
tagged with a tolerate_collection_add_enoent flag.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoosd/: Integrate SnapMapper with OSD
Samuel Just [Tue, 5 Mar 2013 22:34:47 +0000 (14:34 -0800)]
osd/: Integrate SnapMapper with OSD

- SnapTrimmer now uses SnapMapper to get the next object to trim
- Entries for a snap are implicitely removed from SnapMapper when
the last object is trimmed, so no need for the adjust_local_snaps
logic.
- Scrub now compares the object_info snaps set on the object attr
with the version stored in the SnapMapper.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoMakefile: add SnapMapper to osd
Samuel Just [Wed, 27 Feb 2013 23:17:47 +0000 (15:17 -0800)]
Makefile: add SnapMapper to osd

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agotest/: add tests for map_cacher
Samuel Just [Wed, 27 Feb 2013 22:38:33 +0000 (14:38 -0800)]
test/: add tests for map_cacher

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoosd/: add SnapMapper
Samuel Just [Tue, 12 Mar 2013 23:28:19 +0000 (16:28 -0700)]
osd/: add SnapMapper

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agocommon/: add map_cacher
Samuel Just [Wed, 27 Feb 2013 22:37:33 +0000 (14:37 -0800)]
common/: add map_cacher

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agocommon/shared_ptr.hpp: add get_next and expose VPtr and WeakVPtr types
Samuel Just [Wed, 27 Feb 2013 21:41:23 +0000 (13:41 -0800)]
common/shared_ptr.hpp: add get_next and expose VPtr and WeakVPtr types

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agofilestore: add debug option to verify split results
Samuel Just [Sat, 9 Mar 2013 06:14:37 +0000 (22:14 -0800)]
filestore: add debug option to verify split results

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoDBObjectMap, hobject: add helpers for pgid bit matching
Samuel Just [Sat, 2 Mar 2013 00:04:04 +0000 (16:04 -0800)]
DBObjectMap, hobject: add helpers for pgid bit matching

Create helpers in hobject for generating prefixes for a
pg as well as matching hobjects against a pgid/numpgs
combo.  Use these in HashIndex.cc.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoObjectStore: add Context management to Transaction
Samuel Just [Sun, 3 Mar 2013 23:47:48 +0000 (15:47 -0800)]
ObjectStore: add Context management to Transaction

ObjectStore now appends passed contexts in queue_transaction
to the Transaction contexts and uses that to pass into
the virtual queue_transactions.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoContext: allow C_Contexts to not have a cct, add list_to_context
Samuel Just [Thu, 28 Feb 2013 18:06:44 +0000 (10:06 -0800)]
Context: allow C_Contexts to not have a cct, add list_to_context

This will simplify the SnapMapper implementation.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoObjectStore: move queue_transaction into ObjectStore
Samuel Just [Thu, 28 Feb 2013 17:56:49 +0000 (09:56 -0800)]
ObjectStore: move queue_transaction into ObjectStore

This will simplify the SnapMapper implementation.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoosd_internals/snaps.rst: update description to reflect SnapMapper
Samuel Just [Fri, 1 Mar 2013 01:33:31 +0000 (17:33 -0800)]
osd_internals/snaps.rst: update description to reflect SnapMapper

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoosd_internals/snaps.rst: add a description of snaps and trimming
Samuel Just [Fri, 1 Mar 2013 01:16:19 +0000 (17:16 -0800)]
osd_internals/snaps.rst: add a description of snaps and trimming

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPG::read_log: fix assert, split may introduce holes in the log
Samuel Just [Wed, 6 Mar 2013 01:43:39 +0000 (17:43 -0800)]
PG::read_log: fix assert, split may introduce holes in the log

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoOSD: add debugging to start_split and complete_split
Samuel Just [Sat, 9 Mar 2013 01:15:14 +0000 (17:15 -0800)]
OSD: add debugging to start_split and complete_split

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPG: check_recovery_sources must happen even if not active
Samuel Just [Thu, 7 Mar 2013 20:53:51 +0000 (12:53 -0800)]
PG: check_recovery_sources must happen even if not active

missing_loc/missing_loc_sources also must be cleaned up
if a peer goes down during peering:

1) pg is in GetInfo, acting is [3,1]
2) we find object A on osd [0] in GetInfo
3) 0 goes down, no new peering interval since it is neither up nor
acting, but peer_missing[0] is removed.
4) pg goes active and try to pull A from 0 since missing_loc did not get
cleaned up.

Backport: bobtail
Fixes: #4371
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agoFileStore: fix reversed collection_empty return value
Samuel Just [Wed, 6 Mar 2013 00:06:20 +0000 (16:06 -0800)]
FileStore: fix reversed collection_empty return value

Backport: bobtail
Fixes: #4380
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agoHashIndex: _collection_list_partial must tolerate NULL next
Samuel Just [Tue, 5 Mar 2013 23:49:26 +0000 (15:49 -0800)]
HashIndex: _collection_list_partial must tolerate NULL next

Backport: bobtail
Fixes: #4379
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agoOSD: lock not needed in ~DeletingState()
Samuel Just [Tue, 5 Mar 2013 22:35:39 +0000 (14:35 -0800)]
OSD: lock not needed in ~DeletingState()

No further refs to the object can remain at this point.
Furthermore, the callbacks might lock mutexes of their
own.

Backport: bobtail
Fixes: #4378
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agoReplicatedPG: don't leak reservation on removal
Samuel Just [Sun, 10 Mar 2013 19:50:01 +0000 (12:50 -0700)]
ReplicatedPG: don't leak reservation on removal

Fixes: 4431
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agoMerge remote-tracking branch 'dalgaaf/wip-da-performance'
Sage Weil [Wed, 13 Mar 2013 23:46:47 +0000 (16:46 -0700)]
Merge remote-tracking branch 'dalgaaf/wip-da-performance'

Conflicts:
src/client/Client.cc

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'wip-mds-con' 105/head
Sage Weil [Wed, 13 Mar 2013 23:38:38 +0000 (16:38 -0700)]
Merge branch 'wip-mds-con'

Reviewed-by: Greg Farnum <greg@inktank.com>
Tested-by: Noah Watkins <jayhawk@cs.ucsc.edu>
12 years agomds: log session resets more cleanly
Sage Weil [Wed, 13 Mar 2013 02:53:46 +0000 (19:53 -0700)]
mds: log session resets more cleanly

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomds: use session con ref to mark down killing session
Sage Weil [Wed, 13 Mar 2013 02:44:42 +0000 (19:44 -0700)]
mds: use session con ref to mark down killing session

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomds: mark con for closed session disposable
Sage Weil [Wed, 13 Mar 2013 02:44:20 +0000 (19:44 -0700)]
mds: mark con for closed session disposable

If there is a fault while delivering the message, close the con.  This will
clean up the Session state from memory.  If the client doesn't get the
CLOSED message, they will reconnect (from their perspective, it is still
a lossless connection) and get a remote_reset event telling them that the
session is gone.  The client code already handles this case properly.

Note that way back in 4ac45200f10e0409121948cea5226ca9e23bb5fb we removed
this because the client would reuse the same connection when it reopened
the session.  Now the client never does that; it will mark_down the con
as soon as it is closed and open a new one for a new session... which means
the MDS will get a remote_reset and close out the old session.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomds: useless cleanup
Sage Weil [Wed, 13 Mar 2013 01:37:44 +0000 (18:37 -0700)]
mds: useless cleanup

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomds: mark_down old sessions using con
Sage Weil [Wed, 13 Mar 2013 01:31:23 +0000 (18:31 -0700)]
mds: mark_down old sessions using con

Use the Connection ref to mark old client sessions down.  This is cleaner.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'wip-4390-b'
Sage Weil [Wed, 13 Mar 2013 23:37:29 +0000 (16:37 -0700)]
Merge branch 'wip-4390-b'

Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agoclient: fix kick_flushing_caps() args
Sage Weil [Wed, 13 Mar 2013 23:09:45 +0000 (16:09 -0700)]
client: fix kick_flushing_caps() args

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: clean up useless MetaSession lookups
Sage Weil [Wed, 13 Mar 2013 23:08:50 +0000 (16:08 -0700)]
client: clean up useless MetaSession lookups

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: fix trim_caps() args
Sage Weil [Wed, 13 Mar 2013 23:08:42 +0000 (16:08 -0700)]
client: fix trim_caps() args

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: fix wake_inode_waiters() arg
Sage Weil [Wed, 13 Mar 2013 23:07:47 +0000 (16:07 -0700)]
client: fix wake_inode_waiters() arg

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: validate/lookup mds session in each message handler
Sage Weil [Wed, 13 Mar 2013 23:06:02 +0000 (16:06 -0700)]
client: validate/lookup mds session in each message handler

For every message handler, look up the MetaSession by int mds and verify
that the Connection* matches properly.  If so, proceed; otherwise, discard
the message.

In the future, we probably want to link the MetaSession to the Connection's
priv field, but that can come later.

Clean up a bunch of submethods that take int mds while we're here.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: fix remaining s->inst users to use s->con
Sage Weil [Wed, 13 Mar 2013 22:55:15 +0000 (15:55 -0700)]
client: fix remaining s->inst users to use s->con

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: remove unused MetaSession::was_stale
Sage Weil [Wed, 13 Mar 2013 20:24:37 +0000 (13:24 -0700)]
client: remove unused MetaSession::was_stale

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: only signal session waiters on open and close
Sage Weil [Wed, 13 Mar 2013 20:21:34 +0000 (13:21 -0700)]
client: only signal session waiters on open and close

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