]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
11 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Fri, 4 Oct 2013 04:23:05 +0000 (21:23 -0700)]
Merge remote-tracking branch 'gh/next'

Conflicts:
src/Makefile.am

11 years agoPendingReleaseNotes: fix typo
Josh Durgin [Fri, 4 Oct 2013 03:07:13 +0000 (20:07 -0700)]
PendingReleaseNotes: fix typo

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoMerge pull request #557 from ceph/wip-5896
Sage Weil [Fri, 4 Oct 2013 01:27:58 +0000 (18:27 -0700)]
Merge pull request #557 from ceph/wip-5896

mon: MonmapMonitor: make 'ceph mon add' idempotent

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoPendingReleaseNotes: make a note about K vs k
Sage Weil [Fri, 4 Oct 2013 00:05:41 +0000 (17:05 -0700)]
PendingReleaseNotes: make a note about K vs k

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #686 from ceph/wip-rbd-cli-tests
Sage Weil [Fri, 4 Oct 2013 00:03:13 +0000 (17:03 -0700)]
Merge pull request #686 from ceph/wip-rbd-cli-tests

qa: fix rbd cli tests checking size

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoqa: fix rbd cli tests checking size 686/head
Josh Durgin [Thu, 3 Oct 2013 22:16:09 +0000 (15:16 -0700)]
qa: fix rbd cli tests checking size

b43bc1a0b0692818d789f9f489b9aba5dd40522f changed the kilo prefix
from K to k in a few places.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoMerge pull request #684 from git-harry/ceph_disk_lowercase_fsid
Sage Weil [Thu, 3 Oct 2013 21:50:25 +0000 (14:50 -0700)]
Merge pull request #684 from git-harry/ceph_disk_lowercase_fsid

Make fsid comparison case-insensitive

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agodoc: Fixed typo.
John Wilkins [Thu, 3 Oct 2013 20:30:18 +0000 (13:30 -0700)]
doc: Fixed typo.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agoMerge pull request #685 from ceph/wip-rados-ints
Dan Mick [Thu, 3 Oct 2013 19:19:50 +0000 (12:19 -0700)]
Merge pull request #685 from ceph/wip-rados-ints

librados: drop #include of int_types.h from installed headers

Reviewed-by: Dan Mick <dan.mick@inktank.com>
11 years agolibrados: drop #include of int_types.h from installed headers 685/head
Sage Weil [Thu, 3 Oct 2013 19:16:55 +0000 (12:16 -0700)]
librados: drop #include of int_types.h from installed headers

These are unnecessary, and breaks compilation for outside users.

Prefer inttypes.h over stdint.h.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #638 from ceph/wip-bloom
Loic Dachary [Thu, 3 Oct 2013 19:13:41 +0000 (12:13 -0700)]
Merge pull request #638 from ceph/wip-bloom

bloom filter cleanups, encodability, and unit tests

11 years agoMerge pull request #653 from ceph/wip-mon-auth
Sage Weil [Thu, 3 Oct 2013 18:32:50 +0000 (11:32 -0700)]
Merge pull request #653 from ceph/wip-mon-auth

mon: Monitor: dissociate msg handling from session and connection logic

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agomon: Monitor: reuse 'src_is_mon' bool on dispatch 653/head
Joao Eduardo Luis [Wed, 2 Oct 2013 00:59:11 +0000 (01:59 +0100)]
mon: Monitor: reuse 'src_is_mon' bool on dispatch

Instead of making the same comparison twice with no gain at all.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agomon: Monitor: only handle paxos msgs from a mon && if session has exec caps
Joao Eduardo Luis [Mon, 23 Sep 2013 10:34:05 +0000 (11:34 +0100)]
mon: Monitor: only handle paxos msgs from a mon && if session has exec caps

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agomon: Monitor: dissociate msg handling from session & connection logic
Joao Eduardo Luis [Wed, 2 Oct 2013 00:56:55 +0000 (01:56 +0100)]
mon: Monitor: dissociate msg handling from session & connection logic

