Commit Graph

39273 Commits

Author SHA1 Message Date
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
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
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
Sage Weil
8fd162e1f0 Merge pull request #3621 from athanatos/wip-10717
ReplicatedPG::do_op: ignore snapset_obc if !exists

Reviewed-by: Sage Weil <sage@redhat.com>
2015-02-05 01:12:07 -08:00
Kefu Chai
484a147e9e osd: apply affinity if any affinity is not default 2015-02-05 13:52:17 +08:00
Kefu Chai
fffa5e201a osd,mon: add norebalance osdmap flag
Fixes: #10559

Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-02-05 13:52:17 +08:00
Haomai Wang
f9114114dc NetHandler: Lower connect failed log level
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2015-02-05 10:48:00 +08:00
Haomai Wang
c252e05a51 AsyncConnection: fixup for 2ffacbe (crc configuration in messenger)
Learn from commit d5d1e27d91

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2015-02-05 10:40:35 +08:00
Haomai Wang
2b6b100a9b AsyncConnection: Don't delete event if fd < 0
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2015-02-05 10:37:42 +08:00
Feng He
a3fc9d4e03 AsyncConnection: fix wrong scope of data blocks
Signed-off-by: Feng He <fenglife@hotmail.com>
2015-02-05 10:09:13 +08:00
Yan, Zheng
dd4fa1d32a Merge pull request #3616 from ceph/wip-export-dir
mds: implement export dir asok
2015-02-05 09:51:18 +08:00
Ken Dreyer
0db7c48924 SubmittingPatches: clarify the use of branches in PRs
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>
2015-02-04 17:46:23 -07:00
Min Chen
adebf22d3c rbd_recover_tool: move rbd_recover_tool directory to src/tools subdirectory
Signed-off-by: Min Chen <minchen@ubuntukylin.com>
2015-02-05 08:25:39 +08:00
Greg Farnum
70ae314d87 client: fix O_PATH on older Linux systems
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>
2015-02-04 15:03:21 -08:00
Samuel Just
2f49de5110 ReplicatedPG: block writes on degraded objects unless all peers support it
Fixes: #10731
Signed-off-by: Samuel Just <sjust@redhat.com>
2015-02-04 14:59:13 -08:00
Josh Durgin
a2d6b07296 Merge pull request #3607 from ceph/wip-librbd-invalid-map
librbd: verify image's object map validity

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-02-04 23:56:04 +01:00
Josh Durgin
2b31fb1aa9 Merge pull request #3592 from ceph/wip-librbd-watch-errors
librbd: better handling for image watch errors

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-02-04 23:39:40 +01:00
Zhiqiang Wang
2a83ef3c3d include/encoding: fix an compile warning
./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>
2015-02-04 13:15:43 -08:00
Sage Weil
6cc8bae58c Merge pull request #3619 from ceph/wip-8903
librbd: removed lingering TODO message from ImageWatcher

Reviewed-by: Sage Weil <sage@redhat.com>
2015-02-04 12:55:59 -08:00
Mykola Golub
71c6d98979 msg: fixup for 2ffacbe (crc configuration in messenger)
* 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>
2015-02-04 11:21:37 -08:00
Gregory Farnum
fa9a160377 Merge pull request #3613 from rzarzynski/wip-4920
client: add support for O_NOFOLLOW and O_PATH

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-02-04 09:30:29 -08:00
Jason Dillaman
46f9ca463e pybind: fixed runtime errors with librbdpy
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>
2015-02-04 09:47:55 -05:00