]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
11 years agoautoconf: check for res_nquery explicitly 823/head
Noah Watkins [Sat, 21 Sep 2013 16:29:47 +0000 (09:29 -0700)]
autoconf: check for res_nquery explicitly

Creates a test that checks explicitly for res_nquery, which can be a
macro in resolv.h. Defines RESOLV_LIBS that contains any libraries that
need to be linked against.

Notes from later fix:

Based on the 2013-09-30 version of wip-port.  On FreeBSD, one must
include netinet/in.h to get the definitions for stuff in resolv.h.
Also, resolv.h's functions are part of libc instead of libresolv.

Signed-off-by: Alan Somers <asomers@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agoMerge pull request #816 from ceph/wip-fadvise
Sage Weil [Tue, 5 Nov 2013 13:31:57 +0000 (05:31 -0800)]
Merge pull request #816 from ceph/wip-fadvise

wbthrottle: use posix_fadvise if available

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #815 from ceph/wip-static-cast
Sage Weil [Tue, 5 Nov 2013 13:29:54 +0000 (05:29 -0800)]
Merge pull request #815 from ceph/wip-static-cast

assert: use feature test for static_cast

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #813 from ceph/wip-blkdev
Sage Weil [Tue, 5 Nov 2013 13:27:40 +0000 (05:27 -0800)]
Merge pull request #813 from ceph/wip-blkdev

support blkdev size query on osx/freebsd

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #803 from ceph/wip-6698
Sage Weil [Tue, 5 Nov 2013 02:37:59 +0000 (18:37 -0800)]
Merge pull request #803 from ceph/wip-6698

upstart: fix ceph-crush-location default

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoassert: use feature test for static_cast 815/head
Noah Watkins [Sun, 21 Jul 2013 01:41:38 +0000 (18:41 -0700)]
assert: use feature test for static_cast

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agowbthrottle: use posix_fadvise if available 816/head
Noah Watkins [Sun, 21 Jul 2013 01:41:39 +0000 (18:41 -0700)]
wbthrottle: use posix_fadvise if available

Only adding information about data usage. This won't effect correctness.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agotest: test helper for get_block_device_size 813/head
Noah Watkins [Mon, 4 Nov 2013 16:28:23 +0000 (08:28 -0800)]
test: test helper for get_block_device_size

This is the start of a potential unit test for get_block_device_size. An
actual unit test will probably need to be run as root, and either find a
device, have one specified, or create one (e.g. ramdisk)  in a platform
agnostic way. In the mean time, this tool can be run by hand, or called
for a bash script.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agoblkdev: support blkdev size query on osx
Noah Watkins [Sun, 21 Jul 2013 01:41:39 +0000 (18:41 -0700)]
blkdev: support blkdev size query on osx

Support OSX, add checks for platform specific headers.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agoMerge pull request #812 from ceph/revert-struct-init
Sage Weil [Mon, 4 Nov 2013 15:58:49 +0000 (07:58 -0800)]
Merge pull request #812 from ceph/revert-struct-init

Revert "fix -Wgnu-designator warnings"

11 years agoRevert "fix -Wgnu-designator warnings" 812/head
Noah Watkins [Mon, 4 Nov 2013 14:18:45 +0000 (06:18 -0800)]
Revert "fix -Wgnu-designator warnings"

Struct initialization using dot notation as in C99, but that happens to
not be valid C++, although apparently in C++11 it is valid. We'll need a
way to keep clang from throwing warnings at this initialization style,
either using some macros to detect the comiler environment, or perhaps
moving struct initialization to a C file rather than C++.

This reverts commit 6efc2b54d5ce85fcb4b66237b051bcbb5072e6a3.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agotest/libcephfs: free cmount after tests finishes
Xing Lin [Sun, 3 Nov 2013 06:05:58 +0000 (00:05 -0600)]
test/libcephfs: free cmount after tests finishes

unmount and release cmount at the end of tests