Makes for simpler logic for patches to come.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agomon: Monitor: drop client msg if no session exists and msg is not MAuth
Joao Eduardo Luis [Wed, 2 Oct 2013 00:54:09 +0000 (01:54 +0100)]
mon: Monitor: drop client msg if no session exists and msg is not MAuth

If we are not a monitor and we don't have a session yet, we must first
authenticate with the cluster.  Therefore, the first message to the
monitor must be an MAuth.  If not, we assume it's a stray message and
just drop it.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agomon: Monitor: assert on absense of connection during dispatch
Joao Eduardo Luis [Wed, 2 Oct 2013 00:50:29 +0000 (01:50 +0100)]
mon: Monitor: assert on absense of connection during dispatch

We expect to always have a connection associated with a message.
If that happens to not be so, assert.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agomon: MonmapMonitor: make 'ceph mon add' idempotent 557/head
Joao Eduardo Luis [Thu, 3 Oct 2013 18:07:12 +0000 (19:07 +0100)]
mon: MonmapMonitor: make 'ceph mon add' idempotent

MonMap changes lead to bootstraps.  Callbacks waiting for a proposal to
finish can have several fates, depending on what happens: finished, rerun
or aborted.

In the case of a bootstrap right after a monmap change, callbacks are
rerun.  Considering we queued the message that lead to the monmap change
on this queue, if we instead of finishing it end up reruning it, we will
end up trying to perform the same modification twice -- the last one will
try to modify an already existing state and we will return just that:
whatever you're attempting to do has already been done.

This patch makes 'ceph mon add' completely idempotent.  If one tries to
add an already existing monitor (i.e., same name, same ip:port), one
simply gets a 'monitor foo added', with return 0, no matter how many
times one runs the command.

Fixes: #5896
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agocommon/bloom_filter: note that uint32_t interface requires well-mixed values 638/head
Sage Weil [Thu, 3 Oct 2013 16:20:34 +0000 (09:20 -0700)]
common/bloom_filter: note that uint32_t interface requires well-mixed values

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agocommon/bloom_filter: speed up unit tests a bit
Sage Weil [Thu, 3 Oct 2013 16:14:34 +0000 (09:14 -0700)]
common/bloom_filter: speed up unit tests a bit

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agocommon/bloom_filter: test binning fpp behavior
Sage Weil [Thu, 26 Sep 2013 00:43:40 +0000 (17:43 -0700)]
common/bloom_filter: test binning fpp behavior

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agocommon/bloom_filter: disable sequential tests
Sage Weil [Wed, 25 Sep 2013 21:20:21 +0000 (14:20 -0700)]
common/bloom_filter: disable sequential tests

These are slow and are not useful.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agocommon/bloom_filter: insert/contains methods for uint32_t
Sage Weil [Fri, 20 Sep 2013 03:02:50 +0000 (20:02 -0700)]
common/bloom_filter: insert/contains methods for uint32_t

This will let us pass in an hobject_t::hash directly (for example) without
rehashing a string.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMake fsid comparison case-insensitive 684/head
git-harry [Thu, 3 Oct 2013 09:32:50 +0000 (10:32 +0100)]
Make fsid comparison case-insensitive

get_fsid and find_cluster_by_uuid are modified so ceph-disk activate and
ceph-disk activate-all will work if the fsid uses uppercase characters.

Signed-off-by: Harry Harrington <git-harry@live.co.uk>
11 years agoMerge pull request #682 from ceph/wip-copying
Loic Dachary [Wed, 2 Oct 2013 21:36:41 +0000 (14:36 -0700)]
Merge pull request #682 from ceph/wip-copying

sync up COPYING and debian/copyright

