]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
12 years agoos/JournalingObjectStore: un-break op quiescing during journal replay
Sage Weil [Wed, 12 Dec 2012 01:15:56 +0000 (17:15 -0800)]
os/JournalingObjectStore: un-break op quiescing during journal replay

Commit d9dce4e9273adb4279519d65a0d8bfdfecb5c516 broke journal replay
because the commit thread may try to do a commit, and the ops are not
being applied via the normal work queue.  Add back in a simpler form of the
old op quiescing (simpler because there is a single thread doing the
replay).

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agomds: shutdown cleanly if can't authenticate
Yehuda Sadeh [Tue, 11 Dec 2012 21:41:50 +0000 (13:41 -0800)]
mds: shutdown cleanly if can't authenticate

Fixes: #3590
This was triggered when tried to run mds with cephx enabled
against a mon without cephx support. We didn't handle the
returned error at all, so this one fixes it. It also makes
sure that we don't continue initialization until rotating
keys are in place (as the osd does).

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-conf' into next
Sage Weil [Tue, 11 Dec 2012 23:07:38 +0000 (15:07 -0800)]
Merge remote-tracking branch 'gh/wip-conf' into next

Reviewed-by: Greg Farnu <greg@inktank.com>
12 years agomds: fix journaling issue regarding rstat accounting
Yan, Zheng [Fri, 30 Nov 2012 01:13:43 +0000 (09:13 +0800)]
mds: fix journaling issue regarding rstat accounting

Rename operation can call predirty_journal_parents() several times.
So a directory fragment's rstat can also be modified several times.
But only the first modification is journaled because EMetaBlob::add_dir()
does not update existing dirlump.

For example: when hanlding 'mv a/b/c a/c', Server::_rename_prepare may
first decrease directory a and b's nested files count by one, then
increases directory a's nested files count by one.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
12 years agofix build of unittest_formatter
Danny Al-Gaaf [Wed, 28 Nov 2012 15:05:48 +0000 (16:05 +0100)]
fix build of unittest_formatter

Add CRYPTO_CXXFLAGS to unittest_formatter_CXXFLAGS to find pk11pub.h to
be included in src/common/ceph_crypto.h.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoinclude/atomic.h: add stdlib.h for size_t
Danny Al-Gaaf [Tue, 11 Dec 2012 13:05:08 +0000 (14:05 +0100)]
include/atomic.h: add stdlib.h for size_t

Include missing stdlib.h needed for size_t.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoMerge remote-tracking branch 'upstream/wip_split2' into next
Samuel Just [Tue, 11 Dec 2012 06:00:30 +0000 (22:00 -0800)]
Merge remote-tracking branch 'upstream/wip_split2' into next

Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agoOSD: get_or_create_pg doesn't need an op passed in
Samuel Just [Tue, 11 Dec 2012 03:03:55 +0000 (19:03 -0800)]
OSD: get_or_create_pg doesn't need an op passed in

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoLFNIndex: fix move_subdir comments
Samuel Just [Tue, 11 Dec 2012 01:45:02 +0000 (17:45 -0800)]
LFNIndex: fix move_subdir comments

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoHashIndex: fix typo in reset_attr documentation
Samuel Just [Tue, 11 Dec 2012 01:40:10 +0000 (17:40 -0800)]
HashIndex: fix typo in reset_attr documentation

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoHashIndex: init exists in col_split_level and reset_attr
Samuel Just [Tue, 11 Dec 2012 01:39:13 +0000 (17:39 -0800)]
HashIndex: init exists in col_split_level and reset_attr

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPrioritizedQueue: increment ret when removing items from list
Samuel Just [Tue, 11 Dec 2012 01:31:44 +0000 (17:31 -0800)]
PrioritizedQueue: increment ret when removing items from list

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPrioritizedQueue: move if check out of loop in filter_list_pairs
Samuel Just [Tue, 11 Dec 2012 01:30:59 +0000 (17:30 -0800)]
PrioritizedQueue: move if check out of loop in filter_list_pairs

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoconfig: do not always print config file missing errors
Sage Weil [Tue, 11 Dec 2012 00:41:19 +0000 (16:41 -0800)]
config: do not always print config file missing errors

