]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
11 years agosample.ceph.conf: minor update 1816/head
Dmitry Smirnov [Fri, 16 May 2014 10:26:38 +0000 (20:26 +1000)]
sample.ceph.conf: minor update

 * Moved filestore settings above [osd.*] declarations otherwise
   (if uncommented) those settings might be applied only to last
   OSD which is not very obvious.
 * Few options added.

11 years agoworkunits: provide some output in the dirfrag.sh test
Greg Farnum [Wed, 14 May 2014 21:20:19 +0000 (14:20 -0700)]
workunits: provide some output in the dirfrag.sh test

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoMerge pull request #1803 from onlyjob/java-gcj
Gregory Farnum [Wed, 14 May 2014 20:24:20 +0000 (13:24 -0700)]
Merge pull request #1803 from onlyjob/java-gcj

Java GCJ fixes

Reviewed-by: Greg Farnum <greg@inktank.com>
Acked-by: Noah Watkins <noahwatkins@gmail.com>
11 years agoMerge pull request #1806 from ceph/wip-8011
Samuel Just [Wed, 14 May 2014 19:12:44 +0000 (12:12 -0700)]
Merge pull request #1806 from ceph/wip-8011

ReplicatedPG: block scrub on blocked object contexts

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agodoc: Clarified Debian uses sysvinit.
John Wilkins [Wed, 14 May 2014 07:23:22 +0000 (00:23 -0700)]
doc: Clarified Debian uses sysvinit.

Fixes: #7182
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agodoc: Added rgw print continue guidance.
John Wilkins [Wed, 14 May 2014 07:14:30 +0000 (00:14 -0700)]
doc: Added rgw print continue guidance.

Fixes: #7731
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agodoc: Minor edit.
John Wilkins [Wed, 14 May 2014 07:13:41 +0000 (00:13 -0700)]
doc: Minor edit.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agodoc: Added clarifying text to CRUSH add command.
John Wilkins [Wed, 14 May 2014 07:02:09 +0000 (00:02 -0700)]
doc: Added clarifying text to CRUSH add command.

Fixes: #8322
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agodoc: Omitted glance_api_version=2 to fix creating images from volumes.
John Wilkins [Wed, 14 May 2014 06:20:36 +0000 (23:20 -0700)]
doc: Omitted glance_api_version=2 to fix creating images from volumes.

Fixes: #8347
11 years agodoc: Changed example to use virtio and put key usage into one line.
John Wilkins [Wed, 14 May 2014 06:18:50 +0000 (23:18 -0700)]
doc: Changed example to use virtio and put key usage into one line.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agoMerge pull request #1802 from ceph/wip-mds-misc
Sage Weil [Wed, 14 May 2014 01:46:12 +0000 (18:46 -0700)]
Merge pull request #1802 from ceph/wip-mds-misc

Wip mds misc

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1810 from ceph/wip-fedora
Sage Weil [Wed, 14 May 2014 01:11:11 +0000 (18:11 -0700)]
Merge pull request #1810 from ceph/wip-fedora

doc: update instructions for RPM distros

11 years agoImprove Bash completion for various tools
Wido den Hollander [Tue, 13 May 2014 21:48:25 +0000 (23:48 +0200)]
Improve Bash completion for various tools

11 years agotest: fix some templates to match new output code
Greg Farnum [Tue, 13 May 2014 20:15:28 +0000 (13:15 -0700)]
test: fix some templates to match new output code

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agodoc: update instructions for RPM distros 1810/head
John Spray [Tue, 13 May 2014 16:32:03 +0000 (17:32 +0100)]
doc: update instructions for RPM distros

Fix RPM building instructions: this has been broken since
libs3 was included inline in the ceph repo as a submodule.
"rpmbuild -tb" was concatenating the ceph.spec and
libs3.spec files, resulting in something that didn't work.

Also, the instructions suggested downloading a .tar.gz file
whereas the specfile requires a .tar.bz2 file.

Also, add a convenient yum command line for getting the compile
dependencies on Fedora 20.