11 years agoCOPYING: fix URL 682/head
Sage Weil [Wed, 2 Oct 2013 21:30:19 +0000 (14:30 -0700)]
COPYING: fix URL

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agodebian/copyright: sync up with COPYING
Sage Weil [Wed, 2 Oct 2013 21:18:07 +0000 (14:18 -0700)]
debian/copyright: sync up with COPYING

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoCOPYING: add Packaging: section
Sage Weil [Wed, 2 Oct 2013 21:16:19 +0000 (14:16 -0700)]
COPYING: add Packaging: section

Again, debian-specific, but who cares.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoCOPYING: add debian-style headers
Sage Weil [Wed, 2 Oct 2013 21:15:13 +0000 (14:15 -0700)]
COPYING: add debian-style headers

This may not be necessary here, but it makes this identical to the
debian/copyright file, which is a win.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoCOPYING: fix formatting
Sage Weil [Wed, 2 Oct 2013 21:14:48 +0000 (14:14 -0700)]
COPYING: fix formatting

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoCOPYING: make note of common/bloom_filer.hpp (boost) license
Sage Weil [Fri, 20 Sep 2013 01:34:56 +0000 (18:34 -0700)]
COPYING: make note of common/bloom_filer.hpp (boost) license

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agocommon/bloom_filter: fix whitespace
Sage Weil [Fri, 20 Sep 2013 01:31:45 +0000 (18:31 -0700)]
common/bloom_filter: fix whitespace

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agocommon/bloom_filter: test behavior of sequences of bloom filters
Sage Weil [Fri, 20 Sep 2013 01:23:07 +0000 (18:23 -0700)]
common/bloom_filter: test behavior of sequences of bloom filters

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agocommon/bloom_filter: unit tests
Sage Weil [Fri, 20 Sep 2013 00:57:14 +0000 (17:57 -0700)]
common/bloom_filter: unit tests

Fun facts:

- fpp = false positive probability
- fpp is a function of insert count only
- at .1% fpp, we pay about 2 bytes per insert
- at 1-2% fpp, we pay about 1 byte per insert
- at 15% fpp, we pay about .5 bytes per insert

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #678 from ceph/wip-5981
Alfredo Deza [Wed, 2 Oct 2013 18:13:43 +0000 (11:13 -0700)]
Merge pull request #678 from ceph/wip-5981

ceph-disk: make initial journal files 0 bytes

11 years agoMerge pull request #649 from ceph/wip-6422
Sage Weil [Wed, 2 Oct 2013 17:51:29 +0000 (10:51 -0700)]
Merge pull request #649 from ceph/wip-6422

#6422

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #620 from dachary/wip-erasure-doc
athanatos [Wed, 2 Oct 2013 17:40:09 +0000 (10:40 -0700)]
Merge pull request #620 from dachary/wip-erasure-doc

ErasureCode: doc updates

11 years agoMerge pull request #677 from ceph/wip-store-tool
Sage Weil [Wed, 2 Oct 2013 17:16:21 +0000 (10:16 -0700)]
Merge pull request #677 from ceph/wip-store-tool

wip-store-tool: Few patches to ceph_test_store_tool

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #680 from dmick/next
Sage Weil [Wed, 2 Oct 2013 17:14:15 +0000 (10:14 -0700)]
Merge pull request #680 from dmick/next

mon/PGMap.cc: don't output header for pg dump_stuck if nothing stuck

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agocommon, os, osd: Use common functions for safe file reading and writing 649/head
David Zafman [Fri, 27 Sep 2013 00:42:13 +0000 (17:42 -0700)]
common, os, osd: Use common functions for safe file reading and writing

Add new safe_read_file() and safe_write_file() to update files atomically
Used instead of original OSD::read_meta(), OSD::write_meta() they are based on
Used by read_superblock() and write_superblock()
Used by write_version_stamp() and version_stamp_is_valid()

Fixes: #6422
Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoosd: In read_meta() leave an extra byte in buffer to nul terminate
David Zafman [Wed, 2 Oct 2013 17:00:10 +0000 (10:00 -0700)]
osd: In read_meta() leave an extra byte in buffer to nul terminate

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoErasureCode: update PGBackend description 620/head
Loic Dachary [Wed, 2 Oct 2013 13:06:27 +0000 (15:06 +0200)]
ErasureCode: update PGBackend description