Signed-off-by: Xing Lin <xinglin@cs.utah.edu>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #790 from ceph/wip-warnings
Sage Weil [Sun, 3 Nov 2013 05:17:46 +0000 (22:17 -0700)]
Merge pull request #790 from ceph/wip-warnings

ease clang's anxieties

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #793 from ceph/wip-pipe
Sage Weil [Sun, 3 Nov 2013 05:16:18 +0000 (22:16 -0700)]
Merge pull request #793 from ceph/wip-pipe

pipe: use pipe2 feature test; check fcntl retval

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoupstart: fix ceph-crush-location default 803/head
Sage Weil [Fri, 1 Nov 2013 23:45:01 +0000 (16:45 -0700)]
upstart: fix ceph-crush-location default

Behave if it is not specified on ceph.conf.  (init-ceph also falls back
to the default.)

Fixes: #6698
Signed-off-by: Sage Weil <sage@inktank.com>
11 years agodoc: radosgw workaround for OpenStack Horizon bug
Loic Dachary [Tue, 29 Oct 2013 15:13:56 +0000 (16:13 +0100)]
doc: radosgw workaround for OpenStack Horizon bug

Signed-off-by: Loic Dachary <loic@dachary.org>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agodoc: fix typo in openstack radosgw integration
Loic Dachary [Tue, 29 Oct 2013 14:36:31 +0000 (15:36 +0100)]
doc: fix typo in openstack radosgw integration

s/type-object store/type object-store/

Signed-off-by: Loic Dachary <loic@dachary.org>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agomon/OSDMonitor: refix warning
Sage Weil [Thu, 31 Oct 2013 16:49:09 +0000 (09:49 -0700)]
mon/OSDMonitor: refix warning

mon/OSDMonitor.cc: In member function 'int OSDMonitor::_prepare_rename_pool(int64_t, std::string)':
mon/OSDMonitor.cc:4370:55: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

Two fixes for this crossed paths in
0c186096bb9534165394046fd8dd914e1be44094 and
2181b4c94696432814fea828a7efa54586b324a4

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agopipe: use pipe2 feature test; check fcntl retval 793/head
Noah Watkins [Sun, 21 Jul 2013 01:41:40 +0000 (18:41 -0700)]
pipe: use pipe2 feature test; check fcntl retval

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agofix -Wmismatched-tags warnings 790/head
Noah Watkins [Wed, 30 Oct 2013 14:51:43 +0000 (07:51 -0700)]
fix -Wmismatched-tags warnings

Example: warning: class 'ObjecterDispatcher' was previously declared as
a struct [-Wmismatched-tags]

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agofix -Wgnu-designator warnings
Noah Watkins [Wed, 30 Oct 2013 14:50:03 +0000 (07:50 -0700)]
fix -Wgnu-designator warnings

Example: warning: use of GNU old-style field designator extension
[-Wgnu-designator]

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agoOSD: remove unused private var [-Wunused-private-field]
Noah Watkins [Wed, 30 Oct 2013 18:58:53 +0000 (11:58 -0700)]
OSD: remove unused private var [-Wunused-private-field]

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agoCrushTester: remove unused private var [-Wunused-private-field]
Noah Watkins [Wed, 30 Oct 2013 18:58:29 +0000 (11:58 -0700)]
CrushTester: remove unused private var [-Wunused-private-field]

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agoauth: remove unused private var [-Wunused-private-field]
Noah Watkins [Wed, 30 Oct 2013 18:55:00 +0000 (11:55 -0700)]
auth: remove unused private var [-Wunused-private-field]

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agocommon/buffer.cc: fix rebuild_page_aligned typo
Samuel Just [Fri, 1 Nov 2013 20:39:16 +0000 (13:39 -0700)]
common/buffer.cc: fix rebuild_page_aligned typo

