Commit Graph

39497 Commits

Author SHA1 Message Date
Yan, Zheng
b66e74961b mds: split old_inode when needed
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-02-05 22:40:39 +08:00
Yan, Zheng
a464558ff7 qa/workunits/snaps: don't assume snapshot is disabled
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-02-05 22:40:39 +08:00
Yan, Zheng
244267ba6b ceph: don't count snap dentries when calculating new fragstat/neststat
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-02-05 22:40:39 +08:00
Yan, Zheng
c31ed41449 mds: add snaprealm to open_past_parents after it's opened
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-02-05 22:40:39 +08:00
Yan, Zheng
01ff547b11 mds: avoid infinite loop of SnapRealm::_open_parents
handle the case that some past parents are missing

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-02-05 22:40:39 +08:00
Yan, Zheng
dda08a0cc9 mds: properly commit snaprealm to dirfrag
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-02-05 22:40:39 +08:00
Yan, Zheng
966e108055 mds: don't manully create snaprealm during rename
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>
2015-02-05 22:40:39 +08:00
Yan, Zheng
f3b61e6892 mds: don't mark dirfrag dirty after dropping stale dentries
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>
2015-02-05 22:40:39 +08:00
Yan, Zheng
ad6f0cfb6d client: remove snapshot dentry during rmsnap
reply of RMSNAP request has no trace, we need to invalidate the
snapshot dentry manually

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-02-05 22:40:38 +08:00
Yan, Zheng
087ccd6fc3 client: remove snaprealm from parent when closing it
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-02-05 22:40:38 +08:00
Yan, Zheng
505a5f55df client: check xattr version independent of inode version
Fixes: #10343
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-02-05 22:40:38 +08:00
Yan, Zheng
13d8475f51 mds: remove superfluous assertion
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-02-05 22:40:38 +08:00
Yan, Zheng
b0e0e1c896 mds: temporarily disable recovery for snapshotted files
recovery of snapshots is very inefficient, which requires
NR_SNAPS * NR_OBJECTS operations.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-02-05 22:40:38 +08:00
Yan, Zheng
572e42e85d mds: verify backtrace by auth MDS only
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-02-05 22:40:38 +08:00
Yan, Zheng
d8e3ce8a1f mds: avoid sending snaptrace for snapshot inodes
snapshot information in snaptrace is only used by head inodes

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-02-05 22:40:38 +08:00
Yan, Zheng
1a648cd130 mds: optimize SnapRealm::split_at()
avoid executing the 'split children' code because all snaprealms in
mdsdir has no child snaprealm.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-02-05 22:40:38 +08:00
Yan, Zheng
ed422bed39 mds: fix reference after free
CDir::try_trim_snap_dentry() may free the dentry

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-02-05 22:40:38 +08:00
Yan, Zheng
4391cdd648 mds: journal snaprealm for all types of inodes
regular file also can has snaprealm.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-02-05 22:40:38 +08:00
Yan, Zheng
a0f51a2ec5 mds: always create multiversion inode when cow inode
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>
2015-02-05 22:40:38 +08:00
Yan, Zheng
5f58c4ccfc mds: check multiversion inode when purging stray
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>
2015-02-05 22:40:38 +08:00
Yan, Zheng
6cd044acdf mds: properly project past snaprealm parent while renaming files
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-02-05 22:40:38 +08:00
Yan, Zheng
335f02bf7d mds: properly update trace vector when quiting path traverse
rdlock_path_pin_ref() uses the trace vector to setup request reply's
tracedn

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-02-05 22:40:38 +08:00
Yan, Zheng
f192e2dcea mds: properly update capability's client_follow
handle discontinuous snapid(s)

Fixes: #10323
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-02-05 22:40:38 +08:00
Yan, Zheng
dbf09af9df mds: fix CInode::remove_need_snapflush
make sure client and snapid exist, then drop CInode::PIN_NEEDSNAPFLUSH

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-02-05 22:40:37 +08:00
Yan, Zheng
1e53bcbef4 mds: provide correct snaps to purge_stale_snap_data()
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>
2015-02-05 22:40:37 +08:00
Yan, Zheng
040d5c5b70 mds: set last snapid according to removed snaps in data pools
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>
2015-02-05 22:40:37 +08:00
Yan, Zheng
5e5052b3b0 mds: update current_parent_since for newly snapshotted directory
current_parent_since should be set to snapshot seq when the directory
was created.

