Commit Graph

24664 Commits

Author SHA1 Message Date
Danny Al-Gaaf
da51f596a0 src/rados.cc: remove unused variable
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 15:05:00 +01:00
Danny Al-Gaaf
965f5d0cfd src/osdmaptool.cc: remove some unused variables
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 15:02:09 +01:00
Danny Al-Gaaf
531ff1c052 osdc/Objecter.cc: use static_cast instead of C-Style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 14:58:59 +01:00
Danny Al-Gaaf
0517a2d537 osdc/ObjectCacher.cc: set left to 0 instead off 'left -= left'
Instead of call 'left -= left', which results in 0, set left directly
to 0 and remove not needed assert call 'left == 0'.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 14:50:23 +01:00
Danny Al-Gaaf
75531a100e osdc/ObjectCacher.cc: use static_cast instead of C-Style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 14:38:24 +01:00
Danny Al-Gaaf
868447d65d os/FileStore.cc: move variable async_done to the right #ifdef block
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 14:06:10 +01:00
Danny Al-Gaaf
2a94340019 os/FileStore.cc: remove assignment of a never used value
There is no need to set local variable basedir_fd to -1 after
closing and right before leaving the function.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 14:03:27 +01:00
Danny Al-Gaaf
a6f4de924c msg/SimpleMessenger.cc: use static_cast instead of C-Style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 13:45:33 +01:00
Danny Al-Gaaf
637e8e77e5 mon/PGMonitor.cc: use static_cast instead of C-Style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 13:30:04 +01:00
Danny Al-Gaaf
0ed2f377d7 mon/Monitor.cc: Clarify calculation precedence for '%' and '?'
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 13:25:41 +01:00
Danny Al-Gaaf
88b6b572d2 librbd/internal.cc: clarify expression with parentheses
From cppcheck:
 [src/librbd/internal.cc:379]: (style) Boolean result is used in
 bitwise operation. Clarify expression with parentheses.
2013-03-11 12:52:44 +01:00
Danny Al-Gaaf
f7eec26a1d SyntheticClient.cc: Clarify calculation precedence for '%' and '?'
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 12:25:06 +01:00
Danny Al-Gaaf
94d370e739 fusetrace_ll.cc: reduce scope of 'int err' in main()
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 12:13:06 +01:00
Danny Al-Gaaf
5c1dc92951 mds/Locker.cc: fix warning about 'Possible null pointer dereference'
Fix following warning from cppcheck:
 [src/mds/Locker.cc:2255] -> [src/mds/Locker.cc:2258]: (error)
   Possible null pointer dereference: in - otherwise it is redundant
   to check it against null.

Since head_in used for call pick_inode_snap() is already valid,
there is no need to check if 'CInode *in' is not NULL. Remove
not needed check.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 12:13:01 +01:00
Danny Al-Gaaf
f971a67c7b mds/Locker.cc: use static_cast instead of C-Style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 12:12:56 +01:00
Sage Weil
07820f032f mon/MonMap: don't crash on dup IP in mon host
If the mon_host line has an IP twice, we shouldn't crash.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-09 22:12:00 -08:00
Andras Elso
0dd956cb02 debian: Fix FTBFS because depend on old libboost-dev
Signed-off-by: Andras Elso <elso.andras@gmail.com>
2013-03-10 01:18:16 +01:00
David Zafman
3fbdfd30e0 Add code to check flag state
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-03-08 20:23:21 -08:00
Sage Weil
494f968aaf Merge remote-tracking branch 'gh/next' 2013-03-08 18:38:32 -08:00
Noah Watkins
0e33490a76 librados: fix installed header include paths
Avoid referencing non-installed header deps.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-03-08 17:49:55 -08:00
Dan Mick
c7aa897ce0 ceph_common.sh: add warning if 'host' contains dots
This is a common error and there's no reason the script can't
at least tell you it's a really bad idea.  One might argue it
could even successfully proactively truncate the host parameter
at the first dot, but that's a little controlling, perhaps.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-08 17:10:11 -08:00
Dan Mick
4fe52a7ff4 Revert "Update conf.py"
This reverts commit 7008992062.
Apparently github's edit lets you commit directly to the repo.
Oops.
2013-03-08 15:46:34 -08:00
Dan Mick
7008992062 Update conf.py 2013-03-08 15:44:28 -08:00
David Zafman
776c042844 osd: noscrub, nodeepscrub osdmap flags
Just add NOSCRUB/NODEEP_SCRUB to OSDMap flags and  allow set/unset

Feature: #4135

Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-03-08 14:06:24 -08:00
Sage Weil
2c40124bcb Merge pull request #96 from concubidated/master
Fix output of command 'ceph osd tree --format=json'

Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-08 13:49:04 -08:00
John Wilkins
cdb4ae3e06 doc: Added a new network configuration reference document.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-03-08 13:45:04 -08:00
Concubidated
9bcba944c6 Fix output of 'ceph osd tree --format=json'
Signed-off-by: Tyler Brekke <tyler.brekke@inktank.com>
2013-03-08 13:44:39 -08:00
John Wilkins
3854d3ed27 doc: Added network settings. Reorganized index.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-03-08 13:44:31 -08:00
John Wilkins
4c8c36c36b doc: Excised network settings.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-03-08 13:43:44 -08:00
John Wilkins
da706c15d8 doc: Format edits. Excised much of network discussion. Added reference to network guide.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-03-08 13:43:12 -08:00
Samuel Just
31a110c5d0 Merge branch 'wip-osd-map' into next
Fixes: 4369
Backport: bobtail
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-03-08 12:45:41 -08:00
Sage Weil
881e9d850c osd: mark down connections from old peers
Close out any connection with an old peer.  This avoids a race like:

- peer marked down
- we get map, mark down the con
- they reconnect and try to send us some stuff
- we share our map to tell them they are old and dead, but leave the con
  open
...
- peer marks itself up a few times, eventually reuses the same port
- sends messages on their fresh con
- we discard because of our old con

This could cause a tight reconnect loop, but it is better than wrong
behavior.

Other possible fixes:
 - make addr nonce truly unique (augment pid in nonce)
 - make a smarter 'disposable' msgr state (bleh)

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-08 12:40:36 -08:00
Sage Weil
ba7e815a18 osd/PG: rename require_same_or_newer_map -> is_same_or_newer_map
This avoids confusion with the OSD method of the same name, and better
matches what the function tests (and does not do).

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-08 12:40:36 -08:00
Sage Weil
7a9107d1b8 mon/Paxos: make old clock skew message more/less suggestive
There is a separate clock skew check now, and more often than not this
suggests laggy messages, and not necessarily skew.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-08 10:43:21 -08:00
Yehuda Sadeh
2535e04fce Merge pull request #92 from jaharkes/content_length
Properly format Content-Length: header on 32-bit systems.

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
2013-03-08 09:45:44 -08:00
Jan Harkes
416b962c85 Properly format Content-Length: header on 32-bit systems.
- Promote len argument in dump_content_length to uint64_t.
- Make sure there is sufficient scratch space to format string.
- Use PRIu64 macro for formatting.

Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
2013-03-08 12:28:54 -05:00
Yehuda Sadeh
4384e59ad0 rgw: set attrs on various list bucket xml results (swift)
Fixes: #4247
The list buckets operation was missing some attrs on the different
xml result entities. This fixes it.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-03-08 08:31:42 -08:00
Yehuda Sadeh
7cb6ee2807 formatter: add the ability to dump attrs in xml entities
xml entities may have attrs assigned to them. Add the ability
to set them. A usage example:

formatter->open_array_section_with_attrs("container",
     FormatterAttrs("name", "foo", NULL));

This will generate the following xml entity:
<container name="foo">

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-03-08 08:31:37 -08:00
Yehuda Sadeh
6669e73fa5 rgw: don't iterate through all objects when in namespace
Fixes: #4363
Backport: argonaut, bobtail
When listing objects in namespace don't iterate through all the
objects, only go though the ones that starts with the namespace
prefix

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-03-08 06:55:03 -08:00
Yehuda Sadeh
108063c98f Merge pull request #93 from jaharkes/range_requests
Avoid sending a success response when an error occurs.

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
2013-03-08 06:47:00 -08:00
David Zafman
38e55dc574 Merge branch 'wip-2733' 2013-03-07 20:02:04 -08:00
David Zafman
3b260f3dbd Add filestore_replica_fadvise config option default true
Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Sam Just <sam.just@inktank.com>
2013-03-07 20:00:13 -08:00
David Zafman
f52ec6decd osd: fadvise replica data don't use
Add transaction flag indicating if op is at a replica
After write has been sync'ed use posix_fadvise() to clear kernel cache

Feature: #2733

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Sam Just <sam.just@inktank.com>
2013-03-07 19:36:07 -08:00
Jan Harkes
08d5a283df Avoid sending a success response when an error occurs.
Functions called from RGWGetObj_ObjStore_S3::send_response_data may
change the value of the non-local variable 'ret'. But the response
relies on a local 'req_state' which copies ret at the start of the
function.

Right now none of the called functions actually changes ret so the
problem doesn't trigger, but to avoid future breakage it is safer
to not rely on the (early) copy of the ret variable.

Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
2013-03-07 22:29:39 -05:00
David Zafman
edd0a1c69f Fix FileStore to notice if filestore_flusher config is changed
Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-07 17:59:31 -08:00
Sage Weil
de62a79589 Merge branch 'wip-traceless'
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-03-07 17:52:26 -08:00
Sage Weil
eb9b5f074f client: move annoying traceless handling into verify_reply_trace()
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 17:51:57 -08:00
Sage Weil
3f1b7fd590 client: debug async cache invalidation
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 17:51:57 -08:00
Sage Weil
3a7233bc8b mds: pass created_ino back to client on replayed requests
After an MDS restart, the client will resend uncommitted requests.  Use the
information we now have in the session_info_t to pass the created ino
back via the extra_bl payload in the reply.

Fixes: #4034
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 17:51:57 -08:00
Sage Weil
0bcf2ac081 mds: track created inos with completed request ids in session info
Along with each session completed request (tid), also track the created
ino (if any).  This will be used to pass back to the client when they
replay requests in the next patch.

Do not bother making this a backward compatible encoding.  The only
benefit is to allow ceph-mds code to run and then old mds code to run
after it.  Given all of the other incompat changes we *just* made, this
is highly unlikely and not worth the code clutter.  If we had spanned
more releases or a stable release the story would be different.

While we are here, inline the second add_completed_request() method variant
since there is only a single caller and having it overloaded somewhat
obscures what is going on.  This also avoids a duplicate lookup in the
session map in the have_session() check and then in the (old) helper.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 17:51:56 -08:00