Introduced: 66a9fbe2c7ba59b7cd034c17865adce3432cd2cb
Fixes: #6003
Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agotest: add gcc compile test for installed headers
Noah Watkins [Thu, 31 Oct 2013 16:20:51 +0000 (09:20 -0700)]
test: add gcc compile test for installed headers

libcephfs/librados headers should work with gcc.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agolibcephfs: Fix compilation for C compiler
Christophe Courtaut [Thu, 31 Oct 2013 16:43:35 +0000 (17:43 +0100)]
libcephfs: Fix compilation for C compiler

Use struct instead of class, even if it warns.

Warnings are lower priority than compilation break.

Signed-off-by: Christophe Courtaut <christophe.courtaut@gmail.com>
11 years agoceph: Fix compilation with GCC compiler
Christophe Courtaut [Thu, 31 Oct 2013 16:07:56 +0000 (17:07 +0100)]
ceph: Fix compilation with GCC compiler

Signed-off-by: Christophe Courtaut <christophe.courtaut@gmail.com>
11 years agoMerge branch 'next'
Sage Weil [Fri, 1 Nov 2013 23:08:14 +0000 (16:08 -0700)]
Merge branch 'next'

11 years agoReally use the hostname, otherwise ambiguous
David Moreau Simard [Fri, 1 Nov 2013 20:42:33 +0000 (16:42 -0400)]
Really use the hostname, otherwise ambiguous

"hostname" can return either the hostname or the fqdn depending on
configuration.
This refers to the issue http://tracker.ceph.com/issues/6706

Signed-off-by: David Moreau Simard <dmsimard@iweb.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoceph-object-corpus: revert accidental revert
Sage Weil [Thu, 31 Oct 2013 15:12:24 +0000 (08:12 -0700)]
ceph-object-corpus: revert accidental revert

from 5df3024d7847950672169069b9dc8c8dcb876019

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agodocs: Fix a typo in RGW documentation
Wido den Hollander [Thu, 31 Oct 2013 11:42:27 +0000 (12:42 +0100)]
docs: Fix a typo in RGW documentation

11 years agoMerge pull request #792 from ceph/wip-doc-openstack
Sage Weil [Fri, 1 Nov 2013 23:07:21 +0000 (16:07 -0700)]
Merge pull request #792 from ceph/wip-doc-openstack

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoMerge pull request #766 from kri5/wip-5374
Sage Weil [Fri, 1 Nov 2013 23:06:52 +0000 (16:06 -0700)]
Merge pull request #766 from kri5/wip-5374

Rebase of Wip 5374 against master

Reviewed-by: Yehuda Sadeh <yehdua@inktank.com>
11 years agoWrap hex_to_num table into class HexTable
Ray Lv [Wed, 30 Oct 2013 03:40:54 +0000 (11:40 +0800)]
Wrap hex_to_num table into class HexTable

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
11 years ago[rgw] Set initialized to true after populating table in hex_to_num()
Ray Lv [Tue, 29 Oct 2013 11:34:51 +0000 (19:34 +0800)]
[rgw] Set initialized to true after populating table in hex_to_num()

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agosharedptr_registry.hpp: removed ptrs need to not blast contents
Samuel Just [Thu, 31 Oct 2013 20:19:32 +0000 (13:19 -0700)]
sharedptr_registry.hpp: removed ptrs need to not blast contents

See the included unit test update.  Consider:
1) x = lookup_or_create(1, 1)
2) remove(1)
3) y = lookup_or_create(1, 2)
4) x.reset()
5) z = lookup(1)

The bug is that z will be null since x.reset() caused the
cleanup callback to remove y's key value from contents.

To fix this, contents also records the pointer value for
the weak_ptr.  The removal callback only removes the
key from contents if it matches the ptr in contents.

This should work since the pointer passed to the removal
callback must be unique up to that point since it has
not yet been deleted.

This allowed a pg removal -> pg recreation -> pg removal
sequence to cause the second pg removal entry to be
erroneously cleared by the first pg removal's destructor
as it finally made its way through the removal queue.