Do not generate errors each time we fail to open a config file; only
generate one at the end if a search path was specified and none were
usable, right before we (already) exit.  This avoids spamming stderr
about each path we tried in the search list before we found a good one.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoconfig: always complain about config parse errors
Sage Weil [Mon, 10 Dec 2012 21:29:21 +0000 (13:29 -0800)]
config: always complain about config parse errors

Complain about config parsing errors even when it is the default
config file.

We may also want to fail instead of continuing, but that is a separate
issue.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-filestore2' into next
Sage Weil [Mon, 10 Dec 2012 22:34:07 +0000 (14:34 -0800)]
Merge remote-tracking branch 'gh/wip-filestore2' into next

Reviewed-by: Sam Just <sam.just@inktank.com>
12 years agoconfig_opts.h: adjust recovery defaults
Samuel Just [Mon, 10 Dec 2012 21:38:24 +0000 (13:38 -0800)]
config_opts.h: adjust recovery defaults

osd max backfills: 5 was too low for a default, 10
 seems to work better in testing.  The message
 priority system should minimize disruption of
 push and pull operations anyway.

osd recovery max chunk: 1MB was too small for a
 default.  8MB is reasonable for a single push
 and will allow us to recover an rbd block in
 one push rather then 4 reducing client io
 latency during log-based recovery.

osd recovery op priority: 10 rather than 30 will
 further reduce the client io latency impact of
 push and pull operations.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-3559' into next
Sage Weil [Mon, 10 Dec 2012 20:55:14 +0000 (12:55 -0800)]
Merge remote-tracking branch 'gh/wip-3559' into next

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomon: fix leak of pool op reply data
Sage Weil [Sun, 9 Dec 2012 05:44:54 +0000 (21:44 -0800)]
mon: fix leak of pool op reply data

We pass a pointer because it is an optional argument, but we shouldn't
put the bufferlist on the heap or else we have to manage it's life
cycle, and that's fragile (and previously broken).

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoos/JournalingObjectStore: simplify op_submitting sanity check
Sage Weil [Fri, 7 Dec 2012 00:27:07 +0000 (16:27 -0800)]
os/JournalingObjectStore: simplify op_submitting sanity check

A list is overkill; just use a seq and make sure it increments to ensure
the op_submit_finish calls are in order.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoos/JournalingObjectStore: remove unused ops_submitting
Sage Weil [Fri, 7 Dec 2012 00:22:50 +0000 (16:22 -0800)]
os/JournalingObjectStore: remove unused ops_submitting

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoos/JourningObjectStore: drop now-useless max_applying_seq
Sage Weil [Fri, 7 Dec 2012 00:20:00 +0000 (16:20 -0800)]
os/JourningObjectStore: drop now-useless max_applying_seq

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agofilestore: simplify op quescing
Sage Weil [Fri, 7 Dec 2012 00:18:07 +0000 (16:18 -0800)]
filestore: simplify op quescing

The delicate balancing with op_apply_start() and that fact that it can
block was making it very hard to determine how long commit_start() should
wait, since requests in the workqueue threads could op_apply_start() in
any order.  For example,

 threadA: gets osr1 from wq
 threadA: gets osr2 from wq
 threadA: dequeue seq 11 from osr1, op_apply_start
 threadC: commit_start on 11
 threadA: op_apply_finish on seq 11
 threadC: commit_started, commit_finish
 threadB: dequeue seq 10 from osr2
   <failed assert, badness>

Instead, rip out all this code, and use the ThreadPool pause() method to
quiesce operations.  Keep some of the (now unnecessary) fields around
for sanity checks (blocked, open_ops, max_applying_seq, etc.).

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: make pool_stat_t encoding backward compatible with v0.41 and older
Sage Weil [Fri, 7 Dec 2012 22:09:14 +0000 (14:09 -0800)]
osd: make pool_stat_t encoding backward compatible with v0.41 and older