Based on a dialog with Sam ( as published at http://dachary.org/?p=2320 ).

* Remove PGBackend-h.rst because PGBackend.h is now in master.

* Fix typos caught by ispell

* Update recovery links to point to PGBackend recover methods

* Workaround formating warning
  developer_notes.rst:3: WARNING: Duplicate explicit target name:
  "erasurecodepluginexample" which should be legitimate.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoErasureCode: doc updates
Loic Dachary [Sun, 22 Sep 2013 16:40:48 +0000 (18:40 +0200)]
ErasureCode: doc updates

* Update to the current state of the ghobject implementaiton and the fact
  that they encode the shard_t Although the pool also contains the shard
  id, it is less relevant to understand the implementation.

* Update with the erasure code plugin infrastructure and the example
  plugin now in master.

* Move jerasure to a separate page to be expanded and link it from the
  toc

* Kill the partial read and writes notes as it will probably not be
  implemented in the near future. Kill some of the notes because they
  are no longer relevant.

* Add a definition for "chunk rank"

* Reword, update schemas, fix typos.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #652 from dachary/wip-ghobjects
Loic Dachary [Wed, 2 Oct 2013 07:24:32 +0000 (00:24 -0700)]
Merge pull request #652 from dachary/wip-ghobjects

common: ghobject sort order & get_filestore_key

11 years agocommon: document ghobject sort order rationale 652/head
Loic Dachary [Fri, 27 Sep 2013 17:09:23 +0000 (19:09 +0200)]
common: document ghobject sort order rationale

Intuition differs regarding the sort order of the ghobject shard and
generation. Document the rationale for the chosen sort order.

Reviewed-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agocommon: ghobject get_filestore_key* use hobject counterpart
Loic Dachary [Fri, 27 Sep 2013 13:34:18 +0000 (15:34 +0200)]
common: ghobject get_filestore_key* use hobject counterpart

The get_filestore_key* methods are changed to just call the
corresponding hobject methods instead of providing an identical
implementation.

Reviewed-by: David Zafman <david.zafman@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon/PGMap.cc: don't output header for pg dump_stuck if nothing stuck 680/head
Dan Mick [Wed, 2 Oct 2013 05:23:24 +0000 (22:23 -0700)]
mon/PGMap.cc: don't output header for pg dump_stuck if nothing stuck

Formatted output is already correct (no header)

Fixes: #4577
Signed-off-by: Dan Mick <dan.mick@inktank.com>
11 years agomds: return -EAGAIN if standby replay falls behind
Yan, Zheng [Wed, 2 Oct 2013 03:43:12 +0000 (11:43 +0800)]
mds: return -EAGAIN if standby replay falls behind

standby replay may fall behind and get -ENOENT when reading the
journal. return -EAGAIN in this case, it makes the MDS respawn itself.

fixes: #5458

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoos/FileStore: report errors from _crc_load_... and _crc_save
Sage Weil [Wed, 2 Oct 2013 04:07:49 +0000 (21:07 -0700)]
os/FileStore: report errors from _crc_load_... and _crc_save

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #671 from ceph/wip-tmap
Sage Weil [Wed, 2 Oct 2013 01:01:04 +0000 (18:01 -0700)]
Merge pull request #671 from ceph/wip-tmap

remove tmap->omap auto-upgrade

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoceph_test_store_tool: add 'set prefix key' feature 677/head
Joao Eduardo Luis [Wed, 2 Oct 2013 00:30:19 +0000 (01:30 +0100)]
ceph_test_store_tool: add 'set prefix key' feature

Allow reading from a file.  See --help for more info.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agotest: test_store_tool: optionally output value crc when listing keys
Joao Eduardo Luis [Wed, 2 Oct 2013 00:22:40 +0000 (01:22 +0100)]
test: test_store_tool: optionally output value crc when listing keys

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agotest: test_store_tool: add 'crc <prefix> <key>' command
Joao Eduardo Luis [Tue, 1 Oct 2013 13:28:58 +0000 (14:28 +0100)]
test: test_store_tool: add 'crc <prefix> <key>' command

Returns the CRC of contents for a given key with a given prefix.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agorados: add 'tmap-to-omap' command 671/head
Sage Weil [Wed, 2 Oct 2013 00:19:24 +0000 (17:19 -0700)]
rados: add 'tmap-to-omap' command

Explicitly convert tmap object data to omap keys.  Removes the old tmap
content at the same time.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agorados: make 'tmap dump' gracefully handle non-tmap data
Sage Weil [Tue, 1 Oct 2013 22:22:05 +0000 (15:22 -0700)]
rados: make 'tmap dump' gracefully handle non-tmap data

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: remove magical tmap -> omap conversion
Sage Weil [Tue, 1 Oct 2013 21:21:40 +0000 (14:21 -0700)]
osd: remove magical tmap -> omap conversion

This is incomplete and unfortunately unusable in its current state:

 - it would only set USES_TMAP for old encoded object_info_t and tmapput,
   but would NOT set it for tmapup
 - a config option turned that off by default.

That means that the mds conversion from tmap -> omap won't be able to use
this because any existing cluster has tmap objects without the USES_TMAP
flag set.  And we don't want to unconditionally try a tmap->omap conversion
on omap operations because there are lots of existing librados users out
there that will be negatively impacted by this.

Instead, the MDS will need to handle this conversion on the client side by
reading either tmap or omap objects and explicitly rewriting the content
with omap (while truncating the tmap data away).

The auto-conversion function was added in v0.44.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #675 from ceph/wip-osd-dirty
Sage Weil [Wed, 2 Oct 2013 00:15:25 +0000 (17:15 -0700)]
Merge pull request #675 from ceph/wip-osd-dirty

osd: add a dirty flag for objects.

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoosd: add ISDIRTY, UNDIRTY rados operations 675/head
Sage Weil [Wed, 2 Oct 2013 00:04:44 +0000 (17:04 -0700)]
osd: add ISDIRTY, UNDIRTY rados operations

ISDIRTY will query whether the dirty flag is set on an object.  UNDIRTY
will explicitly clear it.  Note that a user doing so will likely run amok
with the caching code.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosdc/Objecter: fix return value for copy_get
Sage Weil [Tue, 1 Oct 2013 23:48:00 +0000 (16:48 -0700)]
osdc/Objecter: fix return value for copy_get

We should return the return code even when we don't have an encoding error!

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: mark objects dirty in make_writeable()
Sage Weil [Tue, 1 Oct 2013 23:24:20 +0000 (16:24 -0700)]
osd/ReplicatedPG: mark objects dirty in make_writeable()

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/osd_types: object_info_t::get_flag_string()
Sage Weil [Tue, 1 Oct 2013 23:23:21 +0000 (16:23 -0700)]
osd/osd_types: object_info_t::get_flag_string()

Stop adding these ad-hoc to the operator<<.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/osd_types: add object_info_t::FLAG_DIRTY
Sage Weil [Tue, 1 Oct 2013 23:19:48 +0000 (16:19 -0700)]
osd/osd_types: add object_info_t::FLAG_DIRTY

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #673 from liewegas/wip-usage
Dan Mick [Tue, 1 Oct 2013 23:19:09 +0000 (16:19 -0700)]
Merge pull request #673 from liewegas/wip-usage

make rbd, rados bad command errors more friendly

11 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Tue, 1 Oct 2013 23:01:24 +0000 (16:01 -0700)]
Merge remote-tracking branch 'gh/next'