Fixes: #5951
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoprio-q: initialize cur iterator
Noah Watkins [Wed, 30 Oct 2013 23:34:29 +0000 (16:34 -0700)]
prio-q: initialize cur iterator

For new SubQueues `cur` is not intialized, so front/pop_front will freak
out. I honestly I have no idea how this hasn't been seen, but it was
being triggered frequently on OSX.

Fixes: #6686
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoPGLog: remove obsolete assert in merge_log
Samuel Just [Wed, 30 Oct 2013 23:54:39 +0000 (16:54 -0700)]
PGLog: remove obsolete assert in merge_log

This assert assumes that if olog.head != log.head, olog contains
a log entry at log.head, which may not be true since pg splitting
might have left the log with arbitrary holes.

Related: 0c2769d3321bff6e85ec57c85a08ee0b8e751bcb
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agotest/osd/RadosModel.h: select and reserve roll_back_to atomically
Samuel Just [Wed, 30 Oct 2013 23:12:19 +0000 (16:12 -0700)]
test/osd/RadosModel.h: select and reserve roll_back_to atomically

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agotest/rados/list.cc: we might get some objects more than once
Samuel Just [Tue, 29 Oct 2013 21:53:53 +0000 (14:53 -0700)]
test/rados/list.cc: we might get some objects more than once

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoos/chain_listxattr: fix leak fix
Sage Weil [Wed, 30 Oct 2013 20:20:46 +0000 (13:20 -0700)]
os/chain_listxattr: fix leak fix

e22347df3854a5c5ebc6631c62d70447d67d722d added a bad goto; just free
explicitly instead.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Noah Watkins <noahwatkins@gmail.com>
11 years agodoc: Removed the Folsom reference. 792/head
John Wilkins [Thu, 31 Oct 2013 00:53:37 +0000 (17:53 -0700)]
doc: Removed the Folsom reference.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agodoc: Restored show_image_direct and added a link to older versions.
John Wilkins [Thu, 31 Oct 2013 00:44:24 +0000 (17:44 -0700)]
doc: Restored show_image_direct and added a link to older versions.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agodoc: Removed nova-volume, early Ceph references and Folsom references.
John Wilkins [Thu, 31 Oct 2013 00:21:14 +0000 (17:21 -0700)]
doc: Removed nova-volume, early Ceph references and Folsom references.

fixes: 5006

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agodoc/release-notes: formatting
Sage Weil [Wed, 30 Oct 2013 21:19:45 +0000 (14:19 -0700)]
doc/release-notes: formatting

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agodoc/release-notes: fix formatting
Sage Weil [Wed, 30 Oct 2013 21:08:08 +0000 (14:08 -0700)]
doc/release-notes: fix formatting

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agodoc/release-notes: fix indentation
Sage Weil [Tue, 29 Oct 2013 23:10:16 +0000 (16:10 -0700)]
doc/release-notes: fix indentation

ERROR: /srv/autobuild-ceph/gitbuilder.git/build/doc/release-notes.rst:48: Unexpected indentation.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge branch 'next'
Gary Lowell [Wed, 30 Oct 2013 18:41:10 +0000 (18:41 +0000)]
Merge branch 'next'

11 years agoMerge branch 'next' of jenkins:ceph/ceph into next
Gary Lowell [Wed, 30 Oct 2013 18:34:42 +0000 (18:34 +0000)]
Merge branch 'next' of jenkins:ceph/ceph into next

11 years agoceph: Release resource before return in BackedObject::download()
Li Wang [Wed, 30 Oct 2013 13:32:34 +0000 (21:32 +0800)]
ceph: Release resource before return in BackedObject::download()

Close file before return

Signed-off-by: Li Wang <liwang@ubuntukylin.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoceph: Fix memory leak in chain_listxattr
Li Wang [Wed, 30 Oct 2013 08:39:09 +0000 (16:39 +0800)]
ceph: Fix memory leak in chain_listxattr

