when reusing a thread-local std::ostream for a new log entry, clear any
ios flags (ie eofbit/failbit/badbit) that may have been set during its
previous use
without this, any stream errors (for example, passing a nullptr to
operator<< sets the badbit) will result in all log output on that thread
to be blank for the remainder of the process
Signed-off-by: Casey Bodley <cbodley@redhat.com>
With prefix_len initialized as zero, mask in netmask_ipv4/6()
will always be zero, so find_ip_in_subnet() always return the
first interface.
Set prefix_len to the right value to fetch the right interface.
Signed-off-by: Gu Zhongyan guzhongyan@360.cn
Signed-off-by: yupeng chen chenyupeng-it@360.cn
Old code does not set inode or dentry for rmsnap/renamesnap requests.
So rmsnap/renamesnap requests are sent to random mds.
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
MDCache::cow_inode() checks "cap->issued() & CEPH_CAP_ANY_WR" to decide
if it needs to setup need_snapflush for the new snapped inode.
Locker::handle_client_caps() should call Locker::_do_cap_update() first,
then update issued caps. Otherwise MDCache::cow_inode() will fail to
setup need_snapflush if cap messages flushes dirty caps and releases the
same caps.
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
When building Ceph Debian installation package, libcephfs-test.jar
build would fail if multi junit versions are installed on the host.
In src/java/CMakeLists.txt, the "junit" search order is "junit"
and then "junit4". In case multi junit versions are installed,
the lower version (like 3.8) is found firstly, but junit4 is
required only. The search result will cause the failure.
Fix the issue by change search order to firstly search junit4
by default.
Fixes: http://tracker.ceph.com/issues/22828
Signed-off-by: Tone Zhang <tone.zhang@arm.com>
1. This is causing problems in ECBackend that are not obvious.
2. It didn't show any performance win anyway.
3. I'm trying to remove on_applied callbacks entirely. If that works out
this will all be moot!
Fixes: http://tracker.ceph.com/issues/22668
Signed-off-by: Sage Weil <sage@redhat.com>
The expectation is that _defined_if_python2_absent will be defined
if (and only if) the python2 bcond is not set. Before this patch, if
somebody were to build the package on suse_version 1500 with
--with-python2, the _defined_if_python2_absent would be defined,
which is a bug.
Signed-off-by: Nathan Cutler <ncutler@suse.com>
"sitepackages=True" causes issues on systems that may have packages like
"coverage" or "pytest" installed at the system level. We can try just
white listing "prettyprint" which was the driver for the "sitepackages"
blanket change in the first place.
Fixes: http://tracker.ceph.com/issues/22823
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
I've found by experimentation that passing a null pointer
as a value to a CachedPrebufferedStreambuf ostream caused
subsequent log prints to be squelched.
(That's likely a bug, doesn't happen when the thread_local
optimization change is reverted.)
Fixes: https://tracker.ceph.com/issues/22820
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>