Haomai Wang [Tue, 9 Dec 2014 08:55:28 +0000 (16:55 +0800)]
AsyncConnection: Fix time event is called after AsyncMessenger destruction
AsyncConnection uses time event to handle async event partially, but it's not
very effective so here use dispatch_event_external instead.
And if client try to connect to server after a period, it may be call
AsyncConnection::process which will reference to AsyncMessenger. Since
AsyncMessenger doesn't use reference count, it will result in segment
fault. Now we record time event id and delete these registered time events
when stopping connection.
Ken Dreyer [Wed, 17 Dec 2014 20:05:21 +0000 (13:05 -0700)]
ceph.spec.in: quote %files macro in comment
Prior to this commit, RPM would expand the %files macro that was present
in the comment.
Use a double percent sign to quote the macro so that RPM will not expand
it.
This fixes an rpmlint warning, "W: macro-in-comment %files"
More information from rpmlint's "-I" (help) command:
$ rpmlint -I macro-in-comment
macro-in-comment:
There is a unescaped macro after a shell style comment in the
specfile. Macros are expanded everywhere, so check if it can cause a
problem in this case and escape the macro with another leading % if
appropriate.
John Spray [Tue, 9 Dec 2014 13:21:44 +0000 (13:21 +0000)]
doc: add cephfs ENOSPC and eviction information
Adding this at this time to give us a sensible place
to talk about the epoch barrier stuff. The eviction
stuff will probably get simplified once we add a mon-side
eviction command that handles blacklisting and MDS session
eviction in one go.
John Spray [Thu, 9 Oct 2014 10:28:32 +0000 (11:28 +0100)]
client: handle ENOSPC in _flush
Previously we would avoid issuing writes
from _write, but the same condition was
not applied to _flush. This was okay
when we were blocking on ENOSPC, but now
we're cancelling ops on ENOSPC so need
to make sure we don't issue any new ones.
John Spray [Mon, 27 Oct 2014 13:27:30 +0000 (13:27 +0000)]
mds: set epoch barrier on transition to active
To handle case where MDSs restart after experiencing
a barrier-inducing operation: rather than persisting
OSD barrier somewhere, just have the MDSs always barrier
on latest OSD epoch at startup.
Effect is that after restart, MDS cap issues will
be delayed in (compliant) clients until the client
sees the latest OSD map.
John Spray [Mon, 27 Oct 2014 18:09:01 +0000 (18:09 +0000)]
messages: always encode barrier
Instead of truncating on INLINE_DATA, send
some blank fields there for clients that
don't support it (the kclient) in order
that we can include the following
epoch_barrier field.
John Spray [Wed, 8 Oct 2014 09:49:54 +0000 (10:49 +0100)]
messages: add osd_epoch_barrier to cap msgs
Extension to client-server protocol to allow clients
to release capabilities conditional on the receiver
having a particular OSD map, and the MDS to issue
caps conditional on the user having a particular
OSD map.
John Spray [Wed, 1 Oct 2014 22:01:35 +0000 (23:01 +0100)]
mds: return ENOSPC on write ops while osds full
Allow removals and read-only ops, prevent others. This
is a soft policy aimed at reducing the likelihood of a
"full" (mon_osd_full_ratio) OSD becoming physically full
(where it is unable to accept journal writes from MDS
even though it does not respect the FULL flag)
John Spray [Mon, 20 Oct 2014 15:41:29 +0000 (16:41 +0100)]
osdc/Objecter: add have_map method
This is for places we're going to call wait_for_map, so
that we can easily check if we will *probably* get
a true from wait_for_map, and thereby avoid
allocating Contexts we won't need.
John Spray [Thu, 9 Oct 2014 10:25:21 +0000 (11:25 +0100)]
osdc/ObjectCacher: invoke flush_set_callback on purge_set
For the benefit of Client, so that it can get its
caps released when using purge_set to deal with
an ENOSPC condition. Does not affect librbd because
librbd doesn't provide flush_set_callback.
Loic Dachary [Tue, 16 Dec 2014 12:31:30 +0000 (13:31 +0100)]
erasure-code: relax cauchy w restrictions
A restriction that the w parameter of the cauchy technique is limited to
8, 16 or 32 was added incorrectly while refactoring parameter parsing in
the jerasure plugin and must be relaxed.
In the source code of cephfs there is no reference to it anymore,
but it's still in the man page. Leave it there for now, but make
it more clear that it is deprecated and unsupported.
Jason Dillaman [Mon, 15 Dec 2014 15:53:53 +0000 (10:53 -0500)]
librbd: complete all pending aio ops prior to closing image
It was possible for an image to be closed while aio operations
were still outstanding. Now all aio operations are tracked and
completed before the image is closed.
Fixes: #10299
Backport: giant, firefly, dumpling Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Mon, 15 Dec 2014 17:37:05 +0000 (12:37 -0500)]
librbd: fixed garbage output from test LibRBD.TestIOPP
buffer::list::c_str does not actually provide a C-style, NULL
terminated string. As a result, its use for console output
resulted in stray garbage characters being printed.
Fixes: #9405 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
mon: Paxos: reset accept timeout before submiting work to the store
Otherwise we may trigger the timeout while waiting for the work to be
committed to the store -- and it would only take the write to take a bit
longer than 10 seconds (default accept timeout).
We do wait for the work to be properly committed to the store before
extending the lease though.
Fixes: #10220 Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
Haomai Wang [Tue, 22 Jul 2014 03:27:02 +0000 (11:27 +0800)]
ReplicatedPG: Make pull and push op use sparse read
If user enable fiemap feature in osd side, there exists three ways to make
read/write sprase:
1. normal sparse read/write op
2. clone op
3. recover op
If any op doesn't support sparse way, it will destroy the advantage of this
way and write zero hole to sparse file. Now clone op can support sparse write,
this commit implement sparse read/write for recover op.
Loic Dachary [Fri, 28 Nov 2014 15:22:22 +0000 (16:22 +0100)]
tests: shell functions toolbox dedicated to testing
The osd/osd-test-helpers.sh mon/mon-test-helpers.sh are useful to create
shell based functional tests. Since they were introduced they did not
grow significantly. As more tests are added, it becomes necessary to
have more sophisticated helpers. The ceph-helpers.sh toolbox is a merge
of the existing helpers intended to be easy to maintain and expand.
* Each function is documented
* Each function is tested
When adding to a function or looking for a new function, it is unlikely
the developer will find time to explore the entire file and understand
its structure. The documentation, body and test for each function are
grouped together to limit the scope of exploration required from the
casual developer.
The test are designed to not use internal helpers so that they can be
understood in full just by reading the test function. It means a given
test takes longer than it should (i.e. each getters tests run one mon).
In the context of testing this toolbox, simplicity is preferred over
efficiency.
If --with-jemalloc option is not specified, then it defaults to tcmalloc.
If --with-jemalloc is specified, then --without-tcmalloc is required.
Also if a rocksdb static linking is desired --with-librocksdb-static,
do not use --with-jemalloc, as rocksdb uses tcmalloc for builds.
Support for jemalloc in package build and perf stats/heap profiler is
underway