Free allocated memory before return

Signed-off-by: Li Wang <liwang@ubuntukylin.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoFix memory leak in Backtrace::print()
Li Wang [Wed, 30 Oct 2013 08:18:10 +0000 (16:18 +0800)]
Fix memory leak in Backtrace::print()

Free already allocated memory if short of memory

Signed-off-by: Li Wang <liwang@ubuntukylin.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agov0.72-rc1 v0.72-rc1
Gary Lowell [Wed, 30 Oct 2013 00:45:10 +0000 (00:45 +0000)]
v0.72-rc1

11 years agoMerge pull request #788 from ceph/wip-6605
João Eduardo Luís [Tue, 29 Oct 2013 23:34:14 +0000 (16:34 -0700)]
Merge pull request #788 from ceph/wip-6605

mon: OSDMonitor: only allow an osd to boot iff it has the fsid on record

Fixes: #6605
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge remote-tracking branch 'gh/wip-crush-hook'
Sage Weil [Tue, 29 Oct 2013 22:06:13 +0000 (15:06 -0700)]
Merge remote-tracking branch 'gh/wip-crush-hook'

Reviewed-by: Loic Dachary <loic@dachary.org>
11 years agoupstart, sysvinit: use ceph-crush-location hook
Sage Weil [Tue, 29 Oct 2013 18:08:58 +0000 (11:08 -0700)]
upstart, sysvinit: use ceph-crush-location hook

Instead of hard-coding a check in ceph.conf and some reasonable
defaults, defer this work to ceph-crush-location, and allow users to
specify their own hook with alternative logic.

This can be helpful in a nubmer of cases, like:

 - rack (or other) information included in hostname and easily parsed
   out by a hook
 - multiple types of devices in each host, resulting in 'parallel'
   crush trees (e.g., one for hdd, one for ssd)

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph-crush-location: new crush location hook
Sage Weil [Tue, 29 Oct 2013 18:03:04 +0000 (11:03 -0700)]
ceph-crush-location: new crush location hook

This generalizes the bit of code that builds a key=value pair list to
update an entity's CRUSH location.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoRevert "ceph-crush-location: new crush location hook"
Sage Weil [Tue, 29 Oct 2013 20:58:14 +0000 (13:58 -0700)]
Revert "ceph-crush-location: new crush location hook"

This reverts commit fc49065d855cfd74cb861d294f3464dd616e82ee.

Merged to wrong branch; my bad!

11 years agoRevert "upstart, sysvinit: use ceph-crush-location hook"
Sage Weil [Tue, 29 Oct 2013 20:58:10 +0000 (13:58 -0700)]
Revert "upstart, sysvinit: use ceph-crush-location hook"

This reverts commit 111a37efb19cb46a48d669bc9866c29b4015a889.

11 years agomon: OSDMonitor: fix comparison between signed and unsigned integer warning 787/head 788/head
Joao Eduardo Luis [Tue, 29 Oct 2013 20:36:05 +0000 (20:36 +0000)]
mon: OSDMonitor: fix comparison between signed and unsigned integer warning

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agomon: OSDMonitor: only allow an osd to boot iff it has the fsid on record
Joao Eduardo Luis [Tue, 29 Oct 2013 20:35:25 +0000 (20:35 +0000)]
mon: OSDMonitor: only allow an osd to boot iff it has the fsid on record

Fixes: #6605
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agomon: OSDMonitor: fix some annoying whitespace
Joao Eduardo Luis [Tue, 29 Oct 2013 20:30:37 +0000 (20:30 +0000)]
mon: OSDMonitor: fix some annoying whitespace

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agoMerge pull request #779 from ceph/wip-crush-hook
Loic Dachary [Tue, 29 Oct 2013 19:24:05 +0000 (12:24 -0700)]
Merge pull request #779 from ceph/wip-crush-hook

upstart,sysvinit: allow 'osd crush location hook' script to determine osd crush position

