| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, ceph-dencoder lacks certain mds types, preventing us from accurately checking the ceph corpus for encode-decode mismatches.
This pull request aims to address this issue by adding the missing types to ceph-dencoder.
To successfully incorporate these types into ceph-dencoder, we need to introduce the necessary `dump` and `generate_test_instances`
functions that was missing in some types. These functions are essential for proper encode and decode of the added types.
This PR will enhance the functionality of ceph-dencoder by including the missing types, enabling a comprehensive analysis of encode-decode consistency.
With the addition of these types, we can ensure the robustness and correctness of the ceph corpus.
This update will significantly contribute to improving the overall reliability and accuracy of ceph-dencoder.
It allows for a more comprehensive assessment of the encode-decode behavior, leading to enhanced data integrity and stability within the ceph ecosystem.
Fixes: https://tracker.ceph.com/issues/61788
Signed-off-by: Nitzan Mordechai <nmordech@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
Signed-off-by: Leonid Usov <leonid.usov@ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now looks like:
... (iquiesce xlock x=1 by request(mds.0:2785 nref=6)) ...
instead of:
... (iquiesce xlock x=1 by 0xdeadbeef)) ...
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
|
|
|
|
| |
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adding a new inode lock will overflow inode wait bits into the MDSCacheObject
wait bits. Make space for the quiescelock.
This includes a minor refactor to no longer attempt scoping the set of masks we
test in MDSCacheObject::waiting when calling MDSCacheObject::is_waiter_for.
This optimization wasn't worth the overhead and would be awkard to keep as
std::bitset cannot be used as a key for a std::multimap (easily). Instead, we
use the sequence number as a key which helps us to avoid allocating another map
whenever we call MDSCacheObject::take_waiting.
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
|
|
|
|
| |
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
|
|
|
|
| |
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
|
|
|
|
|
|
|
|
| |
When the journal logs are successfully flushed the lockers' state
could be LOCK_SYNC during the xlock count is non-zero.
Fixes: https://tracker.ceph.com/issues/44565
Signed-off-by: Xiubo Li <xiubli@redhat.com>
|
|
|
|
|
|
|
|
|
| |
When the journal logs are successfully flushed the lockers' state
could be LOCK_PREXLOCK if the inflight OP need to gather issued
caps.
Fixes: https://tracker.ceph.com/issues/44565
Signed-off-by: Xiubo Li <xiubli@redhat.com>
|
|
|
|
|
|
| |
lock_state_any is true will ignore the lock state.
Signed-off-by: Xiubo Li <xiubli@redhat.com>
|
|
|
|
|
|
|
| |
/home/jenkins/workspace/ceph-master-compile/src/osd/OSDMap.cc:3901:19: warning: loop variable 'pg' of type 'const std::__1::pair<const pg_t, int>' creates a copy from type 'const std::__1::pair<const pg_t, int>' [-Wrange-loop-construct]
for (const auto pg : *primary_temp)
^
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
|
|
|
|
| |
Signed-off-by: Sage Weil <sage@newdream.net>
|
|
|
|
| |
Signed-off-by: Sage Weil <sage@newdream.net>
|
|\
| |
| | |
mds: fix 'if there is lock cache on dir' check
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When invalidating lock cache, current code detach lock cache from all
its locks immediately. So diri->filelock.is_cached() only tells us if
there is active (not being invalidated) lock cache on a dir.
But MDCache::path_traverse() and Server::_dir_is_nonempty_unlocked() use
diri->filelock.is_cached() to check if there is any lock cache on a dir.
This bug can result in processing async requests and normal requests out
of order.
The fix is detaching lock cache from its locks when lock cache is
completely invalidated .
Fixes: https://tracker.ceph.com/issues/44448
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
|
|/
|
|
|
|
|
|
| |
Part of a changeset to allow building all of 'common' without relying
on 'using namespace std' or 'using namespace ceph' at toplevel in
headers.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
|
|
|
|
|
| |
Fixes: https://tracker.ceph.com/issues/43367
Signed-off-by: Varsha Rao <varao@redhat.com>
|
|
|
|
|
|
|
|
| |
Add a list to SimpleLock, which tracks lock caches which hold locks
on SimpleLock itself. When mds want to change lock state, it can find
lock caches and invalidate them.
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To take locks in top-down order for a MDRequest, we need to first take
snap/policy rdlocks on ancestor inodes of the request's base inode.
It's not convenient to use Locker::acquire_locks() to do the job because
path to request's base inode can change before all of these locks are
rdlocked.
This patch introduces Locker::try_rdlock_snap_layout(), which tries
taking snap/policy rdlocks on request's base inode and its ancestors
all at the same time. MDCache::path_traverse() calls this function at
first, then uses Locker::acquire_locks() to take snaplock on components
of request's path.
This patch also reorders inode locks, put snaplock and policy at the
front. Because some requests (such as setattr) may xlock other locks
after taking snaplock/policylock.
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
|
|
|
|
| |
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The function changes lock to SYNC state without checking issued caps.
which can cause inconsistent between lock state and issued caps.
Besides the function is not very useful because locks except nestlock
have SYNC state as default. It's unlikely that unused lock is in LOCK
state.
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
|
|
|
|
|
|
|
|
| |
MDS may revoke shared cap from xlocker client during 'LOCK_XLOCKDONE ->
LOCK_LOCK_XLOCK' state transition.
Fixes: http://tracker.ceph.com/issues/38491
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
|
|
|
|
|
|
| |
This commit greatly simplifies things.
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
|
|
|
|
|
|
| |
Trivial refactor.
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
|
|
|
|
| |
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
This change turned out to be far more extensive than I hoped but the end result
should prevent all Message-related memory leaks. I believe I fixed several
incidentally.
Fixes: http://tracker.ceph.com/issues/24306
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commands executed:
sed -i 's/\([^:]\)list<MDSInternalContextBase[[:space:]]*\*>/\1MDSInternalContextBase::vec/g' *.cc *.h
sed -i 's/std::list<MDSInternalContextBase[[:space:]]*\*>/MDSInternalContextBase::vec/g' *.cc *.h
With various incidental fixes.
Fixes: http://tracker.ceph.com/issues/25111
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
memory.h was introduced back when the shared_ptrs were still in TR1, but
we've moved to C++17 now. and the C++ clients should be compiled with
a C++11 compatible compiler. so there is no need to have this file anymore.
also replace all references of ceph::shared_ptr and ceph::weak_ptr with
std::shared_ptr and std::weak_ptr accordingly.
Signed-off-by: Kefu Chai <kchai@redhat.com>
|
|
|
|
| |
Signed-off-by: Kefu Chai <kchai@redhat.com>
|
|
|
|
| |
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
|
|
|
|
|
|
| |
Partial-fix: http://tracker.ceph.com/issues/21402
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
|
|
|
|
|
|
|
| |
This is a portion of Part 1 of the namespace project: using ADL
properly in encode and decode so we can use namespaces easily in Ceph.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
|
|
|
|
| |
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Auth mds may take xlock on the lock and change the object when replaying
unsafe requests. To guarantee new requests and replayed unsafe requests
(on auth mds) get processed in proper order, we shouldn't rdlock locks in
replica object while auth mds of the object is recovering
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
|
|
|
|
| |
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
|
|
|
|
|
|
|
| |
The gymnastics protecting the map failed as the code evolved. Just expose it
normally with a getter.
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is more efficient and more explicit than shared_ptr. It will also
allow us to put these in intrusive lists.
Note that before we used the shared_ptr OnDelete property only for the
live ops and left it off for the history. Here we rename is_tracked to
state and explicit note whether we are untracked, live, or history.
Also, now that we #include OpRequest in osd_types.h, we have to include
the .cc file (and ~OpRequest definition) in libcommon to avoid a link
error on all the unit tests etc.
Signed-off-by: Sage Weil <sage@redhat.com>
|
|\
| |
| |
| |
| | |
mds: force client flush snap data before truncating objects
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Snapshot data get lost if following sequence of events happen
- client writes data to a file
- make a snapshot
- truncate the file
- mds truncate file objects using the newest snap context
- client flushes snap data using the old snap context
OSD first handles MDS's truncate request, it updates object's snap
context. When handling client's write request, OSD finds that
object's snap context is newer than request's snap context. So
it uses the newer one and treats the data as if they were
written after the snapshot.
The fix is avoid touching file objects while clients may have
unflushed snap data. Before truncating file objects, MDS checks
if clients may have unflushed snap data. If client have, MDS
set filelock to a special unstable state, the state revokes Fb
capability. MDS starts truncating file objects after the Fb
capability get revoked.
Fixes: http://tracker.ceph.com/issues/17193
Signed-off-by: Yan, Zheng <zyan@redhat.com>
|
|\ \
| | |
| | |
| | |
| | | |
mds: more unique_pointer changes
Reviewed-by: John Spray <john.spray@redhat.com>
|
| |/
| |
| |
| | |
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
|
|/
|
|
| |
Signed-off-by: Sage Weil <sage@redhat.com>
|
|
|
|
| |
Signed-off-by: Yan, Zheng <zyan@redhat.com>
|
|
|
|
|
|
| |
we can avoid log flush if unstable locks are caused by revoking caps
Signed-off-by: Yan, Zheng <zyan@redhat.com>
|
|
|
|
|
|
|
|
| |
Current code first processes lock waiters who have smaller wait mask.
Lock waiters who have large wait mask can starve if client keeps
sending requests that add waiter with small mask.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
|
|
|
|
|
|
|
| |
Use explicit keyword for constructors with one argument to
prevent implicit usage as conversion functions.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|
|
|
|
| |
Signed-off-by: John Spray <john.spray@redhat.com>
|
|
|
|
|
|
|
|
| |
Replica map and waiting list in MDSCacheObject are rarely used and
mostly empty. Defining them as compact_map can save 80 bytes for 64
bits program.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
|
|
|
|
|
|
|
| |
So that one can have const CInode and CDir references
from time to time.
Signed-off-by: John Spray <john.spray@redhat.com>
|
|
|
|
|
|
| |
Make it clearer what these numbers are where they appear.
Signed-off-by: John Spray <john.spray@redhat.com>
|