Signed-off-by: John Spray <john.spray@inktank.com>
11 years agomds: lower IO priority of storing backtrace 1802/head
Yan, Zheng [Tue, 13 May 2014 05:50:47 +0000 (13:50 +0800)]
mds: lower IO priority of storing backtrace

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agoMerge pull request #1771 from ceph/wip-5021
Gregory Farnum [Tue, 13 May 2014 04:39:53 +0000 (21:39 -0700)]
Merge pull request #1771 from ceph/wip-5021

Wip 5021

Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoMerge pull request #1807 from ceph/wip-mds-flock
Yan, Zheng [Tue, 13 May 2014 01:31:00 +0000 (09:31 +0800)]
Merge pull request #1807 from ceph/wip-mds-flock

mds: reduce verbosity of handle_client_file_{readlock,setlock}

11 years agomds: reduce verbosity of handle_client_file_{readlock,setlock} 1807/head
Yan, Zheng [Tue, 13 May 2014 01:28:40 +0000 (09:28 +0800)]
mds: reduce verbosity of handle_client_file_{readlock,setlock}

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agoReplicatedPG: block scrub on blocked object contexts 1805/head 1806/head
Samuel Just [Tue, 6 May 2014 18:50:14 +0000 (11:50 -0700)]
ReplicatedPG: block scrub on blocked object contexts

Fixes: #8011
Backport: firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge pull request #1779 from ceph/wip-7553
Samuel Just [Mon, 12 May 2014 22:29:39 +0000 (15:29 -0700)]
Merge pull request #1779 from ceph/wip-7553

Wip 7553

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agodoc/release-notes: v0.80.1
Sage Weil [Mon, 12 May 2014 21:25:42 +0000 (14:25 -0700)]
doc/release-notes: v0.80.1

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1799 from ceph/wip-8305
Sage Weil [Mon, 12 May 2014 20:33:27 +0000 (13:33 -0700)]
Merge pull request #1799 from ceph/wip-8305

osd: fix op ordering with pool overlay set/removed

Reviewed-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agodoc: Improvements to qemu installation.
John Wilkins [Mon, 12 May 2014 20:20:14 +0000 (13:20 -0700)]
doc: Improvements to qemu installation.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agodoc: Added note on Default requiretty for CentOS and others.
John Wilkins [Mon, 12 May 2014 18:33:57 +0000 (11:33 -0700)]
doc: Added note on Default requiretty for CentOS and others.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agoMerge pull request #1801 from ceph/wip-update-gitignore
Sage Weil [Mon, 12 May 2014 13:10:22 +0000 (06:10 -0700)]
Merge pull request #1801 from ceph/wip-update-gitignore

Update gitignore entries for master

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1800 from ceph/wip-da-SCA-20140510
Sage Weil [Mon, 12 May 2014 12:51:45 +0000 (05:51 -0700)]
Merge pull request #1800 from ceph/wip-da-SCA-20140510

fixes from SCA

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoprioritise use of `javac` executable (gcj provides it through alternatives). 1803/head
Dmitry Smirnov [Mon, 12 May 2014 04:08:44 +0000 (14:08 +1000)]
prioritise use of `javac` executable (gcj provides it through alternatives).

 On Debian this fixes FTBFS when gcj-jdk and openjdk-7-jdk are installed at
 the same time because build system will use default `javac` executable
 provided by current JDK through `update-alternatives` instead of blindly
 calling GCJ when it is present.

Signed-off-by: Dmitry Smirnov <onlyjob@member.fsf.org>
11 years agopass '-classpath' option (gcj/javah ignores CLASSPATH environment variable).
Dmitry Smirnov [Mon, 12 May 2014 04:02:53 +0000 (14:02 +1000)]
pass '-classpath' option (gcj/javah ignores CLASSPATH environment variable).

 This should not affect OpenJDK which understands '-classpath' as well.

 With gcj-jdk we still get FTBFS later:

 ~~~~
    java/native/libcephfs_jni.cc:2878:55: error: invalid conversion from 'const jbyte* {aka const signed char*}' to 'jbyte* {aka signed char*}' [-fpermissive]
                 reinterpret_cast<const jbyte*>(rawAddress));
                                                           ^
    In file included from java/native/libcephfs_jni.cc:27:0:
    /usr/lib/gcc/x86_64-linux-gnu/4.8/include/jni.h:1471:8: error:   initializing argument 4 of 'void _Jv_JNIEnv::SetByteArrayRegion(jbyteArray, jsize, jsize, jbyte*)' [-fpermissive]
       void SetByteArrayRegion (jbyteArray val0, jsize val1, jsize val2, jbyte * val3)
            ^
    make[5] *** [java/native/libcephfs_jni_la-libcephfs_jni.lo] Error 1
 ~~~~

