OSD: FileJournal: call writeq_cond.Signal if necessary in submit_entry
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Samuel Just <sjust@redhat.com>
os: IndexManager:: optimize map<coll_t, CollectionIndex* > col_indices to unordered_map
Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
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.
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Broken by:
1b2b34431 (MDS: do not allow invocation of most commands on an inactive MDS)
MDS::whoami is a rank, so check for inactive is <0, not <=0
Signed-off-by: John Spray <john.spray@redhat.com>
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.
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
With xmlstarlet 1.3.0 (which is on Ubuntu precise)
xmlstarlet sel -t -m '//pg_stat/state[(contains(.,'\''active'\'') and
contains(.,'\''clean'\'') and not(contains(.,'\''stale'\'')))]' -v . -n
will output an extra empty line which does not show on xmlstarlet
1.5.0 (which is on Ubuntu trusty and Fedora 20).
Signed-off-by: Loic Dachary <ldachary@redhat.com>
ReplicatedPG: Make recovery using fiemap and fix perf counter
sage-2014-12-16_08:43:28-powercycle-wip-sage-testing-distro
Reviewed-by: Sage Weil <sage@redhat.com>
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.
Signed-off-by: John Spray <john.spray@redhat.com>
Ensure that all calls to _flush get an explicit
context (rather than implicit PutInode used
before), which tags any error onto the Inode object.
Later, read the error from the Inode object in _release_fh
and ensure all callers of _release_fh properly handle
its return code.
Signed-off-by: John Spray <john.spray@redhat.com>
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.
Signed-off-by: John Spray <john.spray@redhat.com>
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.
Signed-off-by: John Spray <john.spray@redhat.com>
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.
Signed-off-by: John Spray <john.spray@redhat.com>
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.
Signed-off-by: John Spray <john.spray@redhat.com>
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)
Signed-off-by: John Spray <john.spray@redhat.com>
For the (now numerous) places where callers
would like to check this without doing a verbose
lock/unlock cycle.
Signed-off-by: John Spray <john.spray@redhat.com>
This was always zero: make the function return void, and
remove all the places we asserted on its return value.
Signed-off-by: John Spray <john.spray@redhat.com>
For use in MDS and Client when they want to wait
for a particular OSDMap epoch before using caps
that depend on a prior blacklist or op cancellation.
Signed-off-by: John Spray <john.spray@redhat.com>