otherwise workers will respond with difference nonces to peers.
and remove nonce from Processor. as there is only one nonce for each
Messenger at a given time.
Signed-off-by: Kefu Chai <kchai@redhat.com>
OpenStack Mitaka introduced the support of RBD snapshots while taking a
snapshot of a Nova instance. For this to work we need to grant write
access to the Glance pool to the Cinder key.
Signed-off-by: Sébastien Han <seb@redhat.com>
The setup function returns before the run function, the cct variable
must be a data member, not a local variable that gets de-allocated
before run() starts.
Signed-off-by: Loic Dachary <loic@dachary.org>
Issue truncate or zero ops for the subtracted extents between the
diff and the sparse read.
Fixes: http://tracker.ceph.com/issues/18146
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
so the functions like snprintf() available in C99 are available without
defining _XOPEN_SOURCE. and "asm()" is used to inline assembly, so use
the GNU's extension instead of C99 standard.
Signed-off-by: Kefu Chai <kchai@redhat.com>
If poll times out it will return 0 (no data to read on socket). In
165e5abdbf we changed tcp_read_wait from
returning -1 to returning -errno, which means we return 0 instead of -1
in this case.
This makes tcp_read() get into an infinite loop by repeatedly trying to
read from the socket and getting EAGAIN.
Fix by explicitly checking for a 0 return from poll(2) and returning
EAGAIN in that case.
Fixes: http://tracker.ceph.com/issues/18184
Signed-off-by: Sage Weil <sage@redhat.com>
The submit_log_entries machinery depends on the destructor for the
functor cleaning up after itself to handle cancelation. I could have
introduced a local intrusive_ptr and captured that instead, but this is
slightly less magic.
Fixes: http://tracker.ceph.com/issues/18180
Signed-off-by: Samuel Just <sjust@redhat.com>
When we hold exclusive auth caps, then the client is responsible for
handling changes to the mode. Make sure we remove any setuid/setgid
bits on an ownership change.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
If we get a ownership change, POSIX mandates that you clear the
setuid and setgid bits unless you are "appropriately privileged", in
which case the OS is allowed to leave them intact.
Linux however always clears those bits, regardless of the process
privileges, as that makes it simpler to close some potential races.
Have ceph do the same.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
The test case is not stable due to racing console output. This
results in spurious failures.
Fixes: http://tracker.ceph.com/issues/10773
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
As per Sam Just advice, remove the EXPECT_DEATH tests to avoid
intermittent hang because they do not play well with threads.
Fixes: http://tracker.ceph.com/issues/18030
Signed-off-by: Loic Dachary <loic@dachary.org>
* find_package(keyutils REQUIRED) if (WITH_LIBCEPHFS OR WITH_RBD)
prior to this change, we detect keyutils if the building platform is not
FreeBSD, we should instead check the WITH_* options, and let the
maintainer to decided what is the best for his/her platform, and error
out if the building host cannot fulfill the requirement to build the
asserts.
* build krbd.cc if (WITH_RBD)
Signed-off-by: Kefu Chai <kchai@redhat.com>
"start" is used to calculate the global bluestore commit latency
and hence shall not be updated at each internal state enter/exit.
Otherwise the l_bluestore_commit_lat counter won't reflect the
real commit latency precisely.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>