Signed-off-by: Dmitry Smirnov <onlyjob@member.fsf.org>
11 years agolook for "jni.h" in gcj-jdk path, needed to find "jni.h" with gcj-jdk_4.9.0
Dmitry Smirnov [Mon, 12 May 2014 03:57:20 +0000 (13:57 +1000)]
look for "jni.h" in gcj-jdk path, needed to find "jni.h" with gcj-jdk_4.9.0

Signed-off-by: Dmitry Smirnov <onlyjob@member.fsf.org>
11 years agomds: deny reconnect for closed session
Yan, Zheng [Mon, 12 May 2014 03:26:20 +0000 (11:26 +0800)]
mds: deny reconnect for closed session

The client that tries reconnect may have dirty caps and unsafe requests.
Allowing the reconnect attempt may compromise consistency.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agomds: revert EMetaBlob::{fullbit,remotebit,nullbit} encoding optimization
Yan, Zheng [Sun, 11 May 2014 01:53:44 +0000 (09:53 +0800)]
mds: revert EMetaBlob::{fullbit,remotebit,nullbit} encoding optimization

Revert commit 40d56a97 (mds: optimize EMetaBlob::fullbit, remotebit,
nullbit encoding). This optimization creates small segments in the
result bufferlist of encoding EMetaBlob. Perf shows lots of CPU time
are used for allocating list node for bufferlist.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agomds: properly clear new flag for stale client cap
Yan, Zheng [Mon, 12 May 2014 02:24:51 +0000 (10:24 +0800)]
mds: properly clear new flag for stale client cap

CInode::encode_inodestat() should clear the 'new' flag of client
cap even when session is stale, because the 'new' flag prevents
Locker::issue_caps() from sending cap message to client.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agomds: propagate inode rstat if it has never been propagated
Yan, Zheng [Sun, 11 May 2014 05:28:51 +0000 (13:28 +0800)]
mds: propagate inode rstat if it has never been propagated

Otherwise the 'last_dirstat_prop' of directory inode keeps in 'never'
state.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agomds: avoid journaling unnecessary dir context
Yan, Zheng [Sun, 11 May 2014 05:32:46 +0000 (13:32 +0800)]
mds: avoid journaling unnecessary dir context

If base inode is reached, try clearing the 'maybe' list, then stop.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agomds: cleanup usage of MDCache::predirty_journal_parent()
Yan, Zheng [Sun, 11 May 2014 04:20:48 +0000 (12:20 +0800)]
mds: cleanup usage of MDCache::predirty_journal_parent()

The sixth parameter of MDCache::predirty_journal_parent() is 'int'
with default value 0.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agoBtrfsFileStoreBackend.cc: fix ::unlinkat() result handling 1800/head
Danny Al-Gaaf [Mon, 12 May 2014 00:33:44 +0000 (02:33 +0200)]
BtrfsFileStoreBackend.cc: fix ::unlinkat() result handling

Don't check for 'fd' but for the return value of the ::unlinkat() call.

Fix for:
[src/os/BtrfsFileStoreBackend.cc:72] -> [src/os/BtrfsFileStoreBackend.cc:74]:
 (warning) Opposite conditions in nested 'if' blocks lead to a dead code block.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agoTestLFNIndex.cc: remove unused variable 'mangled_name'
Danny Al-Gaaf [Mon, 12 May 2014 00:17:49 +0000 (02:17 +0200)]
TestLFNIndex.cc: remove unused variable 'mangled_name'

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agorgw_user.cc: remove dead assignment in generate_key()
Danny Al-Gaaf [Mon, 12 May 2014 00:07:10 +0000 (02:07 +0200)]
rgw_user.cc: remove dead assignment in generate_key()