Reviewed-by: Loic Dachary <loic@dachary.org>
11 years agoupstart, sysvinit: use ceph-crush-location hook 779/head
Sage Weil [Tue, 29 Oct 2013 18:08:58 +0000 (11:08 -0700)]
upstart, sysvinit: use ceph-crush-location hook

Instead of hard-coding a check in ceph.conf and some reasonable
defaults, defer this work to ceph-crush-location, and allow users to
specify their own hook with alternative logic.

This can be helpful in a nubmer of cases, like:

 - rack (or other) information included in hostname and easily parsed
   out by a hook
 - multiple types of devices in each host, resulting in 'parallel'
   crush trees (e.g., one for hdd, one for ssd)

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph-crush-location: new crush location hook
Sage Weil [Tue, 29 Oct 2013 18:03:04 +0000 (11:03 -0700)]
ceph-crush-location: new crush location hook

This generalizes the bit of code that builds a key=value pair list to
update an entity's CRUSH location.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #786 from ceph/wip-6673
Sage Weil [Tue, 29 Oct 2013 17:16:52 +0000 (10:16 -0700)]
Merge pull request #786 from ceph/wip-6673

mon/PGMonitor: always send pg creations after mapping

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agomon/PGMonitor: always send pg creations after mapping 786/head
Sage Weil [Tue, 29 Oct 2013 17:10:21 +0000 (10:10 -0700)]
mon/PGMonitor: always send pg creations after mapping

At some point in the dumpling cycle I separated the map stage from the
send stage.  We can send the creates any time we have a non-zero osdmap
epoch, and are in good shape as long as we do the map step after the
osdmap is loaded (hence the post_paxos_update).

Some background:

We originally introduced the map-but-don't send in a2fe0137, at which
point all was well because we only called it on ceph-mon startup.

Later, this turned into post_paxos_update in e635c478, at which point
it was now called by a running monitor.. but we didn't add in the
send_pg_creates().  This is where this bug stems from.

This particular path is responsible for the stalled test referenced in
bug #6673.

Backport: dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
11 years agomon/OSDMonitor: fix signedness warning on poolid
Sage Weil [Tue, 29 Oct 2013 15:59:06 +0000 (08:59 -0700)]
mon/OSDMonitor: fix signedness warning on poolid

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge remote-tracking branch 'upstream/next'
Samuel Just [Tue, 29 Oct 2013 15:27:54 +0000 (08:27 -0700)]
Merge remote-tracking branch 'upstream/next'

11 years agoReplicatedPG::recover_backfill: update last_backfill to max() when backfill is complete
Samuel Just [Tue, 29 Oct 2013 06:05:30 +0000 (23:05 -0700)]
ReplicatedPG::recover_backfill: update last_backfill to max() when backfill is complete

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoReplicatedPG: src_obcs can now be empty
Samuel Just [Tue, 29 Oct 2013 06:35:00 +0000 (23:35 -0700)]
ReplicatedPG: src_obcs can now be empty

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge remote-tracking branch 'upstream/next'
Samuel Just [Tue, 29 Oct 2013 05:51:04 +0000 (22:51 -0700)]
Merge remote-tracking branch 'upstream/next'

11 years agoMerge pull request #773 from dachary/wip-6614
Sage Weil [Tue, 29 Oct 2013 04:15:32 +0000 (21:15 -0700)]
Merge pull request #773 from dachary/wip-6614

common: rebuild_page_aligned sometimes rebuilds unaligned

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #780 from ceph/wip-6585
athanatos [Tue, 29 Oct 2013 04:11:27 +0000 (21:11 -0700)]
Merge pull request #780 from ceph/wip-6585

Wip 6585

Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge pull request #775 from ceph/wip-readdirend
Sage Weil [Tue, 29 Oct 2013 04:01:27 +0000 (21:01 -0700)]
Merge pull request #775 from ceph/wip-readdirend