In particular, this is the encoding that is used in precise.

Fixes: #3212
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-ceph-test' into next
Sage Weil [Sat, 8 Dec 2012 17:18:21 +0000 (09:18 -0800)]
Merge remote-tracking branch 'gh/wip-ceph-test' into next

12 years agocrush/CrushWrapper: do not crash if you move an item with no current home
Sage Weil [Sat, 17 Nov 2012 00:55:00 +0000 (16:55 -0800)]
crush/CrushWrapper: do not crash if you move an item with no current home

This will let us take an existing orphan and place it somewhere.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: Elector: init elector before each election
Joao Eduardo Luis [Fri, 7 Dec 2012 16:13:06 +0000 (16:13 +0000)]
mon: Elector: init elector before each election

Fixes: #3587
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agoMerge branch 'testing' into next
Sage Weil [Sat, 8 Dec 2012 17:12:21 +0000 (09:12 -0800)]
Merge branch 'testing' into next

12 years agoinit-ceph: =, not ==
Sage Weil [Sat, 8 Dec 2012 17:10:31 +0000 (09:10 -0800)]
init-ceph: =, not ==

Reported-by: v@alan.lt
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodebian: add ceph.postinst to remove /etc/init/ceph.conf on update
Dan Mick [Sat, 8 Dec 2012 00:54:27 +0000 (16:54 -0800)]
debian: add ceph.postinst to remove /etc/init/ceph.conf on update

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoPG: remove last_epoch_started asserts in proc_primary_info
Samuel Just [Tue, 4 Dec 2012 19:36:58 +0000 (11:36 -0800)]
PG: remove last_epoch_started asserts in proc_primary_info

These asserts are valid for a uniform cluster, but they won't hold
for a replica running a version without the info.last_epoch_started
patch.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit 0756052cff542ab02d653b40c37a645b395f31b3)

12 years agoauth: set default auth_client_required
Yehuda Sadeh [Fri, 7 Dec 2012 01:47:02 +0000 (17:47 -0800)]
auth: set default auth_client_required

Fixes: #3578
Set auth_client_required to default to "cephx, none".

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoauth: changed order of test for legacy and new authentication
Peter Reiher [Sat, 8 Dec 2012 00:32:31 +0000 (16:32 -0800)]
auth: changed order of test for legacy and new authentication

Changed order of test for legacy and new configuration options
in several places.

Signed-off-by: Peter Reiher <reiher@inktank.com>
12 years agoauth: improve logging
Yehuda Sadeh [Fri, 7 Dec 2012 02:12:51 +0000 (18:12 -0800)]
auth: improve logging

Add some logging around failure cases.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorbd: use ExportContext for progress, not cerr
Dan Mick [Sat, 8 Dec 2012 00:00:30 +0000 (16:00 -0800)]
rbd: use ExportContext for progress, not cerr

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agomds: move from EXCL to SYNC if nobody wants to write
Sage Weil [Wed, 5 Dec 2012 13:56:37 +0000 (05:56 -0800)]
mds: move from EXCL to SYNC if nobody wants to write

We were moving to the MIX even if nobody wanted to write; that is not
useful, since if we only want to read SYNC will let us cache those reads.
SYNC is also a more friendly place (all things equal) to be.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomds/locker: Add debugging for excl->mix trans
Sam Lang [Tue, 4 Dec 2012 19:18:56 +0000 (13:18 -0600)]
mds/locker:  Add debugging for excl->mix trans

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agotest/libcephfs: Add a test for validating caps
Sam Lang [Sat, 1 Dec 2012 22:55:47 +0000 (16:55 -0600)]
test/libcephfs: Add a test for validating caps

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoclient: Add routine to get caps of file/fd
Sam Lang [Sat, 1 Dec 2012 22:54:44 +0000 (16:54 -0600)]
client: Add routine to get caps of file/fd