Fix for:
[src/rgw/rgw_user.cc:778]: (style) Variable 'subuser' is
 assigned a value that is never used.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agorgw_user.cc: cleanup RGWAccessKeyPool::check_op()
Danny Al-Gaaf [Mon, 12 May 2014 00:01:10 +0000 (02:01 +0200)]
rgw_user.cc: cleanup RGWAccessKeyPool::check_op()

Remove dead assignment and unsued variable 'secret_key'. Check
op_state.get_access_key() directly for emptiness without extra
variable. Fix comment above check for access key.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agorgw_rados.cc: remove dead assignment / unused variable 'obj_name'
Danny Al-Gaaf [Sun, 11 May 2014 23:47:32 +0000 (01:47 +0200)]
rgw_rados.cc: remove dead assignment / unused variable 'obj_name'

Fix for:
[src/rgw/rgw_main.cc:1086]: (style) Variable 'frontend_frameworks'
 is assigned a value that is never used.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agorgw_main.cc: remove dead assignment and unused variable
Danny Al-Gaaf [Sun, 11 May 2014 23:43:09 +0000 (01:43 +0200)]
rgw_main.cc: remove dead assignment and unused variable

Fix for:

[src/rgw/rgw_main.cc:1086]: (style) Variable 'frontend_frameworks' is
 assigned a value that is never used.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agoPGMap.cc: remove dead assignment
Danny Al-Gaaf [Sun, 11 May 2014 23:36:58 +0000 (01:36 +0200)]
PGMap.cc: remove dead assignment

[src/mon/PGMap.cc:865]: (style) Variable 'first' is assigned a value
 that is never used.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agoMDBalancer.cc: remove some since 2009 unused code
Danny Al-Gaaf [Sun, 11 May 2014 23:26:56 +0000 (01:26 +0200)]
MDBalancer.cc: remove some since 2009 unused code

Remove some since long time unused code and variables (commented out
since 2009).

Fix for:

[src/mds/MDBalancer.cc:757]: (style) Variable 'total_sent' is
 assigned a value that is never used.
[src/mds/MDBalancer.cc:665]: (style) Variable 'total_goal' is
 assigned a value that is never used.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agochain_xattr.cc: fix memory leak, free 'expected'
Danny Al-Gaaf [Sun, 11 May 2014 23:14:55 +0000 (01:14 +0200)]
chain_xattr.cc: fix memory leak, free 'expected'

Fix for:
[src/test/objectstore/chain_xattr.cc:186]: (error) Memory leak:
 expected

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agoconfutils.cc: remove unused variable 'val'
Danny Al-Gaaf [Sun, 11 May 2014 23:09:53 +0000 (01:09 +0200)]
confutils.cc: remove unused variable 'val'

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agoSyntheticClient.cc: remove double check for "getdir"
Danny Al-Gaaf [Sun, 11 May 2014 22:49:29 +0000 (00:49 +0200)]
SyntheticClient.cc: remove double check for "getdir"

Fix for:
[src/client/SyntheticClient.cc:1143]: (style) Expression is always
 false because 'else if' condition matches previous condition at line 1139.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agorgw_op.cc: reduce scope of 'int r' in execute()
Danny Al-Gaaf [Sun, 11 May 2014 22:38:48 +0000 (00:38 +0200)]
rgw_op.cc: reduce scope of 'int r' in execute()

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agorgw_op.cc: use static_cast instead of c-style cast
Danny Al-Gaaf [Sun, 11 May 2014 22:33:00 +0000 (00:33 +0200)]
rgw_op.cc: use static_cast instead of c-style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agorgw_quota.cc: remove unused variable 'key'
Danny Al-Gaaf [Sun, 11 May 2014 22:27:37 +0000 (00:27 +0200)]
rgw_quota.cc: remove unused variable 'key'

[src/rgw/rgw_quota.cc:455]: (style) Variable 'key' is assigned a
 value that is never used.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agotest_rgw_admin_log.cc: prefer ++operators for iterators
