Commit Graph

33638 Commits

Author SHA1 Message Date
Danny Al-Gaaf
d69fd9056f test_rgw_admin_opstate.cc: prefer ++operators for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-11 23:22:42 +02:00
Danny Al-Gaaf
0f899c8c63 test_rgw_admin_meta.cc: prefer ++operators for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-11 23:21:50 +02:00
Danny Al-Gaaf
f523d64df9 TestErasureCodePluginJerasure.cc: prefer ++operators for non-primitive types
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-11 23:17:14 +02:00
Danny Al-Gaaf
014f050851 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>
2014-05-11 23:13:00 +02:00
Danny Al-Gaaf
b24b77a4a2 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>
2014-05-11 13:52:37 +02:00
Danny Al-Gaaf
39c071fe95 .gitignore: ignore files generated by ctags on topdir
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-11 12:26:29 +02:00
Danny Al-Gaaf
e847d560e5 add gitignore for wireshark subdir to track *.patch only here
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-11 12:24:44 +02:00
Danny Al-Gaaf
b9cf708636 .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>
2014-05-11 12:20:13 +02:00
Danny Al-Gaaf
f067013a8e .gitignore: add no longer used mkcephfs
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-11 12:18:19 +02:00
Danny Al-Gaaf
ea69f6b1aa 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>
2014-05-11 11:55:28 +02:00
Danny Al-Gaaf
574a94056b 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>
2014-05-11 11:52:04 +02:00
Danny Al-Gaaf
36c1c974aa 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>
2014-05-11 11:28:26 +02:00
Danny Al-Gaaf
a121d01461 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>
2014-05-11 00:36:20 +02:00
Samuel Just
76568aa0db 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>
2014-05-10 15:15:57 -07:00
Danny Al-Gaaf
94773aca77 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>
2014-05-10 21:37:07 +02:00
Sage Weil
0d67f9b069 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>
2014-05-10 10:29:11 -07:00
Danny Al-Gaaf
79c6491cc6 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>
2014-05-10 19:18:35 +02:00
Danny Al-Gaaf
e8b47897fb 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>
2014-05-10 19:13:48 +02:00
Danny Al-Gaaf
5199c14290 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>
2014-05-10 19:06:32 +02:00
Sage Weil
63d92ab096 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>
2014-05-10 09:12:26 -07:00
Sage Weil
45e79a17a9 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>
2014-05-10 09:12:26 -07:00
Sage Weil
dd700bdf71 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>
2014-05-10 09:12:26 -07:00
Danny Al-Gaaf
b3203e54ec 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>
2014-05-10 11:51:41 +02:00
Danny Al-Gaaf
fe75075574 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>
2014-05-10 10:58:56 +02:00
Danny Al-Gaaf
eb2def87f8 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>
2014-05-10 10:50:32 +02:00
Sage Weil
11e5eef331 client: fix whitespace in stat relpath
Signed-off-by: Sage Weil <sage@inktank.com>
2014-05-10 11:50:09 +08:00
Sage Weil
cdbe6cfb72 client: use __func__ instead of incorrect function name in insert_readdir_results
Signed-off-by: Sage Weil <sage@inktank.com>
2014-05-10 11:50:09 +08:00
Sage Weil
3eb2a77442 client: make less noise when unlinking during readdir
Skip, but do not talk about, NULL dentries.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-05-10 11:50:09 +08:00
Sage Weil
d1c872d880 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>
2014-05-10 11:50:09 +08:00
Sage Weil
d852a69fba 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>
2014-05-10 11:50:00 +08:00
Josh Durgin
bc8d5f42be Merge pull request #1781 from ceph/wip-8269
Wip 8269

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-05-09 14:44:25 -07:00
Greg Farnum
3b867d319b TrackedOp: create an "initiated" event on construction
This ensures we always have an event for state_string().

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-09 14:09:30 -07:00
Guang Yang
bdee119076 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>
2014-05-09 11:04:29 -07:00
Sage Weil
76dcf2d149 Merge pull request #1796 from daniel-j-h/missing_initializers
Fixed missing initializers issues