In order to properly validate the client capabilities,
we need to be able to access them from libcephfs.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agolibrbd: change internal order parameter to pass-by-value
Josh Durgin [Fri, 7 Dec 2012 00:21:32 +0000 (16:21 -0800)]
librbd: change internal order parameter to pass-by-value

It doesn't change in any of these places.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: clean up after errors in create
Josh Durgin [Wed, 5 Dec 2012 23:52:41 +0000 (15:52 -0800)]
librbd: clean up after errors in create

Split format 1 and 2 image creation into separate functions for better
readability. Format 2 requires more error handling.

Fixes: #2677
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: bump version for new functions
Josh Durgin [Tue, 4 Dec 2012 22:38:11 +0000 (14:38 -0800)]
librbd: bump version for new functions

copy2, clone2, and create3 are new.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agomon: PGMonitor: erase entries from 'creating_pgs_by_osd' when set is empty
Joao Eduardo Luis [Thu, 6 Dec 2012 17:03:13 +0000 (17:03 +0000)]
mon: PGMonitor: erase entries from 'creating_pgs_by_osd' when set is empty

This patch avoids sending empty MOSDPGCreate's every tick.

Fixes: #3571
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agomon: Monitor: rework 'paxos' to a list instead of a vector
Joao Eduardo Luis [Thu, 6 Dec 2012 15:37:24 +0000 (15:37 +0000)]
mon: Monitor: rework 'paxos' to a list instead of a vector

After adding the gv patches, during Monitor::recovered_leader() we started
waking up contexts following the order of the 'paxos' vector. However,
given that the mdsmon has a forgotten dependency on the osdmon paxos
machine, we were incurring in a situation in which we proposed a value
through the osdmon before creating a new pending value (but by being
active, the mdsmon would go through with it nonetheless).

This is easily fixed by making sure that the mdsmon callbacks are only
awaken *after* the osdmon has been taken care of.

Fixes: #3495
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agoMerge branch 'testing' into next
Sage Weil [Fri, 7 Dec 2012 12:00:22 +0000 (04:00 -0800)]
Merge branch 'testing' into next

12 years agoOSD: store current pg epoch in info and load at that epoch
Samuel Just [Thu, 6 Dec 2012 01:05:38 +0000 (17:05 -0800)]
OSD: store current pg epoch in info and load at that epoch

Prior to split, this did not matter.  With split, however, it's
crucial that a pg go through advance_pg() for the map causing
the split.  During operation, a PG lags the OSD superblock
epoch.  If the OSD dies after the OSD epoch passes the split
but before the pg epoch passes the split, the PG will be
reloaded at the OSD epoch and won't see the split operation.
The PG collection might after that point contain incorrect
objects which should have been split into a child.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoOSD: account for split in project_pg_history
Samuel Just [Thu, 29 Nov 2012 01:14:11 +0000 (17:14 -0800)]
OSD: account for split in project_pg_history

split causes a new interval.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPG: update info.last_update_started in split_into
Samuel Just [Wed, 21 Nov 2012 22:10:51 +0000 (14:10 -0800)]
PG: update info.last_update_started in split_into

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoOSDMonitor: require --allow-experimental-feature to increase pg_num
Samuel Just [Tue, 20 Nov 2012 20:16:44 +0000 (12:16 -0800)]
OSDMonitor: require --allow-experimental-feature to increase pg_num

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPG: set child up/acting in split_into
Samuel Just [Tue, 20 Nov 2012 03:58:43 +0000 (19:58 -0800)]
PG: set child up/acting in split_into

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoOSD: do _remove_pg in add_newly_split_pg is pool if gone
Samuel Just [Mon, 19 Nov 2012 03:24:00 +0000 (19:24 -0800)]
OSD: do _remove_pg in add_newly_split_pg is pool if gone

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoosd/: dirty info and log on child during split
Samuel Just [Tue, 13 Nov 2012 22:48:54 +0000 (14:48 -0800)]
osd/: dirty info and log on child during split