Danny Al-Gaaf [Sun, 11 May 2014 22:06:55 +0000 (00:06 +0200)]
test_rgw_admin_log.cc: prefer ++operators for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agotest_cls_rbd.cc: use 'delete []' if 'new char[len]' was used
Danny Al-Gaaf [Sun, 11 May 2014 22:05:15 +0000 (00:05 +0200)]
test_cls_rbd.cc: use 'delete []' if 'new char[len]' was used

Fix for:
[src/test/cls_rbd/test_cls_rbd.cc:82]: (error) Mismatching allocation
 and deallocation: b
[src/test/cls_rbd/test_cls_rbd.cc:95]: (error) Mismatching allocation
 and deallocation: b
[src/test/cls_rbd/test_cls_rbd.cc:97]: (error) Mismatching allocation
 and deallocation: b

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agotest_rgw_admin_log.cc: prefer empty() over size() for emptiness check
Danny Al-Gaaf [Sun, 11 May 2014 21:25:36 +0000 (23:25 +0200)]
test_rgw_admin_log.cc: prefer empty() over size() for emptiness check

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agotest_rgw_admin_opstate.cc: prefer ++operators for iterators
Danny Al-Gaaf [Sun, 11 May 2014 21:22:42 +0000 (23:22 +0200)]
test_rgw_admin_opstate.cc: prefer ++operators for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agotest_rgw_admin_meta.cc: prefer ++operators for iterators
Danny Al-Gaaf [Sun, 11 May 2014 21:21:50 +0000 (23:21 +0200)]
test_rgw_admin_meta.cc: prefer ++operators for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agoTestErasureCodePluginJerasure.cc: prefer ++operators for non-primitive types
Danny Al-Gaaf [Sun, 11 May 2014 21:17:14 +0000 (23:17 +0200)]
TestErasureCodePluginJerasure.cc: prefer ++operators for non-primitive types

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agotest/ObjectMap/KeyValueDBMemory.cc: use empty() instead of size()
Danny Al-Gaaf [Sun, 11 May 2014 21:13:00 +0000 (23:13 +0200)]
test/ObjectMap/KeyValueDBMemory.cc: use empty() instead of size()

Use empty() instead of 'size() == 0' to fix:

[src/test/ObjectMap/KeyValueDBMemory.cc:83]: (performance)
 Possible inefficient checking for 'db' emptiness.
[src/test/ObjectMap/KeyValueDBMemory.cc:97]: (performance)
 Possible inefficient checking for 'db' emptiness.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agoFileStore.cc: remove some dead assignments
Danny Al-Gaaf [Sun, 11 May 2014 11:52:37 +0000 (13:52 +0200)]
FileStore.cc: remove some dead assignments

There is no need to reset 'r' to '0'.

Fix for:
3759 r = 0;
     Value stored to 'r' is never read

4093 r = 0;
     Value stored to 'r' is never read

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years ago.gitignore: ignore files generated by ctags on topdir 1801/head
Danny Al-Gaaf [Sun, 11 May 2014 10:26:29 +0000 (12:26 +0200)]
.gitignore: ignore files generated by ctags on topdir

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agoadd gitignore for wireshark subdir to track *.patch only here
Danny Al-Gaaf [Sun, 11 May 2014 10:24:44 +0000 (12:24 +0200)]
add gitignore for wireshark subdir to track *.patch only here

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years ago.gitignore: add some patch/diff related files
Danny Al-Gaaf [Sun, 11 May 2014 10:20:13 +0000 (12:20 +0200)]
.gitignore: add some patch/diff related files

Change *.patch to be ignored in general on all dirs.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years ago.gitignore: add no longer used mkcephfs
Danny Al-Gaaf [Sun, 11 May 2014 10:18:19 +0000 (12:18 +0200)]
.gitignore: add no longer used mkcephfs

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agocls_kvs.cc: return 'r' from get_idata_from_key()
Danny Al-Gaaf [Sun, 11 May 2014 09:55:28 +0000 (11:55 +0200)]
cls_kvs.cc: return 'r' from get_idata_from_key()

Fix for:

69  r = 0;
    Value stored to 'r' is never read

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agocls_kvs.cc: remove dead assignment
Danny Al-Gaaf [Sun, 11 May 2014 09:52:04 +0000 (11:52 +0200)]
cls_kvs.cc: remove dead assignment

