Commit Graph

51922 Commits

Author SHA1 Message Date
Samuel Just
6b82bc5b65 Merge pull request #8147 from xiaoxichen/fix-get-map
osd/OSD.cc: finish full_map_request every MOSDMap message.

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-03-30 15:25:36 -07:00
Jason Dillaman
57db6176ac librbd: integrate listener for new mirroring notification payloads
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-03-30 17:02:02 -04:00
Jason Dillaman
e95a3836b3 librbd: send notifications on mirroring updates
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-03-30 17:02:02 -04:00
Casey Bodley
e95eb53363 Merge pull request #8084 from sunfch/wip-rgw-init-max-response
rgw: accept data only at the first time in response to a request
2016-03-30 17:01:31 -04:00
Jason Dillaman
3748b8874e librbd: helper methods for mirroring notifications
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-03-30 17:00:31 -04:00
Jason Dillaman
934ce8647c librbd: mirroring object notification types
Initial payloads for updated mirror pool mode and image state.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-03-30 17:00:31 -04:00
Jason Dillaman
3145109fd5 librbd: generic object watcher and mirroring watcher
The ObjectWatcher can handle generic watch and recovery of
RADOS objects.  The MirroringWatcher will handle updates
to the RBD mirroring object.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-03-30 17:00:31 -04:00
Jason Dillaman
6f8596fc01 Merge pull request #8375 from rjfd/wip-15265
librbd: disable image mirroring when image is removed

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-03-30 12:58:18 -04:00
Josh Durgin
823683c2f7 Merge pull request #8331 from sileht/sileht/rados-cython
pybind/rados: python3 fix

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2016-03-30 09:20:19 -07:00
Ricardo Dias
bb07a1b23e rbd: rbd-mirroring: Automatically disable image mirroring when image is removed
Signed-off-by: Ricardo Dias <rdias@suse.com>
Fixes: #15265
2016-03-30 17:11:10 +01:00
Sage Weil
f254486ad9 os/bluestore: _do_write: fix _do_zero_tail_extent to handle shared extents
Also add a test case to reproduce this case.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-30 11:23:15 -04:00
Sage Weil
2ed445ecd8 os/bluestore: _do_zero: simply truncate up if past eof
Avoid the _do_zero_tail_extent here; we're zeroing so this is no different
than a truncate up

Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-30 11:23:15 -04:00
Sage Weil
dcc5cead10 os/bluestore: prevent rename src from getting trimmed from lru
We were putting it at the end of the LRU *and* not holding a reference.

Fix by letting oldo carry a ref to the Onode.  This avoids a subsequent
lookup and also prevents it from getting trimmed.

Note that we could also put it at the front of the LRU, but given that it
is the rename source, I'm not sure that's appropriate.  For example,
temp recovery objects get renamed into place and we don't want to keep
negative onodes for those around.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-30 11:23:15 -04:00
Sage Weil
d9fc4aad82 os/bluestore: _do_zero: handle unzeroed tail blocks
- _do_write_zero when handling tail extent if it is
  shared.
- handle tail extent we are also zeroing later (not in
  the tail handler).  THis mirrors how _do_write is
  structured.
- handle eof to offset zeroing if our offset starts in
  the tail extent.  just like _do_write's wal path.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-30 11:23:15 -04:00