Otherwise, the log may not get written out.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoosd/: mark info.stats as invalid after split, fix in scrub
Samuel Just [Thu, 20 Sep 2012 01:41:34 +0000 (18:41 -0700)]
osd/: mark info.stats as invalid after split, fix in scrub

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPG: split ops for child objects into child
Samuel Just [Thu, 20 Sep 2012 03:15:04 +0000 (20:15 -0700)]
PG: split ops for child objects into child

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoOSD: add initial split support
Samuel Just [Wed, 21 Nov 2012 00:47:49 +0000 (16:47 -0800)]
OSD: add initial split support

PGs are split after updating to the map on which they split.
OSD::activate_map populates the set of currently "splitting"
pgs.  Messages for those pgs are delayed until the split
is complete.  We add the newly split children to pg_map
once the transaction populating their on-disk state completes.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agolibrados: watch() should set the WRITE flag on the op
Samuel Just [Thu, 6 Dec 2012 22:52:13 +0000 (14:52 -0800)]
librados: watch() should set the WRITE flag on the op

This caused a bug where the watch operation bypassed the is_degraded()
check in the write path and the repop got sent to the replica where the
replica crashed due to the is_missing() assert in sub_op_modify.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoHashIndex: fix list_by_hash handling of next->is_max()
Samuel Just [Thu, 6 Dec 2012 21:57:01 +0000 (13:57 -0800)]
HashIndex: fix list_by_hash handling of next->is_max()

get_path_str() should not handle hobject_t::get_max().  get_path_str()
now asserts that the passed object is not max and the callers now check
for is_max().  This caused HashIndex.cc to incorrectly scan an entire
collection before returning no objects rather than scanning the top
level and returning no objects.  It did not actually list_by_hash to
return an incorrect answer, however.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agorbd: remove block-by-block messages when exporting
Dan Mick [Thu, 6 Dec 2012 23:58:19 +0000 (15:58 -0800)]
rbd: remove block-by-block messages when exporting

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agorelease: add note about 'ceph osd create' syntax
Josh Durgin [Thu, 6 Dec 2012 20:25:39 +0000 (12:25 -0800)]
release: add note about 'ceph osd create' syntax

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoclient: Allow cap release timeout to be configured
Sam Lang [Thu, 6 Dec 2012 05:11:10 +0000 (21:11 -0800)]
client: Allow cap release timeout to be configured

The delay for releasing an inode's capability is
hardcoded to 5 seconds.  This patch takes the timeout
value from a config parameter, which defaults presently
to 5 seconds.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agomkcephfs: fix fs_type assignment typo
Sage Weil [Thu, 6 Dec 2012 13:27:41 +0000 (05:27 -0800)]
mkcephfs: fix fs_type assignment typo

Reported-by: Matthew Via <via@matthewvia.info>
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoupstart: fix radosgw upstart job
Sage Weil [Thu, 6 Dec 2012 13:26:11 +0000 (05:26 -0800)]
upstart: fix radosgw upstart job

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoupstart: rename ceph -> ceph-all
Sage Weil [Thu, 6 Dec 2012 13:26:01 +0000 (05:26 -0800)]
upstart: rename ceph -> ceph-all

This avoids a conflict with the sysvinit job.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'testing' into next
Dan Mick [Thu, 6 Dec 2012 02:18:41 +0000 (18:18 -0800)]
Merge branch 'testing' into next

12 years agorbd: update manpage for import/export
Dan Mick [Thu, 6 Dec 2012 02:17:35 +0000 (18:17 -0800)]
rbd: update manpage for import/export

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agolibrbd: hold AioCompletion lock while modifying global state
Dan Mick [Tue, 4 Dec 2012 04:59:17 +0000 (20:59 -0800)]
librbd: hold AioCompletion lock while modifying global state

C_AioRead::finish needs to add in each chunk of a partial read
request to the 'partial' map in the AioCompletion's state
(in destriper, of type StripedReadResult).  That map is global
and must be protected from simultaneous access.  Use the
AioCompletion lock; could create a separate lock if contention is an
issue.

