Merge pull request #2182 from ceph/wip-round

use llrintl when converting double to micro

Reviewed-by: Greg Farnum <greg@inktank.com>
Merge pull request #2190 from ceph/wip-osd-leaks

osd: do not leak Session* ref in _send_boot()

Reviewed-by: Greg Farnum <greg@inktank.com>
Merge remote-tracking branch 'gh/next'
Merge pull request #2172 from ceph/wip-8714

osd: prevent old clients from using tiered pools

Reviewed-by: Samuel Just <sam.just@inktank.com>
Merge pull request #2180 from ceph/wip-ec-isa

osd: add support for intel ISA-L EC library
Merge pull request #2175 from majianpeng/fix1

ReplicatedPG: For async-read, set the real result after completing read.

Reviewed-by: Samuel Just <sam.just@inktank.com>
Merge pull request #2183 from majianpeng/master

ECBackend: Using ROUND_UP_TO to refactor function get_recovery_chunk_size()

Reviewed-by: Samuel Just <sam.just@inktank.com>
osd: promotion on 2nd read for cache tiering

Signed-off-by: Zhiqiang Wang <wonzhq@hotmail.com>
ceph_test_rados_api_tier: test promote-on-second-read behavior

Signed-off-by: Zhiqiang Wang <wonzhq@hotmail.com>
Signed-off-by: Sage Weil <sage@redhat.com>
Merge branch 'wip-cache-second'

Reviewed-by: Samuel Just <sam.just@inktank.com>
Merge pull request #2169 from ceph/wip-double-pc

mon: s/%%/%/

Realized where these came from; it was an accident.
Merge pull request #2174 from yuyuyu101/kvstore-superblock

Kvstore superblock

Reviewed-by: Sage Weil <sage@redhat.com>
os/KeyValueStore: clean up operator<< for KVSuperBlock

Signed-off-by: Sage Weil <sage@redhat.com>
Merge pull request #2188 from wonzhq/obj-mtime

osd: add local_mtime to struct object_info_t

Reviewed-by: Sage Weil <sage@redhat.com>
doc/release-notes: fix syntax error

Attempt 2...

ERROR: /srv/autobuild-ceph/gitbuilder.git/build/doc/release-notes.rst:22: Unknown target name: "leveldb".

Signed-off-by: Sage Weil <sage@redhat.com>
rgw: need to pass need_to_wait for throttle_data()

need_to_wait wasn't passed into processor->throttle_data(). This was
broken in fix for #8937.

CID 1229541:    (PW.PARAM_SET_BUT_NOT_USED)

Backport: firefly

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
os/MemStore: fix lock leak

CID 1228868 (#2-1 of 2): Missing unlock (LOCK)
12. missing_unlock: Returning without unlocking oc->lock.L.

Signed-off-by: Sage Weil <sage@redhat.com>
msg/SimpleMessenger: drop msgr lock when joining a Pipe

Avoid this deadlock:

- a fault
- delay thread entry gets a fast dispatch message
 - drops delay_lock
 - calls into fast_dispatch
- reaper tries to reap the pipe
 - pipe->join()
  - delay_thread->join()
   - blocks waiting for delay_thread to exit
- delay thread / fast dispatch blocks on msgr->lock trying to mark_down

The solution is to drop the msgr lock while joining the thread.  This will
allow the join() to complete.  Adjust the reaper thread to recheck the
exit condition since the lock may have been dropped.  The other two callers
do not care.

Fixes: #8891
Signed-off-by: Sage Weil <sage@redhat.com>
ECBackend: Don't directly use get_recovery_chunk_size() in RecoveryOp::WRITING state.

We cannot guarantee that conf->osd_recovery_max_chunk don't change when
recoverying a erasure object.
If change between RecoveryOp::READING and RecoveryOp::WRITING, it can cause this bug:

2014-07-30 10:12:09.599220 7f7ff26c0700 -1 osd/ECBackend.cc: In function
'void ECBackend::continue_recovery_op(ECBackend::RecoveryOp&,
RecoveryMessages*)' thread 7f7ff26c0700 time 2014-07-30 10:12:09.596837
osd/ECBackend.cc: 529: FAILED assert(pop.data.length() ==
sinfo.aligned_logical_offset_to_chunk_offset(
after_progress.data_recovered_to -
op.recovery_progress.data_recovered_to))

 ceph version 0.83-383-g3cfda57
(3cfda577b15039cb5c678b79bef3e561df826ed1)
 1: (ECBackend::continue_recovery_op(ECBackend::RecoveryOp&,RecoveryMessages*)+0x1a50) [0x928070]
 2: (ECBackend::handle_recovery_read_complete(hobject_t const&,
boost::tuples::tuple<unsigned long, unsigned long, std::map<pg_shard_t,
ceph::buffer::list, std::less<pg_shard_t>,
std::allocator<std::pair<pg_shard_t const, ceph::buffer::list> > >,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type>&, boost::optional<std::map<std::string,
ceph::buffer::list, std::less<std::string>,
std::allocator<std::pair<std::string const, ceph::buffer::list> > > >,
RecoveryMessages*)+0x90c) [0x92952c]
 3: (OnRecoveryReadComplete::finish(std::pair<RecoveryMessages*,
ECBackend::read_result_t&>&)+0x121) [0x938481]
 4: (GenContext<std::pair<RecoveryMessages*,
ECBackend::read_result_t&>&>::complete(std::pair<RecoveryMessages*,
ECBackend::read_result_t&>&)+0x9) [0x929d69]
 5: (ECBackend::complete_read_op(ECBackend::ReadOp&,RecoveryMessages*)+0x63) [0x91c6e3]
 6: (ECBackend::handle_sub_read_reply(pg_shard_t, ECSubReadReply&,RecoveryMessages*)+0x96d) [0x920b4d]
 7: (ECBackend::handle_message(std::tr1::shared_ptr<OpRequest>)+0x17e)[0x92884e]
 8: (ReplicatedPG::do_request(std::tr1::shared_ptr<OpRequest>&,ThreadPool::TPHandle&)+0x23b) [0x7b34db]
 9: (OSD::dequeue_op(boost::intrusive_ptr<PG>,std::tr1::shared_ptr<OpRequest>, ThreadPool::TPHandle&)+0x428)
[0x638d58]
 10: (OSD::ShardedOpWQ::_process(unsigned int,ceph::heartbeat_handle_d*)+0x346) [0x6392f6]
 11: (ShardedThreadPool::shardedthreadpool_worker(unsigned int)+0x8ce)[0xa5caae]
 12: (ShardedThreadPool::WorkThreadSharded::entry()+0x10) [0xa5ed00]
 13: (()+0x8182) [0x7f800b5d3182]
 14: (clone()+0x6d) [0x7f800997430d]
 NOTE: a copy of the executable, or `objdump -rdS <executable>` is
needed to interpret this.

So we only get the get_recovery_chunk_size() at RecoverOp::READING and
record it using RecoveryOp::extent_requested.

Signed-off-by: Ma Jianpeng <jianpeng.ma@intel.com>
ceph-conf: flush log on exit

This makes it deterministic whether we output

2014-08-03 20:59:45.482614 4036c80 -1 did not load config file, using default settings.

or not, and will make the unit tests stop intermittently failing.

Signed-off-by: Sage Weil <sage@redhat.com>