Conflicts:
PendingReleaseNotes

11 years agocrush: invalidate rmap on create (and thus decode)
Sage Weil [Tue, 1 Oct 2013 22:53:42 +0000 (15:53 -0700)]
crush: invalidate rmap on create (and thus decode)

If we have an existing CrushWrapper object and decode from a bufferlist,
reset build_rmaps so that they get rebuilt.

Remove the build_rmaps() all in decode that was useless on a redecode
(because have_rmaps == true in that case and it did nothing).

Fixes: #6442
Backport: dumpling, maybe cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agoosd/osd_types: bump encoding from 11 -> 12
Sage Weil [Tue, 1 Oct 2013 22:32:59 +0000 (15:32 -0700)]
osd/osd_types: bump encoding from 11 -> 12

Meant to do this in a1b82f2a568ba211601c12b0b33474e982a3be6f or
d421b66293fb3d815ad2cd4c787dd2c39f48d6e8 but forgot!

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agorbd: be helpful with invalid command 673/head
Sage Weil [Tue, 1 Oct 2013 22:29:23 +0000 (15:29 -0700)]
rbd: be helpful with invalid command

$ rbd asdf
rbd: error parsing command 'asdf'; -h or --help for usage

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agorados: do not dump usage on invalid command
Sage Weil [Tue, 1 Oct 2013 22:27:38 +0000 (15:27 -0700)]
rados: do not dump usage on invalid command