Fixes: #3567
Signed-off-by: Dan Mick <dan.mick@inktank.com>
(cherry picked from commit a55700cc0aea0ff79e55c6bf78e9757b81fe9425)

12 years agolibrbd: handle parent change while async I/Os are in flight
Dan Mick [Sat, 1 Dec 2012 02:11:09 +0000 (18:11 -0800)]
librbd: handle parent change while async I/Os are in flight

During a test_librbd_fsx run including flatten, ImageCtx->parent
was being dereferenced while null.  Between the time the parent
overlap is calculated and the time the guard+write completes
with ENOENT and submits the copyup+write, the parent image
could have changed (by resize) or been made irrelevant (by
child flatten) such that the parent overlap is now incorrect.

Handle "no parent" by just sending the copyup+write; the copyup
part will be a no-op.  Move to WRITE_FLAT state in this case
because there's no more child to deal with.

Handle "overlap changed" by recalculating overlap before
reading parent data; if none is left, don't read, but rather
just clear m_object_image_extents, in which case the copyup
will again be a no-op because it will be of zero length.
However we still have a parent, so stay in WRITE_COPYUP state
and come back through as usual.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Fixes: #3524
(cherry picked from commit 41e16a3b40efb80a5ed7a5587438569ca86c85a3)

12 years agoStriper: use local variable inside if() that tested it
Dan Mick [Sat, 1 Dec 2012 01:21:24 +0000 (17:21 -0800)]
Striper: use local variable inside if() that tested it

Signed-off-by: Dan Mick <dan.mick@inktank.com>
(cherry picked from commit 917a6f296323164f9d79df94916932722e66fc0a)

12 years agolibrbd: hold AioCompletion lock while modifying global state
Dan Mick [Tue, 4 Dec 2012 04:59:17 +0000 (20:59 -0800)]
librbd: hold AioCompletion lock while modifying global state

C_AioRead::finish needs to add in each chunk of a partial read
request to the 'partial' map in the AioCompletion's state
(in destriper, of type StripedReadResult).  That map is global
and must be protected from simultaneous access.  Use the
AioCompletion lock; could create a separate lock if contention is an
issue.

Fixes: #3567
Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agolibrbd: handle parent change while async I/Os are in flight
Dan Mick [Sat, 1 Dec 2012 02:11:09 +0000 (18:11 -0800)]
librbd: handle parent change while async I/Os are in flight

During a test_librbd_fsx run including flatten, ImageCtx->parent
was being dereferenced while null.  Between the time the parent
overlap is calculated and the time the guard+write completes
with ENOENT and submits the copyup+write, the parent image
could have changed (by resize) or been made irrelevant (by
child flatten) such that the parent overlap is now incorrect.

Handle "no parent" by just sending the copyup+write; the copyup
part will be a no-op.  Move to WRITE_FLAT state in this case
because there's no more child to deal with.

Handle "overlap changed" by recalculating overlap before
reading parent data; if none is left, don't read, but rather
just clear m_object_image_extents, in which case the copyup
will again be a no-op because it will be of zero length.
However we still have a parent, so stay in WRITE_COPYUP state
and come back through as usual.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Fixes: #3524
12 years agoStriper: use local variable inside if() that tested it
Dan Mick [Sat, 1 Dec 2012 01:21:24 +0000 (17:21 -0800)]
Striper: use local variable inside if() that tested it

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoqa: add script for running xfstests in a vm
Josh Durgin [Wed, 5 Dec 2012 23:54:11 +0000 (15:54 -0800)]
qa: add script for running xfstests in a vm

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoPG: add split_into to populate child members
Samuel Just [Wed, 21 Nov 2012 00:45:56 +0000 (16:45 -0800)]
PG: add split_into to populate child members

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoosd/: splitting a pg now triggers a new interval
Samuel Just [Thu, 20 Sep 2012 00:30:43 +0000 (17:30 -0700)]
osd/: splitting a pg now triggers a new interval

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPrioritizedQueue: allow caller to get items removed by removed_by_filter
Samuel Just [Sat, 10 Nov 2012 02:37:44 +0000 (18:37 -0800)]
PrioritizedQueue: allow caller to get items removed by removed_by_filter

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agomon/OSDMonitor: enable split in Monitor
Samuel Just [Wed, 19 Sep 2012 16:23:21 +0000 (09:23 -0700)]
mon/OSDMonitor: enable split in Monitor

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPGMonitor,OSD: don't send creates on split
Samuel Just [Wed, 12 Sep 2012 16:38:05 +0000 (09:38 -0700)]
PGMonitor,OSD: don't send creates on split