mds: fix readdir end check

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agomds: fix readdir end check 775/head
Yan, Zheng [Sun, 27 Oct 2013 09:11:11 +0000 (17:11 +0800)]
mds: fix readdir end check

If the last item in the directory is a remote link and the corresponding
inode is not in cache, the readir reply will not contain the last item.
But iterator 'it' is equal to dir->end() in this case, it causes the 'end'
flag of the readdir reply be set to true.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agoMerge pull request #777 from ceph/wip-scripts
Josh Durgin [Tue, 29 Oct 2013 00:12:26 +0000 (17:12 -0700)]
Merge pull request #777 from ceph/wip-scripts

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoosd/ReplicatedPG: use MIN for backfill_pos 780/head
Sage Weil [Mon, 28 Oct 2013 23:39:09 +0000 (16:39 -0700)]
osd/ReplicatedPG: use MIN for backfill_pos

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #772 from ceph/wip-5612
Loic Dachary [Mon, 28 Oct 2013 23:13:34 +0000 (16:13 -0700)]
Merge pull request #772 from ceph/wip-5612

init-ceph, upstart: make crush update on osd start time out

Reviewed-by: Loic Dachary <loic@dachary.org>
11 years agoReplicatedPG: recover_backfill: don't prematurely adjust last_backfill
Samuel Just [Mon, 28 Oct 2013 23:09:59 +0000 (16:09 -0700)]
ReplicatedPG: recover_backfill: don't prematurely adjust last_backfill

We can't adjust last_backfill to object x until x has been fully
backfilled.  pending_backfill_updates contains all those backfills
started, but which have not yet been reflected in pinfo.last_update.
backfills_in_flight contains those backfills which have not yet
completed.  Thus, we can adjust last_update to the largest entry
in pending_backfill_updates not in backfills_in_flight.

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoReplicatedPG: add empty stat when we remove an object in recover_backfill
Samuel Just [Mon, 28 Oct 2013 23:03:25 +0000 (16:03 -0700)]
ReplicatedPG: add empty stat when we remove an object in recover_backfill

Subsequent updates to that object need to have their stats added
to the backfill info stats atomically with the last_backfill
update.

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoReplicatedPG: replace backfill_pos with last_backfill_started
Samuel Just [Mon, 28 Oct 2013 22:53:24 +0000 (15:53 -0700)]
ReplicatedPG: replace backfill_pos with last_backfill_started

last_backfill_started reflects what pinfo.last_backfill will be
once all currently outstanding backfills complete.  backfill_pos
was tricky since we couldn't correctly inialize it without
doing the first backfill scan pair.

In recover_backfill, we rescan from last_backfill_started rather
than from backfill_pos.  This ensures that we capture all clones
created between last_backfill_started and what previously had been
backfill_pos without special handling in make_writeable.  The main
downside is that we will tend to "rescan" last_backfill_started.

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoPG::BackfillInfo: introduce trim_to
Samuel Just [Mon, 28 Oct 2013 22:49:58 +0000 (15:49 -0700)]
PG::BackfillInfo: introduce trim_to

We'll use this to trim off last_backfill_started since it'll
often be included in rescans.

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoPG::BackfillInterval: use trim() in pop_front()
Samuel Just [Mon, 28 Oct 2013 22:49:23 +0000 (15:49 -0700)]
PG::BackfillInterval: use trim() in pop_front()

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoReplicatedPG::prepare_transaction: info.last_backfill is inclusive
Samuel Just [Mon, 28 Oct 2013 22:22:37 +0000 (15:22 -0700)]
ReplicatedPG::prepare_transaction: info.last_backfill is inclusive

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoupstart: fail osd start if crush update fails 772/head
Sage Weil [Mon, 28 Oct 2013 22:56:36 +0000 (15:56 -0700)]
upstart: fail osd start if crush update fails

