Commit Graph

67790 Commits

Author SHA1 Message Date
Yan, Zheng
2213cc2dcc mds: propagate error encountered during opening inode by number
Fixes: http://tracker.ceph.com/issues/18179
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2017-01-11 15:21:41 +08:00
liuchang0812
3d023cf1b4 test: clean up unused variable
Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
2017-01-11 14:00:55 +08:00
Kefu Chai
03db36f354 Merge pull request #12840 from tchaikov/wip-libceph-common
cmake: turn libcommon into a shared library

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Ricardo Dias <rdias@suse.com>
2017-01-11 13:07:20 +08:00
Kefu Chai
87256a1fbc Merge pull request #12809 from wjin/optimize_atomic
msg/async: avoid atomic variable overhead

Reviewed-by: Haomai Wang <haomai@xsky.com>
2017-01-11 13:02:17 +08:00
Kefu Chai
55c5fdd747 Merge pull request #12826 from LiumxNL/fix-op-tracker-initiate
mon: optracker's initiated_at timestamp should not be NULL

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-01-11 13:00:27 +08:00
xie xingguo
ea5d71cabc os/bluestore/BitmapFreelistManager: readability improvements
Be slightly nice to who is looking at get_next_clear[set]_bit().

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-01-11 11:50:13 +08:00
xie xingguo
573918b692 os/bluestore/BitmapFreelistManager: formatting nits
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-01-11 11:36:58 +08:00
huanwen ren
9d185a0aa2 libcephfs: add extern "C" in ceph_ll_walk()
Signed-off-by: huanwen ren <ren.huanwen@zte.com.cn>
2017-01-11 03:16:40 +00:00
Sage Weil
ab9d375df2 Merge pull request #12871 from xiexingguo/xxg-wip-bluestore-20170111
os/bluestore: kill BufferSpace.empty()

Reviewed-by: Sage Weil <sage@redhat.com>
2017-01-10 21:15:35 -06:00
Xiaoxi Chen
52fe52baf9 mds/server: skip unwanted dn in handle_client_readdir
We can skip unwanted dn which  < (offset_key, snap) via map.lower_bound, rather than
iterate across them.

Previously we iterate and skip dn which < (offset_key, dn->last), as dn->last >= snap
 means (offset_key, dn->last) >= (offset_key, snap), and such iterate_and_skip logic
still keep, so this commit doesnt change code logic but an optimization.

Signed-off-by: Xiaoxi Chen <xiaoxchen@ebay.com>
2017-01-10 20:04:56 -07:00
xie xingguo
985514b278 os/bluestore: kill BufferSpace.empty()
Because:
1. All other public methods are called under the protection of cache->lock,
which makes the usage of this method is weird.

2. The only caller is _dump_extent_map(), and we can do it without this
in a simpler way.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-01-11 10:43:58 +08:00
Haomai Wang
2945bf1b50 Merge pull request #12860 from liupan1111/wip-fix-dpdk-prefix
async: fixed the error "Cause: Cannot create lock on '/var/run/.rte_c…

Reviewed-by: Haomai Wang <haomai@xsky.com>
2017-01-11 10:17:07 +08:00
huanwen ren
5c35eff460 test/libcephfs: add the missing test cases
Signed-off-by: huanwen ren <ren.huanwen@zte.com.cn>
2017-01-11 01:49:33 +00:00
Vasu Kulkarni
2d4ed95f2b use the create option during instantiation
Signed-off-by: Vasu Kulkarni <vasu@redhat.com>
2017-01-10 15:43:12 -08:00
Alfredo Deza
ebb02c8ef5 Merge pull request #12867 from ceph/wip-ceph-deploy-workaround
qa/tasks/ceph-deploy: create-keys explicitly

Reviewed-by: Alfredo Deza <adeza@redhat.com>
2017-01-10 15:47:26 -05:00
Sage Weil
9f54e9f5e4 Merge pull request #12626 from adamemerson/wip-denconstruction
include/denc: improvements

Reviewed-by: Sage Weil <sage@redhat.com>
2017-01-10 14:15:10 -06:00
Haomai Wang
17589d5826 Merge pull request #12862 from optimistyzy/110_1
os/bluestore/NVMEdevice: fix the unrelease segs issue