I hate this; it makes it impossible to see that there was an error message.

We made this same change a while back with rbd.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #666 from dmick/wip-6384
Alfredo Deza [Tue, 1 Oct 2013 22:28:29 +0000 (15:28 -0700)]
Merge pull request #666 from dmick/wip-6384

ceph.in: clean up error message when missing required parameter

11 years agoMerge pull request #670 from ceph/wip-osd-whiteout
Sage Weil [Tue, 1 Oct 2013 21:18:52 +0000 (14:18 -0700)]
Merge pull request #670 from ceph/wip-osd-whiteout

osd: add basic whiteout infrastructure

Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoosd/osd_types: convert object_info_t::uses_tmap to a flag 670/head
Sage Weil [Tue, 1 Oct 2013 19:24:58 +0000 (12:24 -0700)]
osd/osd_types: convert object_info_t::uses_tmap to a flag

Treat the second encoded bool as bits 9-16 of a (now) 16-bit flags field,
and use bit 9 (what used to be set by the use_tmap bool) as FLAG_USES_TMAP.

No encoding compatibility change.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: update all find_object_context() users to handle whiteouts
Sage Weil [Tue, 1 Oct 2013 19:12:55 +0000 (12:12 -0700)]
osd/ReplicatedPG: update all find_object_context() users to handle whiteouts

In each case, we treat the whiteout as if we got an ENOENT.

We do not change the semantics of bool exists to avoid breaking lots of
potentially fragile code.  We are only interested in changing the
user-visible behavior of the object, not the way it is internally stored
or managed.

This will likely be refined as we grow acutal users for whiteoutes in the
pool caching code.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/osd_types: add WHITEOUT flag to object_info_t
Sage Weil [Fri, 27 Sep 2013 22:51:40 +0000 (15:51 -0700)]
osd/osd_types: add WHITEOUT flag to object_info_t

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd/osd_types: replace bool lost with a flags field
Sage Weil [Fri, 27 Sep 2013 22:50:50 +0000 (15:50 -0700)]
osd/osd_types: replace bool lost with a flags field

This is more generic.  We could also fold uses_tmap flag into here,
but the encoding change for that is non-trivial.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoAdd unit_to_bytesize test for 'k' on input; continues fix for #4612
Dan Mick [Tue, 1 Oct 2013 05:00:01 +0000 (22:00 -0700)]
Add unit_to_bytesize test for 'k' on input; continues fix for #4612

Signed-off-by: Dan Mick <dan.mick@inktank.com>
11 years agoMerge pull request #669 from ceph/wip-6443
Sage Weil [Tue, 1 Oct 2013 19:40:36 +0000 (12:40 -0700)]
Merge pull request #669 from ceph/wip-6443