Sage Weil
65e9252d73 os/bluestore: _do_write_zero: preserve onode size
Instead of handling this in each caller, make the helper
keep onode.size intact.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-30 11:23:15 -04:00
Sage Weil
903365b170 os/bluestore: _do_write: handle gap from eof to offset in wal path
Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-30 11:23:15 -04:00
Sage Weil
874aad397f os/bluestore: _do_allocate: fix whitespace
Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-30 11:23:15 -04:00
Sage Weil
52314caaf1 os/bluestore: _do_truncate: no need to zero trailing block on truncate down
Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-30 11:23:15 -04:00
Sage Weil
00a71a0740 os/bluestore: _do_write: only use append case for aligned eof
The append case here only works if the EOF was aligned
and there is thus no partial-block zeroing we need to
do.  If the condition fails, we fall through to the
generic WAL path below.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-30 11:23:15 -04:00
Sage Weil
9aaf1b195a os/bluestore: _do_zero_tail_extent: do not assume tail block is zeroed
We will change this shortly.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-30 11:23:15 -04:00
Sage Weil
5abd9ffd6c os/bluestore: _do_zero_tail_extent helper
We do this from both _do_truncate and _do_write.  No
functional change here.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-30 11:23:15 -04:00
Sage Weil
a81095168d os/bluestore: break _do_zero out of _zero
Seems useless now, but it maintains symmetry and we'll
need it later.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-30 11:23:15 -04:00
Sage Weil
4ea630a409 os/bluestore: do not do gift beyond the max ratio
Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-30 11:23:15 -04:00
Sage Weil
fcbf0e5156 global/signal_handler: fix warning
Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-30 11:23:15 -04:00
Sage Weil
8b45b0d7d7 os/bluestore: release wal_cleaning extents in order
We need to order the freelist updates so that they match the
commit order of the actual transactions.  Otherwise we might, say,
set a key here, delete it in the _txc_update_fm, but commit in
the wrong order and end up with the key surviving.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-30 11:23:15 -04:00
Sage Weil
5fe8e941dc os/bluestore: avoid temp released interval_map for wal cleanup
Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-30 11:23:15 -04:00
Sage Weil
1bc7edb31c os/bluestore/FreelistManager: detect overlapping extents on init
Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-30 11:23:15 -04:00
Sage Weil
91faa7ed18 os/bluestore: trim onode_map when adding new items
This ensures we maintain the cache size even for read workloads.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-30 11:23:15 -04:00
Sage Weil
99f8192cfc os/bluestore: keep onode_map max_size
Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-30 11:23:14 -04:00
Sage Weil
3084be5def os/bluestore: wait for wal op that wrote cached tail before using
If the cached tail is written by a WAL op, we need to wait for it to
apply before we use the cached tail.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-30 11:23:14 -04:00
Sage Weil
5cf66693a6 os/bluestore: note txc seq for tail cache
We'll need this soon...

Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-30 11:23:14 -04:00
Sage Weil
e98d0b21c5 os/bluestore: assign per-Sequencer seq to each TransContext
Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-30 11:23:14 -04:00
Sage Weil
08bb1ca320 ceph_test_objectstore: add AppendWalVsTailCache test
This specifically exercises a WAL overwrite racing with a subsequent
append that uses the previous writes cached tail.  We need to make sure
the use of the cached_tail waits for the previous WAL write or else our
update of tail block will be overwritten with the prior (WAL) value.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-30 11:23:14 -04:00
Sage Weil
a58ffab447 os/bluestore: fix fsck vs enodes
- fix used_blocks accounting for shared extents
- make sure enodes only exist when objects follow

Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-30 11:23:14 -04:00
Sage Weil
87be6b0069 os/bluestore: bluestore_inject_wal_apply_delay
Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-30 11:23:14 -04:00
Sage Weil
360d956857 os/bluestore: reorder onode_map vs enode_set ctor/dtor
The onode_map should get declared after the enode_set so that
the enode_set is empty when it is destroyed.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-30 11:23:14 -04:00
Sage Weil
4a9c5d7fd8 os/bluestore: only cache tail in _pad_tail if we have the whole block
Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-30 11:23:14 -04:00
Sage Weil
5a2b36f1e2 os/bluestore: only use tail if tail_offset matches
Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-30 11:23:14 -04:00
Sage Weil
95a5f56093 os/bluestore: fix off-by-one on caching tail block
We can cache the tail as long as we overwrite all prior content;
we don't have to extent the size.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-30 11:23:14 -04:00
Sage Weil
c1b42e99b9 os/bluestore/KernelDevice: print buffered flag in debug line
Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-30 11:23:14 -04:00
Willem Jan Withagen
8dc2c21006 ceph-detect-init/run-tox.sh: FreeBSD: No init detect
- Freebsd has /etc/rc.d with scripts to start daemons at boottime.
   Test for that are currently not integrated with Ceph tests

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2016-03-30 17:15:09 +02:00
Jason Dillaman
f05237b93a Merge pull request #8368 from tchaikov/wip-cmake-fix-rbd
cmake: add StandardPolicy.cc to librbd

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-03-30 10:49:46 -04:00
Sage Weil
d0c5490cdd Merge pull request #8337 from jmunhoz/fix-15292
mon: remove unused variable

Reviewed-by: Joao Eduardo Luis <joao@suse.de>
2016-03-30 09:56:37 -04:00
Jason Dillaman
d53f9415ee Merge pull request #8352 from runsisi/wip-fix-missing-iter
rbd-mirror: fix missing increment for iterators

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-03-30 08:49:55 -04:00
Jason Dillaman
fadb4cd52b Merge pull request #8374 from trociny/fix-cls-rbd-read_peers
cls_rbd: read_peers: update last_read on next cls_cxx_map_get_vals

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-03-30 08:27:22 -04:00
Sage Weil
052fa90eb7 Merge pull request #7062 from wonzhq/scrub-prio-pool
osd: add the support of per pool scrub priority

Reviewed-by: Sage Weil <sage@redhat.com>
2016-03-30 08:24:43 -04:00
Sage Weil
325520824e Merge pull request #8210 from liewegas/wip-12814
osd: add 'proxy' cache mode

Reviewed-by: Samuel Just <sjust@redhat.com>
2016-03-30 08:23:05 -04:00
Sage Weil
f75e4d7c10 Merge pull request #8315 from mslovy/wip-clean-pg
osd: duplicated clear for peer_missing

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-03-30 08:22:46 -04:00
Sage Weil
723b46c801 Merge pull request #8330 from xiexingguo/xxg-wip-race
common: fix race during optracker switches between enabled/disabled mode

Reviewed-by: David Zafman <dzafman@redhat.com>
2016-03-30 08:22:30 -04:00
Sage Weil
9025d9f114 Merge pull request #8335 from liewegas/wip-13992
mon/MonClient: fix shutdown race

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-03-30 08:21:47 -04:00