Reviewed-by: Haomai Wang <haomai@xsky.com>
2017-01-11 00:48:07 +08:00
Kefu Chai
7b8eca5be7 Merge pull request #12091 from wjwithagen/wip-wjw-nosetests
nosetests: use /usr/bin/env to find nosetests

Reviewed-by: Loic Dachary <ldachary@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-01-11 00:43:24 +08:00
Adam C. Emerson
ea52d39be2 denc: Support boost::optional
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2017-01-10 11:40:34 -05:00
Adam C. Emerson
cf044f7aef denc: Support tuples
We could support zero-length tuples, but contiguous appender doesn't
like zero-length writes, so I've ruled them out for now.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2017-01-10 11:40:34 -05:00
Adam C. Emerson
26d622c48f denc: Add support for std::array
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2017-01-10 11:40:34 -05:00
Adam C. Emerson
c92cc9fe51 denc: Support boost::container::flat_set
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2017-01-10 11:40:34 -05:00
Adam C. Emerson
b7df89b519 denc: Scrap the container boilerplate!
Using template templates, kill off the reduplication in
container encoding.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2017-01-10 11:40:34 -05:00
Willem Jan Withagen
89a61ae2cd nosetests: start using /usr/bin/env to find noestests
- Option nocapture is not really required so no problem
   with the fact that FreeBSD env does not work for params
   for nosetests

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2017-01-10 16:07:40 +01:00
Gaurav Kumar Garg
6ab73e5f42 rbd: bench-write should return error if io-size >= 4G
Currently if user perform bench-write with io-size > 4G
then its crashing because currently during memory allocation
bufferptr taking size of buffer as a unsigned and io-size > 4G
will overflow with unsigned. so during memset operation it will
try to set io_size size of memory area pointed by bufferptr,
(bufferptr area is:  (4G - io_size)), so it will cause
segmentation fault.

Fix is to return error if io-size >= 4G

Fixes: http://tracker.ceph.com/issues/18422

Reported-by:  Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Gaurav Kumar Garg <garg.gaurav52@gmail.com>
2017-01-10 16:02:01 +01:00
Jason Dillaman
60b79473fe Merge pull request #12821 from SUSE/wip-drop-rbd_cli_tests
tests: drop rbd_cli_tests.pl and RbdLib.pm

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-01-10 09:29:11 -05:00
Jason Dillaman
5f2689b62a librbd: resolve static analyser warnings
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-01-10 08:34:38 -05:00
Sage Weil
c96cb2d02e Merge pull request #12850 from xiexingguo/xxg-wip-bluestore-20170110
os/bluestore: shrink buffer_map key into uint32_t

Reviewed-by: Igor Fedotov <ifedotov@mirantis.com>
2017-01-10 07:33:18 -06:00
Jason Dillaman
0dd25f240a Merge pull request #12815 from rjfd/wip-journal-unittest-build-error
tests: fix template specialization of PromoteRequest class

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-01-10 08:32:53 -05:00
Sage Weil
a7da1eb092 Merge pull request #12853 from xiexingguo/xxg-wip-kill-orphan
os/bluestore: kill orphan declaration of do_write_check_depth()

Reviewed-by: Igor Fedotov <ifedotov@mirantis.com>
2017-01-10 07:31:43 -06:00
Sage Weil
533311e999 Merge pull request #12856 from xiexingguo/xxg-wip-clean-kd
os/bluestore/KernelDevice: kill zeros

Reviewed-by: Igor Fedotov <ifedotov@mirantis.com>
2017-01-10 07:27:57 -06:00
Sage Weil
f70b6fdec6 Merge pull request #12858 from yangdongsheng/rbd_cleanup
rbd: cleanup: fix the typo in namespace comment
2017-01-10 07:26:12 -06:00
optimistyzy
5ffee830f6 NVMEdevice: fix the unrelease segs issue
When the read or flush command fails, we need to
release segs. Or we can abort it like what we do
for write.

