]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
11 years agoosd/ReplicatedPG: fix null deref on rollback_to whiteout check 688/head
Sage Weil [Fri, 4 Oct 2013 04:27:36 +0000 (21:27 -0700)]
osd/ReplicatedPG: fix null deref on rollback_to whiteout check

Bring this whole if/else chain up one level so that we can capture both
ENOENT and whiteout in the same case.  (And don't dereference the
pointer when we know it is NULL.)

Fixes: #6474
Signed-off-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 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 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 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 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>
11 years agoReplicatedPG: use our already-found iterator instead of going back into map
Greg Farnum [Thu, 19 Sep 2013 00:49:17 +0000 (17:49 -0700)]
ReplicatedPG: use our already-found iterator instead of going back into map

We have an iterator pointing at the element we want; no need to search
the map again in order to grab the element or remove it.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agorgw: fix leak in RGWMetadataManager::remove() 664/head
Yehuda Sadeh [Mon, 30 Sep 2013 21:15:19 +0000 (14:15 -0700)]
rgw: fix leak in RGWMetadataManager::remove()

Backport: dumpling
Fixes: #6445
handler->get() returns a newly allocated obj, need to delete it when
done.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agocommon/SloppyCRCMap: add type to sloppily track crcs
Sage Weil [Sun, 29 Sep 2013 03:26:25 +0000 (20:26 -0700)]
common/SloppyCRCMap: add type to sloppily track crcs

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

11 years agoOSD: unset_honor_cache_redirects() on Objecter 659/head
Greg Farnum [Thu, 26 Sep 2013 20:33:45 +0000 (13:33 -0700)]
OSD: unset_honor_cache_redirects() on Objecter

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoObjecter: add "honor_cache_redirects" flag covering cache settings
Greg Farnum [Thu, 26 Sep 2013 20:19:58 +0000 (13:19 -0700)]
Objecter: add "honor_cache_redirects" flag covering cache settings

When set to false, we do not redirect based on the cache_pool data
in the OSDMap. We'll use this so the OSDs can actually fetch data
into the cache pools on promotion!
Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agorbd.cc: propagate some errors to user-space when they're available
Joao Eduardo Luis [Wed, 28 Aug 2013 23:38:29 +0000 (00:38 +0100)]
rbd.cc: propagate some errors to user-space when they're available

There was a bunch of situations in which we would have a proper error to
propagate to user-space but we would always return '1' (EXIT_FAILURE).

Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
(cherry picked from commit 7e722245a717038c49f432ae19d9874c25066bb6)

11 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Sat, 28 Sep 2013 04:10:50 +0000 (21:10 -0700)]
Merge remote-tracking branch 'gh/next'

Conflicts:
src/common/crc32c_intel_fast.c

11 years agoMerge pull request #658 from dmick/next
Sage Weil [Sat, 28 Sep 2013 04:09:43 +0000 (21:09 -0700)]
Merge pull request #658 from dmick/next

ceph.in: fix missing exception variable in failure to open -o file

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoceph.in: fix missing exception variable in failure to open -o file 658/head
Dan Mick [Sat, 28 Sep 2013 00:07:26 +0000 (17:07 -0700)]
ceph.in: fix missing exception variable in failure to open -o file

Fixes: #6424
Signed-off-by: Dan Mick <dan.mick@inktank.com>
11 years agoMerge pull request #657 from ceph/wip-6397
Josh Durgin [Sat, 28 Sep 2013 00:06:04 +0000 (17:06 -0700)]
Merge pull request #657 from ceph/wip-6397

Wip 6397

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorgw: don't append NULL char before json parsing 657/head
Yehuda Sadeh [Fri, 27 Sep 2013 23:45:11 +0000 (16:45 -0700)]
rgw: don't append NULL char before json parsing

Parser handles that by itself.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoceph_json: use different string constructor for parser buffer
Yehuda Sadeh [Wed, 25 Sep 2013 20:04:48 +0000 (13:04 -0700)]
ceph_json: use different string constructor for parser buffer

Fixes: #6397
Previous implementation did not user the constructor with the length
param.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoMerge pull request #643 from dachary/master
Sage Weil [Fri, 27 Sep 2013 21:31:17 +0000 (14:31 -0700)]
Merge pull request #643 from dachary/master

autoconf: fix build out of tree

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agodoc: changed journal aio default to true.
John Wilkins [Fri, 27 Sep 2013 20:59:13 +0000 (13:59 -0700)]
doc: changed journal aio default to true.

fixes: #6389

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agoqa: workunits: mon: test snaps ops using rbd.
Joao Eduardo Luis [Wed, 28 Aug 2013 22:25:21 +0000 (23:25 +0100)]
qa: workunits: mon: test snaps ops using rbd.

Regression test for #6047

Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
(cherry picked from commit b2b0f202ea8a0028e7e27664b3ea6b9b8cdafe6e)