The main change is use shared_ptr instead of weak_ptr to define
active request map. The reason is that slave request needs to be
preserved until master explicitly finishes it.
Fixes: #8026
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Instead of relying on an implicit initialization happening during
encoding/decoding with galois.c:galois_init_default_field, call
gf.c:gf_init_easy for each w values when the plugin is loaded.
Loading the plugin is protected against race conditions by a lock.
It does not cover all possible uses of gf-complete but it is enough for
the ceph jerasure plugin.
http://tracker.ceph.com/issues/7914fixes#7914
Signed-off-by: Loic Dachary <loic@dachary.org>
Sadly, you can't implicitly convert non-const references to shared pointers, so avoid the atomic ops necessary when copying a shared_ptr.
Signed-off-by: Greg Farnum <greg@inktank.com>
If the previous clone is evicted, we shouldn't adjust the stats to
account for its new clone_overlap value.
Fixes: #7964
Signed-off-by: Samuel Just <sam.just@inktank.com>
Otherwise, we end up subtracting off clone_overlap for evicted clones
whose sizes we did not add in.
Fixes: #7964
Signed-off-by: Samuel Just <sam.just@inktank.com>
Earlier patch already have the entity requiring 'execute' caps for
read-only commands. This patch introduces the same requirement for *all*
auth commands, read-only and read-write alike.
While the rationale behind the earlier patch for leaving read-write
operations out of this requirement still holds, we now enforce this to
match compatibility with what was happening back on Dumpling with regard
to the 'execute' cap being required for auth commands. However, it should
be noted that back on Dumpling we were only requiring the 'execute' cap
for auth commands, regardless of read-only or read-write, and no other
caps were required.
Fixes: 7919
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
This prevents Client:trim_dentry() from unlinking parent dentry of
directory inode referenced by fuse kernel module.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
If we have epoch X and find out we died as of epoch Y, we still want to
request X+1. Among other things, this fixes a 'stall' if Y happens to be
the most recent map published and no new maps are generated because we will
never get anything back from our subscription.
This makes this osdmap_subscribe() caller match every other caller by
passing in current epoch + 1.
Fixes: #8002
Signed-off-by: Sage Weil <sage@inktank.com>
This is useful only for debugging. The encoded contents of a message are
dumped to the log on message send. This is useful when valgrind is
triggering warnings about uninitialized memory in messages because the
call chain will indicate which message type is to blame, whereas the
usual writer thread context does not tell us any useful information.
Signed-off-by: Sage Weil <sage@inktank.com>
We should not respond to checks for map versions when we are in the
probing or electing states or else clients will get incorrect results when
they ask what the latest map version is.
Fixes: #7997
Signed-off-by: Sage Weil <sage@inktank.com>