Splits will be handled when the map update effecting the split is
processed for the splitting pg on each OSD.  This will mesh
with the pg history which will place the new pg at the current
positions of the splitting pg.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoOSD: dispatch_context only discard transaction if contexts empty
Samuel Just [Thu, 20 Sep 2012 20:55:48 +0000 (13:55 -0700)]
OSD: dispatch_context only discard transaction if contexts empty

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoOSD: don't wait for superblock writes in handle_osd_map
Samuel Just [Thu, 20 Sep 2012 21:45:00 +0000 (14:45 -0700)]
OSD: don't wait for superblock writes in handle_osd_map

Instead, pass the pinned maps into a Context and clear the
cache after the transaction is applied.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoos/: Add CollectionIndex::prep_delete
Samuel Just [Sun, 18 Nov 2012 02:18:23 +0000 (18:18 -0800)]
os/: Add CollectionIndex::prep_delete

If an unlink is interupted between removing the file
and updating the subdir attribute, the attribute will
overestimate the number of files in the directory.  This
is by design, at worst we will merge the collection later
than intended, but closing the gap would require a second
subdir xattr update.  However, this can in extreme cases
result in a collection with subdirectories but no objects.
FileStore::_destry_collection would therefore see an
erroneous -ENOTEMPTY.

prep_delete allows the CollectionIndex implementation to
clean up state prior to removal.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoos/: Add failure CollectionIndex failure injection
Samuel Just [Fri, 16 Nov 2012 22:26:32 +0000 (14:26 -0800)]
os/: Add failure CollectionIndex failure injection

Several pieces of HashIndex involve multi-step operations
which are sensitive to OSD crashes.  This patch introduces
failure injection to force retries from various points in
the LFNIndex helper methods to be used with store_test.cc.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agotest/store_test: add simple tests for collection_split
Samuel Just [Tue, 11 Sep 2012 04:47:09 +0000 (21:47 -0700)]
test/store_test: add simple tests for collection_split

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoos/: add filestore collection_split
Samuel Just [Tue, 11 Sep 2012 04:46:38 +0000 (21:46 -0700)]
os/: add filestore collection_split

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoOSD: ignore queries on now deleted pools
Samuel Just [Wed, 5 Dec 2012 19:11:10 +0000 (11:11 -0800)]
OSD: ignore queries on now deleted pools

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoMerge remote-tracking branch 'origin/wip-mds' into next
Greg Farnum [Wed, 5 Dec 2012 00:48:09 +0000 (16:48 -0800)]
Merge remote-tracking branch 'origin/wip-mds' into next

Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agoMerge branch 'wip-filestore' into next
Sage Weil [Tue, 4 Dec 2012 23:05:18 +0000 (15:05 -0800)]
Merge branch 'wip-filestore' into next

Reviewed-by: Sam Just <sam.just@inktank.com>
12 years agoMerge branch 'wip-msgr-delay-queue' into next
Sage Weil [Tue, 4 Dec 2012 22:52:22 +0000 (14:52 -0800)]
Merge branch 'wip-msgr-delay-queue' into next

12 years agomds: journal remote inode's projected parent
Yan, Zheng [Tue, 4 Dec 2012 08:09:48 +0000 (16:09 +0800)]
mds: journal remote inode's projected parent

Server::_rename_prepare() adds remote inode's parent instead of
projected parent to the journal. So during journal replay, the
journal entry for the rename operation will wrongly revert the
remote inode's projected rename. This issue can be reproduced by:

 touch file1
 ln file1 file2
 rm file1
 mv file2 file3

