project_past_snaprealm_parent() will do the same job. Besides
MDCache::_snaprealm_create_finish() is buggy, it updates snaprealm's
current_parent_since incorrectly
Signed-off-by: Yan, Zheng <zyan@redhat.com>
now MDS use omap to store dirfrag, and always does partial commit.
marking dirfrag dirty after dropping stale dentries is useless.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
When moving a snapshotted regular file to stray directory, we need
to create an snaprealm for it. The snaprealm is required for building
correct snapshot context when purging file objects.
Current code normally create seperate inodes when a snapshotted file
inode is COWed. Each time the file inode is COWed, the head inode's
'first' is updated. So when deleting the file, we can't use head inode's
'first' to check if it was snapshotted.
This commit make MDCache::journal_cow_dentry always create multiversion
inode. multiversion inode's 'first' keeps constant.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
we can't purge a multiversion directory inode when it is still referenced
by some snapshots. For regular files that are still referenced by some
snapshots, we need to keep the backtrace object.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
if a directory inode has snaprealm, its parent directory's snapshot
set can be not equal to its snapshot set
Signed-off-by: Yan, Zheng <zyan@redhat.com>
handle the case that we create cephfs using existing pools and
the existing pools' removed snaps are not empty.
Fixes: #10315
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Use parent directory's snaprealm to decide if we should cow dentry.
Otherwise we may create orphan dentry when deleting an directory with
snaprealm.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
There is an optimization that drop dentries in deleted directory,
so that MDS can purge corresponding inode faster. We need to check
if the deleted directory is still referenced by any snapshot. If
it is, we can't drop dentries or skip committing dirfrags to object
store. The simplest method to check if a delted directory is
potentially referenced by snaphosts is checking diri->snaprealm.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Previously linger_register just created a RWLock::Context
which does not result in the lock being acquired.
Fixes: #10827
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
If the debian/control file does not exist the error is cryptic.
Improve the situation by checking before running dpkg-checkbuilddeps.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
If the failure was generated for an instance of the OSD prior to when
it came up, ignore it.
This probably causes a fair bit of unnecessary flapping in the wild...
Backport: giant, firefly
Fixes: #10762
Reported-by: Dan van der Ster <dan@vanderster.com>
Signed-off-by: Sage Weil <sage@redhat.com>
This fixes bnc#905047 (in a somewhat ad-hoc way). Sadly the log
file gets created from several places, so its existence does not
mean init-radosgw had actually run.
Signed-off-by: Thorsten Behrens <tbehrens@suse.com>