Fix for:
[src/key_value_store/cls_kvs.cc:383] -> [src/key_value_store/cls_kvs.cc:386]:
 (performance) Variable 'r' is reassigned a value before the old one has been used.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agorgw_user.cc:
Danny Al-Gaaf [Sun, 11 May 2014 09:28:26 +0000 (11:28 +0200)]
rgw_user.cc:

Remove bool variable 'same_email' compare emails directly in
if check.

Fix for:
[src/rgw/rgw_user.cc:1926] -> [src/rgw/rgw_user.cc:1927]: (performance)
 Variable 'same_email' is reassigned a value before the old one has been used.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agolibcephfs.cc: fix possible NULL pointer deref
Danny Al-Gaaf [Sat, 10 May 2014 22:36:20 +0000 (00:36 +0200)]
libcephfs.cc: fix possible NULL pointer deref

Fix possible NULL pointer dereference of 'inode' in ceph_ll_lookup_inode().
It's not enough to check for 'inode' without assert or error handling before
assert for '*inode != NULL' since this doesn't handle the 'inode == NULL'
case for the later calls.

Fix for:
1192 r = (cmount->get_client())->lookup_parent(*inode, &parent);
     5  Dereference of null pointer (loaded from variable 'inode')

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agoObjecter::_op_submit: only replace the tid if it's 0 1799/head
Samuel Just [Tue, 15 Apr 2014 19:55:47 +0000 (12:55 -0700)]
Objecter::_op_submit: only replace the tid if it's 0

Otherwise, redirected ops will suddenly have a different tid
and will become uncancelable.

Fixes: #7588
Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoosd/OSD.cc: fix possible NULL pointer deref in share_map()
Danny Al-Gaaf [Sat, 10 May 2014 19:37:07 +0000 (21:37 +0200)]
osd/OSD.cc: fix possible NULL pointer deref in share_map()

Fix for:

4778 *sent_epoch_p = osdmap->get_epoch();
     12 Dereference of null pointer (loaded from variable 'sent_epoch_p')

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agoosd/ReplicatedPG: do not queue NULL dup_op
Sage Weil [Sat, 10 May 2014 17:29:11 +0000 (10:29 -0700)]
osd/ReplicatedPG: do not queue NULL dup_op

We call start_flush() with a NULL op in a couple different places.  Do not
put a NULL pointer on the dup_ops list or we will crash later.

Fixes: #8328
Signed-off-by: Sage Weil <sage@inktank.com>
11 years agomds/flock.cc: remove dead initialization of 'new_lock_end'
Danny Al-Gaaf [Sat, 10 May 2014 17:18:35 +0000 (19:18 +0200)]
mds/flock.cc: remove dead initialization of 'new_lock_end'

Fix for:

213 uint64_t new_lock_end = new_lock.start + new_lock.length - 1;
    Value stored to 'new_lock_end' during its initialization is never read

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agomds/flock.cc: remove dead initialization of 'new_lock_start'
Danny Al-Gaaf [Sat, 10 May 2014 17:13:48 +0000 (19:13 +0200)]
mds/flock.cc: remove dead initialization of 'new_lock_start'

Fix for:

212 uint64_t new_lock_start = new_lock.start;
    Value stored to 'new_lock_start' during its initialization is
    never read

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agomds/Server.cc: remove unused initialization of 'destdnl'
Danny Al-Gaaf [Sat, 10 May 2014 17:06:32 +0000 (19:06 +0200)]
mds/Server.cc: remove unused initialization of 'destdnl'

Remove initialization of 'destdnl' since the assigned value was
never used and the same call is used some lines later again before
first usage. Fix for:

6579 CDentry::linkage_t *destdnl = destdn->get_linkage();
     Value stored to 'destdnl' during its initialization is never read

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agomon/OSDMonitor: force op resend when pool overlay changes
Sage Weil [Thu, 8 May 2014 17:42:42 +0000 (10:42 -0700)]
mon/OSDMonitor: force op resend when pool overlay changes