Fixes: 10312
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-02-05 22:40:37 +08:00
Yan, Zheng
1d9de22606 mds: fix MDCache::journal_cow_dentry()
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>
2015-02-05 22:40:37 +08:00
Yan, Zheng
32b1a9a1cd mds: check snaprealm before drop dentries in deleted directory
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>
2015-02-05 22:40:37 +08:00
Yan, Zheng
1479300a68 mds: properly update CInode->first during journal replay
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-02-05 22:40:37 +08:00
Loic Dachary
334a62df4f Merge pull request #3638 from dachary/wip-make-check
run-make-check.sh: git --ancestry-path is not backward compatible

Reviewed-by: Dmytro Iurchenko <diurchenko@mirantis.com>
2015-02-05 15:24:00 +01:00
Jason Dillaman
5b75e30431 osdc/Objecter: linger_register now acquires rwlock
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>
2015-02-05 09:08:46 -05:00
Loic Dachary
3cf7fcc6cb install-deps.sh: check for debian/control existence
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>
2015-02-05 14:46:41 +01:00
Loic Dachary
09c152a67c run-make-check.sh: git --ancestry-path is not backward compatible
The behavior is different on git 1.8 which is the default on centos7.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-02-05 14:37:38 +01:00
Loic Dachary
3b73ccff74 Merge pull request #3630 from hef87/hef87-patch-1
Bug fix : AsyncConnection: fix wrong scope of data blocks

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-02-05 13:58:46 +01:00
Sage Weil
400ac237d3 mon: ignore osd failures from before up_from
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>
2015-02-05 03:07:50 -08:00
Feng He
3fba9ac104 Bug fix : AsyncConnection: fix wrong scope of data blocks
Signed-off-by: Feng He <fenglife@hotmail.com>
2015-02-05 19:01:37 +08:00
Sage Weil
581c70b375 Merge pull request #3609 from hef87/hef87-patch-1
AsyncConnection: fix wrong scope of data blocks

Reviewed-by: Haomai Wang <haomaiwang@gmail.com>
2015-02-05 02:51:32 -08:00
Vu Pham
bb18d01aae xio: Squash the whitespaces
Signed-off-by: Vu Pham <vu@mellanox.com>
2015-02-05 02:38:26 -08:00
Sage Weil
7eca03e290 Merge remote-tracking branch 'gh/hammer' 2015-02-05 02:18:33 -08:00
Sage Weil
f928f68347 Merge remote-tracking branch 'gh/wip-assert-version'
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-02-05 02:18:06 -08:00
Sage Weil
773ff16bc3 Merge pull request #3532 from dachary/wip-run-make-check
run-make-check: use nproc and shorter git expression
2015-02-05 02:01:44 -08:00
Josh Durgin
0445cb9cd0 Merge pull request #3611 from kylinstorage/wip-rbd-recover-tool
Wip rbd recover tool

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-02-05 11:01:30 +01:00
Vu Pham
16897aa25e cmake: Fix CMakeLists.txt to compile librbd
Add source files to CMakeLists.txt to compile librbd

Signed-off-by: Vu Pham <vu@mellanox.com>
2015-02-05 01:56:53 -08:00
Vu Pham
1d68abb7a2 xio: Fix release xio message on closed connection issue
Do not call xio_release_msg on closed connection

Signed-off-by: Vu Pham <vu@mellanox.com>
2015-02-05 01:56:53 -08:00
Sage Weil
9132c6794f Merge pull request #3544 from vuhuong/xio-spread-portals
Xio spread portals

Reviewed-by: Matt Benjamin <matt@cohortfs.com>
2015-02-05 01:36:12 -08:00
Sage Weil
1741e07435 Merge pull request #3628 from SUSE/wip-initradosgw-fixup
Unconditionally chown rados log file.

Reviewed-by: Sage Weil <sage@redhat.com>
2015-02-05 01:31:08 -08:00
Thorsten Behrens
41611ea27a Unconditionally chown rados log file.
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>
2015-02-05 10:26:36 +01:00
Sage Weil
eacbcacd6a Merge pull request #3623 from ceph/wip-opath
client: fix O_PATH on older Linux systems

Reviewed-by: Yan, Zheng <zyan@redhat.com>
2015-02-05 01:22:49 -08:00
Sage Weil
7dc9adeec3 Merge pull request #3622 from athanatos/wip-10340
Objecter::_op_submit_with_budget: add timeout before call

Reviewed-by: Sage Weil <sage@redhat.com>
2015-02-05 01:12:51 -08:00