ReplicatedPG: don't bless C_OSD_SendMessageOnConn

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoReplicatedPG: don't bless C_OSD_SendMessageOnConn 669/head
Samuel Just [Tue, 1 Oct 2013 19:22:00 +0000 (12:22 -0700)]
ReplicatedPG: don't bless C_OSD_SendMessageOnConn

C_OSD_SendMessageOnConn doesn't need to lock the pg.
Canceling it resulted in a leaked message.

Fixes: 6443
Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agomsgr: debug delay_thread join
Sage Weil [Fri, 27 Sep 2013 22:39:50 +0000 (15:39 -0700)]
msgr: debug delay_thread join

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoUse 'k' when printing 'kilo'; accept either 'K' or 'k' as input
Dan Mick [Tue, 1 Oct 2013 05:00:01 +0000 (22:00 -0700)]
Use 'k' when printing 'kilo'; accept either 'K' or 'k' as input

Fixes: #4612
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #659 from ceph/wip-objecter-notier
Sage Weil [Tue, 1 Oct 2013 17:41:42 +0000 (10:41 -0700)]
Merge pull request #659 from ceph/wip-objecter-notier

Wip objecter notier

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #668 from liewegas/wip-cache-stall
Josh Durgin [Tue, 1 Oct 2013 17:24:10 +0000 (10:24 -0700)]
Merge pull request #668 from liewegas/wip-cache-stall

osdc/ObjectCacher: limit writeback IOs generated while holding lock
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoMerge pull request #663 from ceph/wip-cancel-copy
Gregory Farnum [Tue, 1 Oct 2013 17:23:17 +0000 (10:23 -0700)]
Merge pull request #663 from ceph/wip-cancel-copy

Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agorbd: fix cli test
Sage Weil [Tue, 1 Oct 2013 17:02:40 +0000 (10:02 -0700)]
rbd: fix cli test

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosdc/ObjectCacher: limit writeback IOs generated while holding lock 668/head
Sage Weil [Tue, 1 Oct 2013 16:28:29 +0000 (09:28 -0700)]
osdc/ObjectCacher: limit writeback IOs generated while holding lock

While analyzing a log from Mike Dawson I saw a long stall while librbd's
objectcacher was starting lots (many hundreds) of IOs.  Limit the amount of
time we spend doing this at a time to allow IO replies to be processed so
that the cache remains responsive.

I'm not sure this warrants a tunable (which we would need to add for both
libcephfs and librbd).

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agorgw: quiet down warning message
Yehuda Sadeh [Mon, 26 Aug 2013 18:16:08 +0000 (11:16 -0700)]
rgw: quiet down warning message

Fixes: #6123
We don't want to know about failing to read region map info
if it's not found, only if failed on some other error. In
any case it's just a warning.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoosd/ReplicatedPG: fix iterator corruption in cancel_copy_ops() 663/head
Sage Weil [Mon, 30 Sep 2013 23:33:22 +0000 (16:33 -0700)]
osd/ReplicatedPG: fix iterator corruption in cancel_copy_ops()

The cancel_copy() method removes the entry from copy_ops.  Move the
iterator forward before calling.

Fixes segfault when thrashing osds with a copy-from workload.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #664 from ceph/wip-6445
Josh Durgin [Tue, 1 Oct 2013 04:09:24 +0000 (21:09 -0700)]
Merge pull request #664 from ceph/wip-6445

Wip 6445
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoceph_argparse.py: clean up error reporting when required param missing 666/head
Dan Mick [Fri, 27 Sep 2013 05:24:37 +0000 (22:24 -0700)]
ceph_argparse.py: clean up error reporting when required param missing

Treat "need 1, got 0" as a special case, and change the message to
"missing required parameter <x>".  Also, when failing for that reason,
print the command concise description and its helptext.