Signed-off-by: optimistyzy <optimistyzy@gmail.com>
2017-01-10 21:14:18 +08:00
Kefu Chai
7ac89f3725 cmake: s/snappy/${SNAPPY_LIBRARIES}/
also s/z/${ZLIB_LIBARIES}/

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-01-10 21:10:53 +08:00
Kefu Chai
8f7643792c cmake: turn libcommon into a shared library
prior to this change, libcommon is a convenient library which gets
linked into librados, librbd and libcephfs and all ceph executables.
this incurs some problems:
 - double dose of libcommon in memory space and HDD: waste of memory
   and disk space.
 - if an application links to two libraries including libcommon at the
   same time. take librados and libcephfs as an example, they could
   interfere with each other by changing the other guy's status.
after this change, libcommon is tuned into a shared library and
renamed to libceph-common. it will be installed into $prefix/lib/ceph,
and packaged in librados2.

ceph.spec.in,debian/librados2.install: package libceph-common in
  librados2.
CMakeLists.txt:
  - do not link against libboost-* if not necessary.
  - s/common/ceph-common/g
  - install libceph-common into $prefix/lib/ceph
  - set rpath to $prefix/lib/ceph
  - link against ceph-common if an executable needs access to non public
    symbols in ceph.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-01-10 21:10:53 +08:00
xie xingguo
842098d480 os/bluestore: shrink buffer_map key into uint32_t
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-01-10 20:45:02 +08:00
Pan Liu
7630df21be async: fixed the error "Cause: Cannot create lock on '/var/run/.rte_config'.",
when invoke more than one osds in same server and enable dpdk.

Signed-off-by: Pan Liu <pan.liu@istuary.com>
2017-01-10 18:49:20 +08:00
Yan, Zheng
525c52fd49 client: fix Client::handle_cap_flushsnap_ack() crash
Struct CapSnap holds a reference to its parent inode. So erasing
struct CapSnap from Inode::cap_snaps may drop inode's last reference.
The inode gets freed in the middle of erasing struct CapSnap

Fixes: http://tracker.ceph.com/issues/18460
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2017-01-10 17:41:50 +08:00
Dongsheng Yang
50e088deeb rbd: cleanup: fix the typo in namespace comment
Signed-off-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
2017-01-10 04:26:43 -05:00
Brad Hubbard
fbad77c727 Merge pull request #12855 from badone/wip-md_config_t-_apply_changes-unchangeable
config: Improve warning for unobserved value

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-01-10 18:17:52 +10:00
xie xingguo
12366280cc os/bluestore/KernelDevice: reuse r
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-01-10 15:53:25 +08:00
xie xingguo
c8123e50c1 os/bluestore/KernelDevice: drop redundant assignment statements
The memset() call has already done it.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-01-10 15:50:23 +08:00
xie xingguo
e353d8e0b1 os/bluestore/NVMeDevice: kill zeros
See 2cd63d2209
The aio_zero() interface is deprecated.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-01-10 15:46:32 +08:00
xie xingguo
b9c1c0fe7c os/bluestore/KernelDevice: kill zeros
This is not needed anymore and can save us 1MB memory.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-01-10 15:39:37 +08:00
Yan, Zheng
9b97554f0a mds: don't abort request that has already started slave operation
Access check and fragment size check can fail after start slave
operation. This causes mds to crash.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2017-01-10 15:23:35 +08:00
Yan, Zheng
5b832aa5b6 mds: use locked dentry trace to compose slave rmdir/rename request
{rmdir/rename}_prepare_witness() use full path to compose slave
requests. But they do not lock all dentries in the path. So someone
else changes the unlocked dentry and causes path travsese of slave
request to fail.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2017-01-10 15:23:34 +08:00
Yan, Zheng
da1e2614ab mds: add replicas of destdn to rename witness list
it's possible that null dentry is replicated

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2017-01-10 15:23:34 +08:00
Yan, Zheng
276d12547f mds: properly put unexpired dentry back to lru
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2017-01-10 15:23:34 +08:00
Yan, Zheng
c94a2c429e mds: cleanup Server::rdlock_path_xlock_dentry
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2017-01-10 15:23:34 +08:00
Yan, Zheng
530bd6e67a mds: add -ESTALE recovery code for unlink/rmdir
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2017-01-10 15:23:34 +08:00