If the update for the CRUSH position fails for some reason, do not
start the OSD.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoinit-ceph: make crush update on osd start time out
Sage Weil [Mon, 28 Oct 2013 22:56:15 +0000 (15:56 -0700)]
init-ceph: make crush update on osd start time out

If the monitor is not currently available, this crush update would block
forever, preventing the OSD and (potentially) the rest of the system
from starting up.  Instead, make it time out after 10 seconds and then
abort startup.  This prevents startup of an OSD if we failed to update
the CRUSH position for some reason.

In fact, do not start up the OSD if the CRUSH update fails for any
reason--not just a timeout!

Works-around: #5612
Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #771 from ceph/wip-ceph-context
Sage Weil [Mon, 28 Oct 2013 21:48:24 +0000 (14:48 -0700)]
Merge pull request #771 from ceph/wip-ceph-context

ceph_context: replace semaphore

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agopybind: use find_library for libcephfs and librbd 777/head
Noah Watkins [Mon, 28 Oct 2013 21:37:07 +0000 (14:37 -0700)]
pybind: use find_library for libcephfs and librbd

Use find_library to avoid assumptions about platform shared library
naming conventions.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agoMerge pull request #778 from ceph/wip-6621
Sage Weil [Mon, 28 Oct 2013 21:28:25 +0000 (14:28 -0700)]
Merge pull request #778 from ceph/wip-6621

radosgw-admin: accept negative values for quota params

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoradosgw-admin: accept negative values for quota params 778/head
Yehuda Sadeh [Mon, 28 Oct 2013 20:36:45 +0000 (13:36 -0700)]
radosgw-admin: accept negative values for quota params

and document that in the usage output.

Fixes: #6621
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoMerge pull request #760 from ceph/wip-6585
athanatos [Mon, 28 Oct 2013 20:50:34 +0000 (13:50 -0700)]
Merge pull request #760 from ceph/wip-6585

Wip 6585

Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoReplicatedPG: no need to clear repop->*obc
Samuel Just [Mon, 28 Oct 2013 20:49:23 +0000 (13:49 -0700)]
ReplicatedPG: no need to clear repop->*obc

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge remote-tracking branch 'upstream/next' into wip-obc
Samuel Just [Mon, 28 Oct 2013 20:47:39 +0000 (13:47 -0700)]
Merge remote-tracking branch 'upstream/next' into wip-obc

11 years agodoc/release-notes: emperor blurb
Sage Weil [Mon, 28 Oct 2013 20:53:11 +0000 (13:53 -0700)]
doc/release-notes: emperor blurb

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoReplicatedBackend: don't hold ObjectContexts in pull completion callback 760/head
Samuel Just [Mon, 28 Oct 2013 18:02:34 +0000 (11:02 -0700)]
ReplicatedBackend: don't hold ObjectContexts in pull completion callback

We need flushing the sequencer to ensure that all Contexts which hold
ObjectContextRefs have been run or deleted.
C_ReplicatedBackend_OnPullComplete, however, gets queued in a second
work queue in order to avoid performing expensive push related reads
in the FileStore finisher.

Rather than keep the objects contexts around, we instead put off
removing the object from the pulling map until the call back
fires and read the object context out of the pulling map.  This
way the ObjectContextRef will be cleaned up along with the rest
of the pulling map in on_change.

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoReplicatedPG: put repops even in TrimObjects
Samuel Just [Sun, 27 Oct 2013 03:21:25 +0000 (20:21 -0700)]
ReplicatedPG: put repops even in TrimObjects

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoReplicatedPG: improved on_flushed error output
Samuel Just [Sun, 27 Oct 2013 01:24:41 +0000 (18:24 -0700)]
ReplicatedPG: improved on_flushed error output

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoPG: call on_flushed on FlushEvt
Samuel Just [Sat, 26 Oct 2013 23:46:22 +0000 (16:46 -0700)]
PG: call on_flushed on FlushEvt

Signed-off-by: Samuel Just <sam.just@inktank.com>