Commit Graph

48109 Commits

Author SHA1 Message Date
xie xingguo
1c70f86316 BlueStore: fix dest onode process logic of clone
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-01-19 19:32:15 +08:00
xie xingguo
fde0f0297a BlueStore: fix nid overwritten of write/zero
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-01-19 19:32:11 +08:00
xie xingguo
1fc9edfe2a kstore: fix typo
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-01-19 19:32:07 +08:00
xie xingguo
6375870a12 kstore: fix fsid validation logic during mkfs
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-01-19 19:32:02 +08:00
xie xingguo
9ab7998fbe kstore: fix dest onode process logic of clone_range
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-01-19 19:31:58 +08:00
xie xingguo
7ce6d068a1 kstore: fix dest onode process logic of clone
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-01-19 19:31:54 +08:00
xie xingguo
8065b8ab34 kstore: fix nid overwritten of write/zero
Fixes: #14407
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-01-19 19:31:48 +08:00
Erwan Velu
b3f7d02a2a osd/OSD: Simplifying 'r' usage
The r variable was created unassigned and lately assigned to -1.
Even if r is always defined before its usage, sounds like initializing it to
what seems a default value (-1) from the beginning is safer for later code
inclusion.

Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-01-19 11:05:23 +01:00
Erwan Velu
6a23b23c0b os/filestore/FileJournal: Removing dead code
Despite read_pos & last_committed_seq, the seq variable is local and created a
few lines before.

While the reinitiliasation of read_pos & last_commited_seq is useless, the seq
variable is destroyed by the return call.

That makes the "seq = 0" being useless and a dead code. This patch simply
removes it.

Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-01-19 11:05:23 +01:00
Erwan Velu
d03146d0fc os/bluestore/BlueStore: Removing dead code
This assignement of r is misleading. It does assign a value to r that is never
used by any code.

When the code runs into the while loop, r is always initialized again before any
usage. There isn't any direct jump to the "out" label making this value being
used as a return code.

When the code does exit this while loop, the r value is reassigned before being
used as a return code.

This makes this assignement useless and confusing. This patch simply remove this dead/useless code.

Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-01-19 11:05:23 +01:00
Erwan Velu
fcac028db8 os/bluestore/BlueStore: Simplifying default return value
r variable wasn't initialized but set to 0 twice. Once just before an early
"goto out" code and the other before the main code of the function.

This patch simply initialize r to 0 at the begining.
This make the code easier to read and prevent any future call to "out" label without a proper value stored in r.

Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-01-19 11:05:22 +01:00
Erwan Velu
1f21322f3e mon/ConfigKeyService: Removing dead code
This part of the code is setting up the ret variable just before returning
false. This code have no effect.

This patch simply remove dead/useless code.

Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-01-19 11:05:22 +01:00
Erwan Velu
39a5d978b3 mon/MDSMonitor: Removing dead code
The poolid variable is assigned just before returning ENOENT but this value is
never used.

This patch just remove dead/useless code.

Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-01-19 11:05:22 +01:00
Erwan Velu
858f6068fc mon/PGMonitor: Removing dead code
The assignation of head is useless as its never used after.
This patch simply remove dead/useless code.

Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-01-19 11:05:22 +01:00
Chendi Xue
dece3be59a Add error check for object_map->sync()
There lacks error check after doing object_map->sync under
sync_entry, which is OK when omap deployed in the same device
with object data, but it is better to add error check in case
object_map->sync failed.

Signed-off-by: Chendi Xue <chendi.xue@intel.com>
2016-01-19 15:35:46 +08:00
Jason Dillaman
326eb4c86e tests: fix pybind path for RBD unit tests
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-01-18 18:15:00 -05:00
Jason Dillaman
1aa674c27b librbd: missing lock on state transition
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-01-18 17:53:00 -05:00
Jason Dillaman
1215a1a986 helgrind: annotate false-positive race conditions
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-01-18 17:52:51 -05:00
Josh Durgin
2208e828be Merge pull request #7272 from dillaman/wip-14385-jewel
qa: disable rbd/qemu-iotests test case 055 on RHEL/CentOSlibrbd: journal replay should honor inter-event dependencies

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2016-01-18 17:30:48 -05:00
Josh Durgin
dda9a08370 Merge pull request #7019 from dillaman/wip-14006
librbd: journal replay should honor inter-event dependencies

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2016-01-18 17:09:05 -05:00
Jason Dillaman
bb4d7a721c qa: disable rbd/qemu-iotests test case 055 on RHEL/CentOS
Fixes: #14385
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-01-18 15:58:43 -05:00
Casey Bodley
4c9345bbab cmake: add missing check for HAVE_EXECINFO_H
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2016-01-18 14:13:19 -05:00
Sage Weil
7537ac8910 Merge pull request #7265 from ceph/wip-14397-disable-xfs-extsize
osd: disable filestore_xfs_extsize by default

Reviewed-by: Sage Weil <sage@redhat.com>
2016-01-18 14:11:21 -05:00
Sage Weil
ccd65d2739 os/memstore: no magic len=0 to fiemap
Signed-off-by: Sage Weil <sage@redhat.com>
2016-01-18 12:50:00 -05:00
Sage Weil
3c4eddb5d9 os/kstore: no magic len=0 to fiemap
Signed-off-by: Sage Weil <sage@redhat.com>
2016-01-18 12:40:19 -05:00
Sage Weil
d794be4a53 os/bluestore: no magic len=0 to fiemap
Signed-off-by: Sage Weil <sage@redhat.com>
2016-01-18 12:40:12 -05:00
Sage Weil
f9019a445b ceph_test_objectstore: do not pass len=0 to fiemap
Not all backends do this.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-01-18 12:39:59 -05:00
Ken Dreyer
aed85775bf osd: disable filestore_xfs_extsize by default
This option involves a tradeoff: When disabled, fragmentation is worse,
but large sequential writes are faster. When enabled, large sequential
writes are slower, but fragmentation is reduced.

