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>
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>
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>
Add some documentation so developers understand what goes into next vs
what goes into master and how to handle backports to stable branches.
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
O_PATH was introduced in 2.6.39, but many Linux systems in use
today still have older kernels than that. Check for them.
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
./include/encoding.h:317:7: warning: 't' may be used uninitialized in
this function [-Wmaybe-uninitialized]
Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
Reviewed-by: Sage Weil <sage@redhat.com>
* Update the remaining Message::encode() calls, which now expect crc
flags to be passed as a flags parameter instead of a bool (this e.g.
fixes the issue with routing messages forwarded from an older client).
* In Message::encode() data crc is calculated when MSG_CRC_DATA is
set, but in decode_message(), Pipe::read/write_message() data crc is
calculated when MSG_CRC_HEADER is set. Fix this.
Note, 2ffacbe changed the behavior of Pipe::read_message/write_message():
previously the methods always calculated crc, now they calculate it
only if crc is enabled in the config. This means crc can not be disabled
if there are monitors of older version in the cluster.
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
Reviewed-by: Sage Weil <sage@redhat.com>
There was a typo within the RBD Image get_flags method and
several runtime errors relating to the new fadvise flags.
Fixes: #10782
Signed-off-by: Jason Dillaman <dillaman@redhat.com>