After journal replay, file1 reappears and directory's fragstat
gets corrupted.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
12 years agomds: don't create bloom filter for incomplete dir
Yan, Zheng [Tue, 4 Dec 2012 08:09:47 +0000 (16:09 +0800)]
mds: don't create bloom filter for incomplete dir

Creating bloom filter for incomplete dir that was added by log
replay will confuse subsequent dir lookup and can create null
dentry for existing file. The erroneous null dentry confuses the
fragstat accounting and causes undeletable empty directory.

The fix is check if the dir is complete before creating the bloom
filter. For the MDCache::trim_non_auth{,_subtree} cases, just do
not call CDir::add_to_bloom because bloom filter is useless for
replica.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
12 years agoPG: remove last_epoch_started asserts in proc_primary_info
Samuel Just [Tue, 4 Dec 2012 19:36:58 +0000 (11:36 -0800)]
PG: remove last_epoch_started asserts in proc_primary_info

These asserts are valid for a uniform cluster, but they won't hold
for a replica running a version without the info.last_epoch_started
patch.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agomds: journal remote inode's projected parent
Yan, Zheng [Tue, 4 Dec 2012 08:09:48 +0000 (16:09 +0800)]
mds: journal remote inode's projected parent

Server::_rename_prepare() adds remote inode's parent instead of
projected parent to the journal. So during journal replay, the
journal entry for the rename operation will wrongly revert the
remote inode's projected rename. This issue can be reproduced by:

 touch file1
 ln file1 file2
 rm file1
 mv file2 file3

After journal replay, file1 reappears and directory's fragstat
gets corrupted.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
12 years agomds: don't create bloom filter for incomplete dir
Yan, Zheng [Tue, 4 Dec 2012 08:09:47 +0000 (16:09 +0800)]
mds: don't create bloom filter for incomplete dir

Creating bloom filter for incomplete dir that was added by log
replay will confuse subsequent dir lookup and can create null
dentry for existing file. The erroneous null dentry confuses the
fragstat accounting and causes undeletable empty directory.

The fix is check if the dir is complete before creating the bloom
filter. For the MDCache::trim_non_auth{,_subtree} cases, just do
not call CDir::add_to_bloom because bloom filter is useless for
replica.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
12 years agoMerge remote-tracking branch 'gh/wip-mds' into next
Sage Weil [Tue, 4 Dec 2012 13:27:59 +0000 (05:27 -0800)]
Merge remote-tracking branch 'gh/wip-mds' into next

12 years agologrotate: do not spam stdout
Sage Weil [Tue, 4 Dec 2012 13:25:52 +0000 (05:25 -0800)]
logrotate: do not spam stdout

Avoid anything on stdout that will generate cron emails for people.

Reported-by: Stefan Priebe <s.priebe@profihost.ag>
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'master' of http://github.com/ceph/ceph
Gary Lowell [Tue, 4 Dec 2012 05:31:14 +0000 (21:31 -0800)]
Merge branch 'master' of http://github.com/ceph/ceph

12 years agoMerge branch 'next'
Gary Lowell [Tue, 4 Dec 2012 05:29:52 +0000 (21:29 -0800)]
Merge branch 'next'

12 years agodoc: Added a striping section for Architecture.
John Wilkins [Tue, 4 Dec 2012 04:48:02 +0000 (20:48 -0800)]
doc: Added a striping section for Architecture.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agov0.55 v0.55
Gary Lowell [Tue, 4 Dec 2012 03:08:35 +0000 (19:08 -0800)]
v0.55

12 years agoceph.spec.in: Add SLES and remove Fedora from debug package list.
Gary Lowell [Tue, 4 Dec 2012 03:06:42 +0000 (19:06 -0800)]
ceph.spec.in:  Add SLES and remove Fedora from debug package list.

12 years agoMerge branch 'next'
Sage Weil [Mon, 3 Dec 2012 23:33:29 +0000 (15:33 -0800)]
Merge branch 'next'