For a large directory, program needs to issue multiple readdir
syscalls to get all dentries. When there are multiple programs
read the directory concurrently. Following sequence of events
can happen.
- program calls readdir with pos = 2. ceph sends readdir request
to mds. The reply contains N1 entries. ceph adds these N1 entries
to readdir cache.
- program calls readdir with pos = N1+2. The readdir is satisfied
by the readdir cache, N2 entries are returned. (Other program
calls readdir in the middle, which fills the cache)
- program calls readdir with pos = N1+N2+2. ceph sends readdir
request to mds. The reply contains N3 entries and it reaches
directory end. ceph adds these N3 entries to the readdir cache
and marks directory complete.
The second readdir call does not update dirp->cache_index. ceph adds
the last N3 entries to wrong places.
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Fixes: http://tracker.ceph.com/issues/23894
(cherry picked from commit 01e23c178d)
* refs/pull/21712/head:
qa/tasks/cephfs: add test for renewing stale session
client: invalidate caps and leases when session becomes stale
client: fix race in concurrent readdir
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Directory inode's dirstat gets updated by request reply, but not by
cap message. This causes problem for following case.
1. MDS modifies a directory
2. MDS issues CEPH_CAP_ANY_SHARED to client
3. The client satifies stat(2) by its cached metadata.
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Fixes: http://tracker.ceph.com/issues/23855
(cherry picked from commit ee2c628f67)
we are using spdk/dpdk for async msgr's dpdk backend since 01a9f178. so
no need to keep dpdk submodule anymore.
Fixes: http://tracker.ceph.com/issues/24032
Signed-off-by: Kefu Chai <kchai@redhat.com>
* refs/pull/21857/head:
qa: move snap-hierarchy out of snaps workunits
qa: try snap format upgrade with multimds cluster
qa: add mds deactivation procedure for upgrades
The snapshot hierarchy it leaves behind can't be cleaned up by `rm -rf` which
breaks workunit cleanup. So, don't run this as part of normal snaps test.
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 4d37b0ee8d)
Moving the code that makes exceptions accept keyword arguments from the
exception OSError to Error prevents a crash when exceptions not
inheriting OSError are received.
Fixes: http://tracker.ceph.com/issues/24033
Signed-off-by: Rishabh Dave <ridave@redhat.com>
- Do some polishing in the docs.
- Refactor RgwClient::is_service_online() method. The system is considered as online if the response structure is valid. The response content itself is not validated in this case.
- Relocate NoCredentialsException and derive it from RequestException.
Signed-off-by: Volker Theile <vtheile@suse.com>
- After SSL support has been added to Ceph Dashboard via PR #21627, the developer HTTP proxy sample config must be adapted.
- Adapt HACKING.rst to use HTTPS.
Signed-off-by: Volker Theile <vtheile@suse.com>
this change silences following warnings:
: warning: ‘%s’ directive output may be truncated writing up to 127
bytes into a region of size between 109 and 119 [-W
format-truncation=]
snprintf(m_id_str, SysTestRunnable::ID_STR_SZ, "process_%d%s",
m_id, extra);
^~~~~~~~~~~~~~
~~~~~
Signed-off-by: Kefu Chai <kchai@redhat.com>
this change silences following warning:
warning: unnecessary parentheses in declaration of ‘os’ [-Wparentheses]
std::ostringstream(os);
^
Signed-off-by: Kefu Chai <kchai@redhat.com>
Gist of this commit is to eliminate use of PaxosFSMap::get_working_fsmap which
allowed looking at the pending FSMap depending if it's the leader. Instead,
pass the FSMap being worked on to helper functions.
Also, ensure that we are only looking at the committed (i.e. current) FSMap
in the preprocess_* service methods.
Fixes: http://tracker.ceph.com/issues/23768
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
prometheus: Expose number of degraded/misplaced/unfound objects
Reveiwed-by: John Spray <john.spray@redhat.com>
Reviewed-by: Jan Fajerski <jfajerski@suse.com>
this change silences following error
stl_tree.h:452:21: error: static assertion failed: comparison object
must be invocable with two arguments of key type
static_assert(__is_invocable<_Compare&, const _Key&, const _Key&>{},
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Kefu Chai <kchai@redhat.com>
this silences warnings like:
warning: ‘void* memset(void*, int, size_t)’ writing to an object of
non-trivial type ‘struct uuid_d’; use assignment instead [-Wcl\
ass-memaccess]
uuid_d only contains boost::uuids::uuid, which is "nil" initialized in
uuid_d's ctor. so we don't need to bother with memset() it with 0.
the same applies to entity_inst_t.
Signed-off-by: Kefu Chai <kchai@redhat.com>
should catch polymorphic exceptions by reference. this silences warnings
like:
error: catching polymorphic type ‘class std::RetryException’ by value
[-Werror=catch-value=]
} catch (std::RetryException) {
Signed-off-by: Kefu Chai <kchai@redhat.com>
* after upgrading to gcc-8, seems dpdk requires more settings to compile.
in which, CONFIG_RTE_MAX_VFIO_GROUPS=64 is copied from config/common_base.
* librte_bus_pci.a depends on librte_pci.a, so reorder the libraries
in DPDK_LIBRARIES.
Signed-off-by: Kefu Chai <kchai@redhat.com>