If a client is sending a sequence of ops (say, a, b, c, d) and partway
through that sequence it receives an OSDMap update that changes the
overlay, the ops will get send to different pools, and the replies will
come back completely out of order.

To fix this, force a resend of all outstanding ops any time the overlay
changes.

Fixes: #8305
Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: discard client ops sent before last_force_op_resend
Sage Weil [Thu, 8 May 2014 17:50:51 +0000 (10:50 -0700)]
osd: discard client ops sent before last_force_op_resend

If an op is sent before last_force_op_resend, and the client's feature is
present, drop the op because we know they will resend.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosdc/Objecter: resend ops in the last_force_op_resend epoch
Sage Weil [Thu, 8 May 2014 17:52:11 +0000 (10:52 -0700)]
osdc/Objecter: resend ops in the last_force_op_resend epoch

If we are a client, and process a map that sets last_force_op_resend to
the current epoch, force a resend of this op.

If the OSD expects us to do this, it will discard our previous op.  If the
OSD is old, it will process the old one, this will appear as a dup, and we
are no worse off than before.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agorbd.cc: remove used parameter from set_pool_image_name()
Danny Al-Gaaf [Sat, 10 May 2014 09:51:41 +0000 (11:51 +0200)]
rbd.cc: remove used parameter from set_pool_image_name()

Removed unused 'orig_pool' parameter from set_pool_image_name().

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agotest_librbd.cc: fix sizeof() in malloc call
Danny Al-Gaaf [Sat, 10 May 2014 08:58:56 +0000 (10:58 +0200)]
test_librbd.cc: fix sizeof() in malloc call

Use 'char' instead of 'char *'.

228  names = (char *) malloc(sizeof(char *) * 1024);
     Result of 'malloc' is converted to a pointer of type 'char',
     which is incompatible with sizeof operand type 'char *'

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agoCrushWrapper.cc: fix sizeof() call in calloc
Danny Al-Gaaf [Sat, 10 May 2014 08:50:32 +0000 (10:50 +0200)]
CrushWrapper.cc: fix sizeof() call in calloc

Use __u32 instead of __s32 due to type of bucket->parm to fix:

1028 bucket->perm = (__u32*)calloc(1, bucket->size * sizeof(__s32));
     Result of 'calloc' is converted to a pointer of type '__u32',
     which is incompatible with sizeof operand type '__s32'

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agoclient: fix whitespace in stat relpath 1771/head
Sage Weil [Tue, 2 Jul 2013 00:48:09 +0000 (17:48 -0700)]
client: fix whitespace in stat relpath

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoclient: use __func__ instead of incorrect function name in insert_readdir_results
Sage Weil [Tue, 2 Jul 2013 00:47:06 +0000 (17:47 -0700)]
client: use __func__ instead of incorrect function name in insert_readdir_results

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoclient: make less noise when unlinking during readdir
Sage Weil [Tue, 2 Jul 2013 00:45:54 +0000 (17:45 -0700)]
client: make less noise when unlinking during readdir

Skip, but do not talk about, NULL dentries.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoclient: invalidate dentry leases when unlinking
Sage Weil [Fri, 24 May 2013 00:12:27 +0000 (17:12 -0700)]
client: invalidate dentry leases when unlinking

In many case when we are unlinking inodes we also need to invalidate the
dentry lease, as we are not promised that the dentry is NULL.  Be a bit
over-conservative here for good measure.

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agoclient: audit unlink() callers
Sage Weil [Sat, 18 May 2013 02:06:32 +0000 (19:06 -0700)]
client: audit unlink() callers

Basically, always keep the dentry and dir, unless we are pruning.

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agoMerge pull request #1781 from ceph/wip-8269
Josh Durgin [Fri, 9 May 2014 21:44:25 +0000 (14:44 -0700)]
Merge pull request #1781 from ceph/wip-8269

Wip 8269

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agomsg: Fix inconsistent message sequence negotiation during connection reset
Guang Yang [Fri, 9 May 2014 09:21:23 +0000 (09:21 +0000)]
msg: Fix inconsistent message sequence negotiation during connection reset

Backport: firefly, emperor, dumpling