Fixes: #6384
Signed-off-by: Dan Mick <dan.mick@inktank.com>
11 years agoMerge pull request #665 from ceph/wip-6444
Josh Durgin [Tue, 1 Oct 2013 04:07:42 +0000 (21:07 -0700)]
Merge pull request #665 from ceph/wip-6444

Wip 6444
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorbd.cc: add readonly option for "rbd map"
Guangliang Zhao [Mon, 23 Sep 2013 14:13:05 +0000 (22:13 +0800)]
rbd.cc: add readonly option for "rbd map"

The device could only be set to rw(default) when mapping
now. This patch only handle the user space, because the
kernel part has been completed.

Signed-off-by: Guangliang Zhao <guangliang@unitedstack.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoPendingReleaseNotes: update regarding librados change 665/head
Yehuda Sadeh [Mon, 30 Sep 2013 23:30:03 +0000 (16:30 -0700)]
PendingReleaseNotes: update regarding librados change

Fix related to issue #6444

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoMerge pull request #660 from ceph/wip-fs-crc
Sage Weil [Mon, 30 Sep 2013 23:21:29 +0000 (16:21 -0700)]
Merge pull request #660 from ceph/wip-fs-crc

sloppy / opportunistic CRC tracking in the filestore

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoos/FileStore: add sloppy crc tracking 660/head
Sage Weil [Mon, 30 Sep 2013 23:21:17 +0000 (16:21 -0700)]
os/FileStore: add sloppy crc tracking

Opportunistically track CRCs for data we write and verify it for data
we read.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agorgw: drop async pool create completion reference
Yehuda Sadeh [Mon, 30 Sep 2013 22:44:25 +0000 (15:44 -0700)]
rgw: drop async pool create completion reference

Fixes: #6444
Backport: dumpling
If pool creation fails (e.g., due to -EEXIST) then we leak the
completion object. Earlier we couldn't just drop the reference, as
librados have already removed the internal completion object. This fix
drop the completion reference even if got an error, which is now
possible.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agolibrados: pool async create / delete does not delete completion handle
Yehuda Sadeh [Mon, 30 Sep 2013 22:40:02 +0000 (15:40 -0700)]
librados: pool async create / delete does not delete completion handle

Backport: dumpling
The pool async delete / create function used to delete the internal
completion object. However, caller still holds the allocated completion
object, which it can't drop a reference to (as it'd try to deallocate
the already freed internal object). This fix removes the internal object
deletion, a following commit will fix a related leak (#6444) by having
the application (radosgw) drop the reference even if got an error.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoMerge pull request #662 from dmick/next
Alfredo Deza [Mon, 30 Sep 2013 22:28:54 +0000 (15:28 -0700)]
Merge pull request #662 from dmick/next

Invoke python with /usr/bin/env python instead of directly

11 years agoMerge pull request #661 from ceph/wip-copy-cleanups
Sage Weil [Mon, 30 Sep 2013 22:02:02 +0000 (15:02 -0700)]
Merge pull request #661 from ceph/wip-copy-cleanups

Wip copy cleanups

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoInvoke python with /usr/bin/env python instead of directly 662/head
Dan Mick [Mon, 30 Sep 2013 21:58:11 +0000 (14:58 -0700)]
Invoke python with /usr/bin/env python instead of directly

Fixes: #6311
Signed-off-by: Dan Mick <dan.mick@inktank.com>
11 years agoReplicatedPG: remove unused CopyOp::waiting member, rename function for accuracy 661/head
Greg Farnum [Mon, 30 Sep 2013 21:04:54 +0000 (14:04 -0700)]
ReplicatedPG: remove unused CopyOp::waiting member, rename function for accuracy

We never placed any ops here, and so we weren't ever requeuing any ops.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoReplicatedPG: remove useless pcop param from start_copy
Greg Farnum [Tue, 24 Sep 2013 20:02:29 +0000 (13:02 -0700)]
ReplicatedPG: remove useless pcop param from start_copy

Signed-off-by: Greg Farnum <greg@inktank.com>