Reviewed-by: Sage Weil <sage@inktank.com>
2014-05-09 11:03:06 -07:00
Sage Weil
f302b60aad Merge pull request #1797 from ceph/wip-7588
osd/ReplicatedPG: carry CopyOpRef in copy_from completion

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-05-09 11:01:46 -07:00
Sage Weil
d903895441 v0.80
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJTaOuwAAoJEH6/3V0X7TFtMQgP/1UWkr94SrxwHwToD5TsLug4
 aeR923MnBn5qyPCDNyqpftWtxskfPSdDxJlkpc6qsFYlupECIb593z4F7tFejzVh
 LN0fkdHmut9g7EDpd9kgNeqgTb8tqxj/Nq4jih1fXWeznNEaQWkk5dVA8UsopCyv
 0FvSllxmTwD/jNtaloXb8jSI/wtjIlQzhucjJb80OjdIl7LfmtsA3DAAweTjX7c0
 Wv8daBnj2clgSe+gjYHvXOopzNszB9/+K5kWgLS5Cvs4ngHeYh03O7hVoFluHRbc
 hnzLQHMs/Pfs6HR2+eybc7z3UYxfVKZkcHpCqVzM5+lCwKQc61MZeJrJg7RWcTgP
 SNFBPYMMgPZABpdhNi3qEJpvZ65pD/gfShXdzQwMnXRCIF0714LWKYdsuSRCr9Lf
 3pkZ+zPHaID2OWWOXDOe6WY1Wg1YiVt8uss9ZRsOCkKDnc8JzPhx5Z7f4+f74bOU
 Cm7xLQH8EJtrxqQjGz2HO3OucI253OceVHWh2L9nHbRRNM3LMxW8fbd/dEbIfHiG
 g6Qh+NbyuRtiYLq7pRChKirE67dqXNoauE0Co0M6C6x1hqou41YQMD0gwjPdj5Iy
 1tScKXS+onPzt9KR/ZA8RNOLCCnLdOSn4G0qRD0xJIdyDPB562u6FNv9b4X7xgry
 kxpFEPCfRGSNNH2hNb0X
 =sTfQ
 -----END PGP SIGNATURE-----

Merge tag 'v0.80'

v0.80

Conflicts:
	src/osd/PG.cc
	src/osd/ReplicatedPG.cc
2014-05-09 10:58:35 -07:00
Sage Weil
47f5dc0676 Merge pull request #1798 from ceph/wip-8319
osd: fix race during shutdown

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-05-09 10:45:42 -07:00
John Wilkins
4ef7fa9f30 Merge pull request #1731 from dynamike67/patch-2
doc: Changed the java code example
2014-05-09 10:33:33 -07:00
Sage Weil
b5e4cd13c0 osd: fix MOSDMarkMeDown name
Signed-off-by: Sage Weil <sage@inktank.com>
2014-05-09 10:31:15 -07:00
John Wilkins
bb614e5055 Merge pull request #1792 from nereocystis/Ceph-osd-is-daemon
:doc Ceph OSD is standard name
2014-05-09 10:28:52 -07:00
John Wilkins
0d0c209263 Merge pull request #1786 from nereocystis/quick-common
doc: Common graph used in 2 quick start files
2014-05-09 10:27:53 -07:00
John Wilkins
49033e8cd5 Merge pull request #1732 from dynamike67/master
doc: Added Java Example
2014-05-09 10:22:15 -07:00
Sage Weil
6b858be067 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>
2014-05-09 09:20:34 -07:00
Sage Weil
b640301084 osd: fix state method whitespace
Signed-off-by: Sage Weil <sage@inktank.com>
2014-05-09 09:12:42 -07:00
Daniel J. Hofmann
ba014459ed Fixed missing initializers issues
Signed-off-by: Daniel J. Hofmann <daniel@trvx.org>
2014-05-09 17:25:07 +02:00
Sage Weil
edb14affd8 Merge pull request #1795 from daniel-j-h/extra_semicolons
Removed extra semicolons

Reviewed-by: Sage Weil <sage@inktank.com>
2014-05-09 06:49:28 -07:00
Daniel J. Hofmann
60b1071d64 Removed extra semicolons
Signed-off-by: Daniel J. Hofmann <daniel@trvx.org>
2014-05-09 15:07:15 +02:00
Josh Durgin
d34cc1e7cd Merge pull request #1772 from ceph/wip-8169
rgw: calculate user manifest

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-05-08 15:35:45 -07:00
Kevin Dalley
5986f746dc :doc Ceph OSD is standard name
This is a method of standardizing the usage of OSD so that "Ceph OSD"
is the daemon, and OSD maintains its industry standard usage of Object
Storage Device.

Signed-off-by: Kevin Dalley <kevin@kelphead.org>
2014-05-08 14:58:02 -07:00
Yehuda Sadeh
ddc2e1a8e3 rgw: calculate user manifest
Fixes: #8169
Backport: firefly
We didn't calculate the user manifest's object etag at all. The etag
needs to be the md5 of the contantenation of all the parts' etags.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2014-05-08 14:29:12 -07:00