Signed-off-by: Guang Yang (yguang@yahoo-inc.com)
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoMerge pull request #1796 from daniel-j-h/missing_initializers
Sage Weil [Fri, 9 May 2014 18:03:06 +0000 (11:03 -0700)]
Merge pull request #1796 from daniel-j-h/missing_initializers

Fixed missing initializers issues

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1797 from ceph/wip-7588
Sage Weil [Fri, 9 May 2014 18:01:46 +0000 (11:01 -0700)]
Merge pull request #1797 from ceph/wip-7588

osd/ReplicatedPG: carry CopyOpRef in copy_from completion

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge tag 'v0.80'
Sage Weil [Fri, 9 May 2014 17:58:35 +0000 (10:58 -0700)]
Merge tag 'v0.80'

v0.80

Conflicts:
src/osd/PG.cc
src/osd/ReplicatedPG.cc

11 years agoMerge pull request #1798 from ceph/wip-8319
Sage Weil [Fri, 9 May 2014 17:45:42 +0000 (10:45 -0700)]
Merge pull request #1798 from ceph/wip-8319

osd: fix race during shutdown

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge pull request #1731 from dynamike67/patch-2
John Wilkins [Fri, 9 May 2014 17:33:33 +0000 (10:33 -0700)]
Merge pull request #1731 from dynamike67/patch-2

doc: Changed the java code example

11 years agoosd: fix MOSDMarkMeDown name
Sage Weil [Fri, 9 May 2014 16:06:42 +0000 (09:06 -0700)]
osd: fix MOSDMarkMeDown name

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1792 from nereocystis/Ceph-osd-is-daemon
John Wilkins [Fri, 9 May 2014 17:28:52 +0000 (10:28 -0700)]
Merge pull request #1792 from nereocystis/Ceph-osd-is-daemon

:doc Ceph OSD is standard name

11 years agoMerge pull request #1786 from nereocystis/quick-common
John Wilkins [Fri, 9 May 2014 17:27:53 +0000 (10:27 -0700)]
Merge pull request #1786 from nereocystis/quick-common

doc: Common graph used in 2 quick start files

11 years agoMerge pull request #1732 from dynamike67/master
John Wilkins [Fri, 9 May 2014 17:22:15 +0000 (10:22 -0700)]
Merge pull request #1732 from dynamike67/master

doc: Added Java Example

11 years agoosd: handle race between osdmap and prepare_to_stop 1798/head
Sage Weil [Fri, 9 May 2014 16:20:34 +0000 (09:20 -0700)]
osd: handle race between osdmap and prepare_to_stop

If we get a MOSDMarkMeDown message and set service.state == STOPPING, we
kick the prepare_to_stop() thread.  Normally, it will wake up and then
set osd.state == STOPPING, and when we process the map message next we
will not warn.  However, if dispatch() takes the lock instead and processes
the map, it will fail the preparing_to_stop check and issue a spurious
warning.

Fix by checking for either preparing_to_stop or stopping.

Fixes: #8319
Backport: firefly, emperor, dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoosd: fix state method whitespace
Sage Weil [Fri, 9 May 2014 16:12:42 +0000 (09:12 -0700)]
osd: fix state method whitespace

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoFixed missing initializers issues 1796/head
Daniel J. Hofmann [Fri, 9 May 2014 15:25:07 +0000 (17:25 +0200)]
Fixed missing initializers issues

Signed-off-by: Daniel J. Hofmann <daniel@trvx.org>
11 years agoMerge pull request #1795 from daniel-j-h/extra_semicolons
Sage Weil [Fri, 9 May 2014 13:49:28 +0000 (06:49 -0700)]
Merge pull request #1795 from daniel-j-h/extra_semicolons

Removed extra semicolons

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoRemoved extra semicolons 1795/head
Daniel J. Hofmann [Fri, 9 May 2014 13:07:15 +0000 (15:07 +0200)]
Removed extra semicolons

Signed-off-by: Daniel J. Hofmann <daniel@trvx.org>
11 years agoMerge pull request #1772 from ceph/wip-8169
Josh Durgin [Thu, 8 May 2014 22:35:45 +0000 (15:35 -0700)]
Merge pull request #1772 from ceph/wip-8169

rgw: calculate user manifest

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>