Fixes: #14397
2016-01-18 08:26:31 -07:00
Sage Weil
328610631d os/kstore: fix u64 decode checks
Signed-off-by: Sage Weil <sage@redhat.com>
2016-01-18 09:55:17 -05:00
Sage Weil
f8ea3eb6c0 Merge branch 'wip-bluestore' 2016-01-18 09:53:02 -05:00
Sage Weil
1590b082d5 os/bluestore: fix _key_decode_u64 error checks
The data that follows may be binary encoded and null.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-01-18 09:52:40 -05:00
Sage Weil
92a5d1d4f1 os/bluestore/FreelistManager: switch to std::mutex
Signed-off-by: Sage Weil <sage@redhat.com>
2016-01-18 09:32:05 -05:00
Sage Weil
e0ca20b0e1 Merge pull request #7211 from cxwshawn/clean-fix
osd: ReplicatedPG: clean up unused function

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-01-18 09:28:41 -05:00
Sage Weil
453fdd9ace Merge pull request #7158 from yuyuyu101/wip-async-cleanup-deleted
msg/async: cleanup dead connection and misc things
2016-01-18 09:27:20 -05:00
Sage Weil
e6884bb373 Merge pull request #6809 from yuyuyu101/wip-13985
msgr:  fix large message data content length causing overflow

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2016-01-18 09:26:40 -05:00
Sage Weil
86d47bdd55 Merge pull request #7047 from xiexingguo/xxg-wip-14176
osd: KeyValueStore: fix wrongly placed assert

Reviewed-by: David Zafman <dzafman@redhat.com>
2016-01-18 09:26:00 -05:00
Sage Weil
f0475a374c Merge pull request #7142 from xiexingguo/xxg-wip-crush
crushtool: improve usage/tip messages

Reviewed-by: Sage Weil <sage@redhat.com>
2016-01-18 09:25:20 -05:00
Sage Weil
7621a69ee4 Merge pull request #7203 from branch-predictor/bp-use-faster-is-zero
osd: use optimized is_zero in object_stat_sum_t.is_zero()

Reviewed-by: Sage Weil <sage@redhat.com>
2016-01-18 09:24:39 -05:00
Sage Weil
ae6c659b85 Merge pull request #7169 from trociny/fix-bluestore-without-aio
osd: bluestore: don't include when building without libaio

Reviewed-by: Sage Weil <sage@redhat.com>
2016-01-18 09:23:34 -05:00
Piotr Dałek
507774a902 common/buffer: replace RWLock with spinlocks
This decreases buffer::raw size by about 100 bytes (since RWLock occupies
104 bytes and simple_spinlock_t just 4) and also significantly decreases
time wasted by locking and unlocking, possibly reducing context switches too.
Particularly visible when using small blocksizes.

Signed-off-by: Piotr Dałek <piotr.dalek@ts.fujitsu.com>
2016-01-18 13:46:59 +01:00
xie xingguo
b4bd72f25c BlueStore: drain wal_wq first if we exit from mounting due to wal_replay error
Because maybe we are in the middle of wal_replay and some wal transaction is already in process.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-01-18 19:20:12 +08:00
Abhishek Lekshmanan
aa28b58df9 vstart: update help with a few more switches
Add the `bluestore`, `memstore` and `cache` tier options to the vstart
help

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2016-01-18 11:56:20 +01:00
xie xingguo
5183ff3df6 BlueStore: verify fsid in a more proper way during mkfs
Fixes: #14394
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-01-18 16:33:23 +08:00
xiexingguo
29a7d68792 tests: update pool alignment API
The old ones are obsolete.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-01-18 15:32:35 +08:00
xiexingguo
f021f5a4f3 tools: fix pool alignment API overflow issue
The original APIs may overflow and are replaced by 1f855456ca.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-01-18 15:32:35 +08:00
Kefu Chai
8aa068d4a6 librados: fix rados_ioctx_pool_requires_alignment2()
we can not cast an "int *" pointer to a "bool *" and assign a bool
to it in hope to update the integer pointed by the "int *" with
1 or 0 according to the assigned boolean. because, the existing
value pointed by the "int *" pointer could be any value, if it's
non-zero, say, 0x12345678, after casting to "bool *", and assigning it
to "false", the variable would be 0x12345600. only the least
significant 8 bits are reset. so after resetting the variable pointed
by the "int *" pointer after reset it using "bool *", it still "true"!

Introduced-by: 1f85545
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-01-18 15:30:59 +08:00
xie xingguo
5ff452bbf5 BlueStore: negative return code if we unable to open path
Because the caller is unable to catch a positive error code.

Fixes: #14393
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-01-18 15:14:23 +08:00
Kefu Chai
ce8558216a configure: detect new gperftool
this is a follow-up of 6edaf4e, when tcmalloc is enabled,
perfglue/heap_profiler.cc is also compiled, it includes the
google/heap-profiler.h. so to silence the the warnings like
 warning: /usr/include/google/heap-profiler.h:35:2: #warning
 "google/heap-profiler.h is deprecated. Use gperftools/heap-profiler.h
 instead" [-Wcpp]
we also check the new location of these header files if tcmalloc
is enabled.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-01-18 12:31:31 +08:00
Kefu Chai
3b5e940b91 os/bluestore: fix signed/unsigned comparison warnings
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-01-18 12:31:30 +08:00
Kefu Chai
d54a747c16 kv/RocksDBStore: replace deprecated calls
rocksdb::DB::CompactRange(Slice*, Slice*) is deprecated, so replace
it with its equivalent.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-01-18 12:31:30 +08:00