]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
11 years agokrbd: fix sysfs path in the comment 1790/head
Ilya Dryomov [Thu, 8 May 2014 14:17:48 +0000 (18:17 +0400)]
krbd: fix sysfs path in the comment

It's "/sys/bus/rbd/devices/<id>", but libudev works with devices and
not busses, so it's really "/sys/devices/rbd/<id>/".

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
11 years agokrbd: match new with delete, not free()
Ilya Dryomov [Thu, 8 May 2014 14:17:48 +0000 (18:17 +0400)]
krbd: match new with delete, not free()

struct krbd_ctx is allocated with new, use delete to get rid of it.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
11 years agoMerge pull request #1742 from ceph/wip-multimds
Yan, Zheng [Thu, 8 May 2014 03:36:23 +0000 (11:36 +0800)]
Merge pull request #1742 from ceph/wip-multimds

Wip multimds

11 years agomds: remove unused MMDSCacheRejoin::{MISSING,FULL} 1742/head
Yan, Zheng [Mon, 5 May 2014 08:53:55 +0000 (16:53 +0800)]
mds: remove unused MMDSCacheRejoin::{MISSING,FULL}

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agomds: properly wake up dentry waiters after fragmenting dirfrag
Yan, Zheng [Mon, 5 May 2014 08:23:14 +0000 (16:23 +0800)]
mds: properly wake up dentry waiters after fragmenting dirfrag

When active MDS wants to fragment a replica dirfrag, it should set
the 'replay' parameter of MDCache::adjust_dir_fragments() to false.
It makes sure that CDir::merge/split wake up any dentry waiter.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agomds: choose MIX state if replica of scatterlock is in MIX state
Yan, Zheng [Mon, 5 May 2014 06:36:16 +0000 (14:36 +0800)]
mds: choose MIX state if replica of scatterlock is in MIX state

After ScatterLock::infer_state_from_strong_rejoin() set scatterlock
to LOCK_MIX state, don't change the scatterlock to other state.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agomds: switch flushing ScatterLock to dirty ScatterLock after cache rejoin
Yan, Zheng [Sun, 4 May 2014 15:06:32 +0000 (23:06 +0800)]
mds: switch flushing ScatterLock to dirty ScatterLock after cache rejoin

Otherwise the flushing flag may confuse Locker::eval_gather() if MDS later
imports lock's parent inode.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agoMerge pull request #1766 from ceph/wip-fsx-krbd
Josh Durgin [Thu, 8 May 2014 01:13:04 +0000 (18:13 -0700)]
Merge pull request #1766 from ceph/wip-fsx-krbd

krbd mode for librbd_fsx

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoMerge pull request #1780 from ceph/wip-8299
Sage Weil [Wed, 7 May 2014 22:14:47 +0000 (15:14 -0700)]
Merge pull request #1780 from ceph/wip-8299

rgw: fix stripe_size calculation

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1776 from ceph/wip-8289
Sage Weil [Wed, 7 May 2014 22:03:31 +0000 (15:03 -0700)]
Merge pull request #1776 from ceph/wip-8289

rgw: cut short object read if a chunk returns error

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1773 from ceph/wip-8170
Sage Weil [Wed, 7 May 2014 21:53:04 +0000 (14:53 -0700)]
Merge pull request #1773 from ceph/wip-8170

rgw: send user manifest header field

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agovstart.sh: fix client admin socket path
Sage Weil [Wed, 7 May 2014 21:46:53 +0000 (14:46 -0700)]
vstart.sh: fix client admin socket path

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1783 from guangyy/folder-merge-doc
Samuel Just [Wed, 7 May 2014 18:05:59 +0000 (11:05 -0700)]
Merge pull request #1783 from guangyy/folder-merge-doc

Update doc to reflect the bahavior change for filestore_merge_threshold setting.

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge pull request #1784 from ceph/wip-da-cleanup-includes
Samuel Just [Wed, 7 May 2014 18:05:07 +0000 (11:05 -0700)]
Merge pull request #1784 from ceph/wip-da-cleanup-includes

Cleanup some included headers

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge pull request #1775 from ceph/wip-rbd-clang
Danny Al-Gaaf [Wed, 7 May 2014 13:47:56 +0000 (15:47 +0200)]
Merge pull request #1775 from ceph/wip-rbd-clang

fix clang-analyzer warnings in rbd and objectcacher

Reviewed-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agoMerge pull request #1782 from xinglin/coverity-fixes
Danny Al-Gaaf [Wed, 7 May 2014 13:34:30 +0000 (15:34 +0200)]
Merge pull request #1782 from xinglin/coverity-fixes

test/libcephfs/test.cc: free cmount structure before return

Reviewed-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agotest_librbd_fsx: align temporary buffers allocated in check_clone() 1766/head
Ilya Dryomov [Wed, 7 May 2014 13:19:53 +0000 (17:19 +0400)]
test_librbd_fsx: align temporary buffers allocated in check_clone()

check_clone() allocates temporary good_buf and temp_buf with malloc(),
which is not good enough for krbd with O_DIRECT.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
11 years agotest_librbd_fsx: wire up O_DIRECT mode
Ilya Dryomov [Wed, 7 May 2014 13:19:53 +0000 (17:19 +0400)]
test_librbd_fsx: wire up O_DIRECT mode

Wire up O_DIRECT mode (-Z) for krbd, to have a workaround for possible
problems with BLKDISCARD leaving stale entries in the buffer cache in
place.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
11 years agotest_librbd_fsx: fix a bug in docloseopen()
Ilya Dryomov [Fri, 2 May 2014 11:13:11 +0000 (15:13 +0400)]
test_librbd_fsx: fix a bug in docloseopen()

docloseopen() always opens $iname image.  This is bad, because the
image we had opened could have been something like $iname-clone3.  Fix
it by leveraging the fact that rbd_ctx has an image name field.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
11 years agotest_librbd_fsx: add krbd mode support
Ilya Dryomov [Fri, 2 May 2014 11:13:11 +0000 (15:13 +0400)]
test_librbd_fsx: add krbd mode support

Add krbd mode support (-K) to test krbd in the same way librbd is
tested.  This introduces a dependency on libkrbd and, because it's
a C++ static library, requires C++ linking.  The rbd_operations
framework can be extended in the future to also test rbd_fuse.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
11 years agotest_librbd_fsx: add a flag to disable randomized striping
Ilya Dryomov [Thu, 1 May 2014 12:08:03 +0000 (16:08 +0400)]
test_librbd_fsx: add a flag to disable randomized striping

In preparation for krbd mode support, introduce an option to disable
randomized striping.  The kernel as of 3.15 does not support "fancy"
striping and will not map images with non-default striping values.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
11 years agotest_librbd_fsx: add holebdy option
Ilya Dryomov [Thu, 1 May 2014 12:08:03 +0000 (16:08 +0400)]
test_librbd_fsx: add holebdy option

In preparation for krbd mode support, provide an option to specify
alignment for discards.  The kernel will reject discard requests whose
offset and length are not sector-size aligned.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
11 years agotest_librbd_fsx: make resizes sector-size aligned
Ilya Dryomov [Thu, 1 May 2014 12:08:03 +0000 (16:08 +0400)]
test_librbd_fsx: make resizes sector-size aligned

In preparation for krbd mode support, change check_trunc_hack() to
resize to a sector-size aligned value.  The kernel will not work with
images whose size is not sector-size aligned.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
11 years agotest_librbd_fsx: use posix_memalign() to allocate aligned buffers
Ilya Dryomov [Fri, 25 Apr 2014 09:36:53 +0000 (13:36 +0400)]
test_librbd_fsx: use posix_memalign() to allocate aligned buffers

Use posix_memalign() to allocate good_buf and temp_buf, which must be
writebdy and readbdy aligned respectively.  Using round_ptr_up() the
way it is used makes fsx crash on free()s at the end of main(), because
the pointer returned by malloc() is overwritten by the aligned pointer.

Drop round_ptr_up() as it is no longer used.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
11 years agotest_librbd_fsx: align temp_buf by readbdy instead of writebdy
Ilya Dryomov [Fri, 25 Apr 2014 09:36:53 +0000 (13:36 +0400)]
test_librbd_fsx: align temp_buf by readbdy instead of writebdy

temp_buf is used for reads, so align it by readbdy.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
11 years agotest_librbd_fsx: move prterrcode() and simple_err()
Ilya Dryomov [Fri, 25 Apr 2014 09:36:53 +0000 (13:36 +0400)]
test_librbd_fsx: move prterrcode() and simple_err()

Move prterrcode() and simple_err() so that all printing functions are
close together.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
11 years agotest_librbd_fsx: update usage
Ilya Dryomov [Fri, 25 Apr 2014 09:36:52 +0000 (13:36 +0400)]
test_librbd_fsx: update usage

Update usage to include all options and flags.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
11 years agoosdmaptool.cc: cleanup included headers 1784/head
Danny Al-Gaaf [Wed, 7 May 2014 12:21:46 +0000 (14:21 +0200)]
osdmaptool.cc: cleanup included headers

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agomonmaptool.cc: cleanup included headers
Danny Al-Gaaf [Wed, 7 May 2014 12:21:08 +0000 (14:21 +0200)]
monmaptool.cc: cleanup included headers

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agoceph_osdomap_tool.cc: cleanup included headers
Danny Al-Gaaf [Wed, 7 May 2014 12:17:40 +0000 (14:17 +0200)]
ceph_osdomap_tool.cc: cleanup included headers

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agoceph_monstore_tool.cc: cleanup included headers
Danny Al-Gaaf [Wed, 7 May 2014 12:15:25 +0000 (14:15 +0200)]
ceph_monstore_tool.cc: cleanup included headers

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agoceph_filestore_tool.cc: remove not needed includes
Danny Al-Gaaf [Wed, 7 May 2014 12:14:44 +0000 (14:14 +0200)]
ceph_filestore_tool.cc: remove not needed includes

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agoceph_kvstore_tool.cc: cleanup includes
Danny Al-Gaaf [Wed, 7 May 2014 12:12:56 +0000 (14:12 +0200)]
ceph_kvstore_tool.cc: cleanup includes

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agoceph_filestore_dump.cc: cleanup includes
Danny Al-Gaaf [Wed, 7 May 2014 12:12:15 +0000 (14:12 +0200)]
ceph_filestore_dump.cc: cleanup includes

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agomon_store_converter.cc: remove not needed includes
Danny Al-Gaaf [Wed, 7 May 2014 12:03:35 +0000 (14:03 +0200)]
mon_store_converter.cc: remove not needed includes

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agodupstore.cc: remove not needed include of <iostream>
Danny Al-Gaaf [Wed, 7 May 2014 12:03:02 +0000 (14:03 +0200)]
dupstore.cc: remove not needed include of <iostream>

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agorest_bench.cc: remove not needed includes, re-order includes
Danny Al-Gaaf [Wed, 7 May 2014 12:02:20 +0000 (14:02 +0200)]
rest_bench.cc: remove not needed includes, re-order includes

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agopsim.cc: remove not used includes
Danny Al-Gaaf [Wed, 7 May 2014 11:56:33 +0000 (13:56 +0200)]
psim.cc: remove not used includes

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agoscratchtool.c: remove not needed include of <pthread.h>
Danny Al-Gaaf [Wed, 7 May 2014 11:55:59 +0000 (13:55 +0200)]
scratchtool.c: remove not needed include of <pthread.h>

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agoradosacl.cc: remove include of <iostream>, re-order includes
Danny Al-Gaaf [Wed, 7 May 2014 11:54:33 +0000 (13:54 +0200)]
radosacl.cc: remove include of <iostream>, re-order includes

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agoceph_conf.cc: cleanup includes, remove not needed headers
Danny Al-Gaaf [Wed, 7 May 2014 11:53:36 +0000 (13:53 +0200)]
ceph_conf.cc: cleanup includes, remove not needed headers

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agoceph_authtool.cc: remove not needed includes
Danny Al-Gaaf [Wed, 7 May 2014 11:53:07 +0000 (13:53 +0200)]
ceph_authtool.cc: remove not needed includes

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agoceph_monstore_tool.cc: remove not needed includes
Danny Al-Gaaf [Fri, 2 May 2014 13:01:28 +0000 (15:01 +0200)]
ceph_monstore_tool.cc: remove not needed includes

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agorgw_admin.cc: remove twice included header, resort includes
Danny Al-Gaaf [Fri, 2 May 2014 01:45:22 +0000 (03:45 +0200)]
rgw_admin.cc: remove twice included header, resort includes

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agoMDSMonitor.cc: remove twice included header, resorted includes
Danny Al-Gaaf [Fri, 2 May 2014 01:39:55 +0000 (03:39 +0200)]
MDSMonitor.cc: remove twice included header, resorted includes

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agoAuthMonitor.cc: remove twice included header, resorted includes
Danny Al-Gaaf [Fri, 2 May 2014 01:36:53 +0000 (03:36 +0200)]
AuthMonitor.cc: remove twice included header, resorted includes

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agoceph_osdomap_tool.cc: remove some twice included headers
Danny Al-Gaaf [Fri, 2 May 2014 01:33:38 +0000 (03:33 +0200)]
ceph_osdomap_tool.cc: remove some twice included headers

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agoceph_monstore_tool.cc: remove twice included headers
Danny Al-Gaaf [Fri, 2 May 2014 01:31:13 +0000 (03:31 +0200)]
ceph_monstore_tool.cc: remove twice included headers

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
11 years agoUpdate doc to reflect the bahavior change for filestore_merge_threshold setting. 1783/head
Guang Yang [Wed, 7 May 2014 09:41:36 +0000 (09:41 +0000)]
Update doc to reflect the bahavior change for filestore_merge_threshold setting.

Signed-off-by: Guang Yang (yguang@yahoo-inc.com)
11 years agoMerge pull request #1532 from ceph/wip-fast-dispatch
Gregory Farnum [Wed, 7 May 2014 06:06:14 +0000 (23:06 -0700)]
Merge pull request #1532 from ceph/wip-fast-dispatch

fast dispatch
This series adds an ms_fast_dispatch interface to the Messenger/Dispatcher, designed so that you can dispatch messages directly from the Pipe threads without going through the Dispatch queue.
It also sets the OSD to make use of this interface for most operations, and switches to finer-grained locking and use of local data in a bunch of different paths to enable that.

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge remote-tracking branch 'origin/master' into wip-fast-dispatch 1532/head
Greg Farnum [Wed, 7 May 2014 05:23:06 +0000 (22:23 -0700)]
Merge remote-tracking branch 'origin/master' into wip-fast-dispatch

Conflicts:
src/osd/OSD.cc

11 years agotest/libcephfs/test.cc: free cmount structure before return 1782/head
Xing Lin [Mon, 17 Mar 2014 06:00:28 +0000 (00:00 -0600)]
test/libcephfs/test.cc: free cmount structure before return

call ceph_shutdown to free cmount structure before return

Signed-off-by: Xing Lin <xinglin@cs.utah.edu>
11 years agorgw: fix stripe_size calculation 1780/head
Yehuda Sadeh [Tue, 6 May 2014 23:55:27 +0000 (16:55 -0700)]
rgw: fix stripe_size calculation

Fixes: #8299
Backport: firefly
The stripe size calculation was broken, specifically affected cases
where we had manifest that described multiple parts.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agomds: handle export freezen race
Yan, Zheng [Sun, 4 May 2014 02:40:25 +0000 (10:40 +0800)]
mds: handle export freezen race

handle following sequence of events:
- subtree becomes frozen, C_MDC_ExportFreeze is queued.
- export is cancelled
- C_MDC_ExportFreeze is executed.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agomds: allow negetive rstat
Yan, Zheng [Sun, 4 May 2014 02:15:36 +0000 (10:15 +0800)]
mds: allow negetive rstat

When splitting dirfrag, delta rstat is always added to the first new
dirfrag. Ancestors of the dirfrag may have nagtive rstat before the
delta rstat has been propagated to them. For example:

inode 100 n(v1 b-4096)
|- dir 100 n(v1 b-4096)
   |- dentry
      |- inode 101 n(v1 b-4096)
         |- dir 101.0* n(v1)/n(v1 b-4096)
         |- dir 101.1* n(v1)

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agomds: cancel fragmenting dirfrags when cluster is degraded
Yan, Zheng [Sat, 3 May 2014 02:46:50 +0000 (10:46 +0800)]
mds: cancel fragmenting dirfrags when cluster is degraded

when cluster is degraded, acquiring locking can take long time.
It is not good to keep dirfrags in frozen state for a long time.

To allow cancelling fragment operation at any time, this commit
also reorganizes the codes that freeze/fetch dirfrags.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agomds: fix _rollback_repair_dir()
Yan, Zheng [Fri, 2 May 2014 17:31:09 +0000 (01:31 +0800)]
mds: fix _rollback_repair_dir()

_rollback_repair_dir() may increase dirfrag's rfiles/rsubdirs twice.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agomds: fix root and mdsdir inodes' rsubdirs
Yan, Zheng [Fri, 2 May 2014 15:08:41 +0000 (23:08 +0800)]
mds: fix root and mdsdir inodes' rsubdirs

inode rstat accounts inode itself.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agomds: ignore stale rstat/fragstat when splitting dirfrag
Yan, Zheng [Fri, 2 May 2014 14:21:30 +0000 (22:21 +0800)]
mds: ignore stale rstat/fragstat when splitting dirfrag

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agomds: encode dirfrag base in cache rejoin ack
Yan, Zheng [Sat, 3 May 2014 00:53:01 +0000 (08:53 +0800)]
mds: encode dirfrag base in cache rejoin ack

Makes sure recovering MDS get uptodate fragstat/rstat for subtree root
dirfrags. it's required the codes that fix-up inode's fragstat/rstat.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agomds: fix-up inode's fragstat/rstat according its dirfrags
Yan, Zheng [Fri, 2 May 2014 08:35:08 +0000 (16:35 +0800)]
mds: fix-up inode's fragstat/rstat according its dirfrags

Extend the code that fixup inode's fragstat/rstat to handle multiple
dirfrags

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agomds: clear aborted flag before rollback slave requests
Yan, Zheng [Fri, 2 May 2014 02:43:02 +0000 (10:43 +0800)]
mds: clear aborted flag before rollback slave requests

There is a special case that the MDRequest needs to be preserved after
rolling back slave rename. The preserved MDRequest will be used later.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agomds: remove mdsdir in the final step of shutdown MDS
Yan, Zheng [Thu, 1 May 2014 21:22:35 +0000 (05:22 +0800)]
mds: remove mdsdir in the final step of shutdown MDS

Otherwise we may get bad subtree map if we restart the MDS before
the shutdown process finishes.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agomds: tolerate bad sessionmap during journal replay
Yan, Zheng [Sun, 27 Apr 2014 03:53:13 +0000 (11:53 +0800)]
mds: tolerate bad sessionmap during journal replay

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agomds: pre-allocate inode numbers less frequently
Yan, Zheng [Wed, 30 Apr 2014 07:51:19 +0000 (15:51 +0800)]
mds: pre-allocate inode numbers less frequently

no need to refill the pre-allocated inode numbers each time an inode
number is used.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agomds: fix frozen inode check in MDCache::handle_discover()
Yan, Zheng [Tue, 29 Apr 2014 05:59:10 +0000 (13:59 +0800)]
mds: fix frozen inode check in MDCache::handle_discover()

When MDCache::handle_discover() encounters a frozen dirfrag, it should
proceed if the dirfrag is being merged, but the MDS hasn't frozen all
dirfrags yet. When MDCache::handle_discover() checks if a inode is
frozen, it should use CInode::is_frozen_inode() (which doesn't check if
inode's parent dirfrag is frozen).

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agomds: include authpinned objects in remote authpin request
Yan, Zheng [Sun, 27 Apr 2014 15:20:53 +0000 (23:20 +0800)]
mds: include authpinned objects in remote authpin request

Server::handle_slave_auth_pin() may drop old authpins if it encounters
object that is not authpinable. So it is better to include objects that
have already been authpinned in the remote authpin reuqest.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agomds: send dentry unlink message to replicas of stray dentry
Yan, Zheng [Sat, 26 Apr 2014 12:30:04 +0000 (20:30 +0800)]
mds: send dentry unlink message to replicas of stray dentry

stray dentry may have more replicas than the unlinked dentry has.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agomds: maintain auth bits during replay
Yan, Zheng [Fri, 28 Mar 2014 05:30:07 +0000 (13:30 +0800)]
mds: maintain auth bits during replay

Objects' STATE_AUTH bits are set when replaying EImportStart event.
MDCache::trim_non_auth_subtree() clear objects' STATE_AUTH bits when
replaying EExport event.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agoMerge pull request #1774 from ceph/wip-8296
Sage Weil [Tue, 6 May 2014 20:08:39 +0000 (13:08 -0700)]
Merge pull request #1774 from ceph/wip-8296

osd/ReplicatedPG: fix whiteouts for other cache mode

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agorgw: cut short object read if a chunk returns error 1776/head
Yehuda Sadeh [Tue, 6 May 2014 18:06:29 +0000 (11:06 -0700)]
rgw: cut short object read if a chunk returns error

Fixes: #8289
Backport: firefly, dumpling
When reading an object, if we hit an error when trying to read one of
the rados objects then we should just stop. Otherwise we're just going
to continue reading the rest of the object, and since it can't be sent
back to the client (as we have a hole in the middle), we end up
accumulating everything in memory.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoPipe: wait for Pipes to finish running, instead of just stop()ing them
Greg Farnum [Mon, 5 May 2014 04:58:04 +0000 (21:58 -0700)]
Pipe: wait for Pipes to finish running, instead of just stop()ing them

Add a stop_and_wait() function that, in addition to closing the Pipe and killing
its socket, waits for any fast_dispatch call which is in-progress. Use this in
several parts of the Pipe and SimpleMessenger code where appropriate.

This fixes several races with fast_dispatch and other avenues; here are two:
1) It could be that we grab the lock while the existing pipe is fast_dispatching
and then proceed to dispatch messages ourself, beating it. Instead, wait for
the other pipe. Add a "reader_dispatching" member which tells bus this is
happening, and when re-locking, signal the cond if we're shutting down.

2) It could be that a normally-dispatched Message in the OSD triggers a
mark_down() on the Connection and then clears out the Session
(Connection::priv) pointer, causing a racing fast_dispatch()'ed function to
assert out in the OSD because it requires a valid Session.

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agolibrbd: check return value during snap_unprotect 1775/head
Josh Durgin [Tue, 6 May 2014 18:18:28 +0000 (11:18 -0700)]
librbd: check return value during snap_unprotect

This would only fail if the header object was corrupted, so it's
unlikely to occur in practice.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoObjectCacher: remove useless assignment
Josh Durgin [Tue, 6 May 2014 18:11:01 +0000 (11:11 -0700)]
ObjectCacher: remove useless assignment

left is not read after the break. Caught by clang-analyzer.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoosd/ReplicatedPG: fix whiteouts for other cache mode 1774/head
Sage Weil [Tue, 6 May 2014 18:01:27 +0000 (11:01 -0700)]
osd/ReplicatedPG: fix whiteouts for other cache mode

We were special casing WRITEBACK mode for handling whiteouts; this needs to
also include the FORWARD and READONLY modes.  To avoid having to list
specific cache modes, though, just check != NONE.

Fixes: #8296
Backport: firefly
Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1601 from ceph/wip-7576
Samuel Just [Tue, 6 May 2014 17:49:46 +0000 (10:49 -0700)]
Merge pull request #1601 from ceph/wip-7576

osd: prevent pg map epochs from lagging too far behind

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge pull request #1748 from onlyjob/docs
Josh Durgin [Tue, 6 May 2014 17:12:45 +0000 (10:12 -0700)]
Merge pull request #1748 from onlyjob/docs

sample.ceph.conf update:

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoMerge pull request #1653 from ceph/wip-7499
Josh Durgin [Tue, 6 May 2014 17:10:59 +0000 (10:10 -0700)]
Merge pull request #1653 from ceph/wip-7499

rgw, radosgw-admin: bucket link uses bucket instance id now

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorgw: send user manifest header field 1773/head
Yehuda Sadeh [Mon, 21 Apr 2014 22:34:04 +0000 (15:34 -0700)]
rgw: send user manifest header field

Fixes: #8170
Backport: firefly
If user manifest header exists (swift) send it as part of the object
header data.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoMerge pull request #1768 from daniel-j-h/code_quality
Sage Weil [Tue, 6 May 2014 14:12:00 +0000 (07:12 -0700)]
Merge pull request #1768 from daniel-j-h/code_quality

Variable length array of std::strings (not legal in C++) changed to std::vector<std::string>

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoRevert "Fix installation into user home directory, broken by d3f0c0b"
Sage Weil [Tue, 6 May 2014 14:04:56 +0000 (07:04 -0700)]
Revert "Fix installation into user home directory, broken by d3f0c0b"

This reverts commit 7539281037ce7a755ac8661ecb15aea32e5f79f6.

This breaks mount.fuse.ceph installation.

11 years agodoc: Fixed artifacts from merge.
John Wilkins [Tue, 6 May 2014 10:54:45 +0000 (03:54 -0700)]
doc: Fixed artifacts from merge.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agodoc: Added sudo to setenforce. Restored merge artifact.
John Wilkins [Tue, 6 May 2014 10:54:08 +0000 (03:54 -0700)]
doc: Added sudo to setenforce. Restored merge artifact.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agodoc: Added erasure coding and cache tiering notes. Special thanks to Loic Dachary.
John Wilkins [Tue, 6 May 2014 10:53:03 +0000 (03:53 -0700)]
doc: Added erasure coding and cache tiering notes. Special thanks to Loic Dachary.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agoVariable length array of std::strings (not legal in C++) changed to std::vector<std... 1768/head
Daniel J. Hofmann [Mon, 5 May 2014 14:06:45 +0000 (16:06 +0200)]
Variable length array of std::strings (not legal in C++) changed to std::vector<std::string>

Signed-off-by: Daniel J. Hofmann <daniel@trvx.org>
11 years agoMerge pull request #1770 from ceph/wip-8290
Sage Weil [Mon, 5 May 2014 23:55:49 +0000 (16:55 -0700)]
Merge pull request #1770 from ceph/wip-8290

client: check snap_caps in Incode::is_any_caps()

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoclient: check snap_caps in Incode::is_any_caps() 1770/head
Yan, Zheng [Mon, 5 May 2014 23:44:45 +0000 (07:44 +0800)]
client: check snap_caps in Incode::is_any_caps()

Fixes: #8290
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agoMerge pull request #1764 from eile/master
Sage Weil [Mon, 5 May 2014 23:26:27 +0000 (16:26 -0700)]
Merge pull request #1764 from eile/master

Fix installation into user home directory, broken by d3f0c0b

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoSimpleMessenger: Don't grab the lock when sending messages if we don't have to
Greg Farnum [Tue, 22 Apr 2014 19:51:37 +0000 (12:51 -0700)]
SimpleMessenger: Don't grab the lock when sending messages if we don't have to

We'd like it if sending a message didn't require any global locks, but the
submit_message() function conditionally needs it in order to create new
Pipes. So:
1) When failing on a dud Pipe, verify that it's still the Pipe the Connection
is linked to; if not, try sending along the newly-linked Pipe.
2) Add an "already_locked" param to submit_message
3) Have the Connection-based interface set this param to false, and
the addr-based interface set it to true, reflecting whether they have
taken the SimpleMessenger::lock.
4) If we discover we need to reference global data structures in
submit_mesage:
  4a) if locked, do as we previously have
  4b) if not locked, take the lock and call into submit_message again.

The net effect of this is that in the typical case, the Connection-based
_send_message() function no longer acquires global locks, only per-Connection
ones. In the case where the Connection must recreate a Pipe, it falls back to
performing like the addr-based _send_message() does. In the case where
we are racing with somebody else recreating a Pipe(either us or the other
end), we may try twice but we will still only take per-Connection/Pipe locks,
which is a fair tradeoff for not taking the global lock.

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoOSD: rename share_map_incoming and share_map_outgoing
Greg Farnum [Fri, 25 Apr 2014 21:36:03 +0000 (14:36 -0700)]
OSD: rename share_map_incoming and share_map_outgoing

share_map_incoming -> share_map
share_map_outgoing -> share_map_peer

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoOSD: move the peer_epoch and map sharing infrastructure into OSDService
Greg Farnum [Fri, 25 Apr 2014 21:00:00 +0000 (14:00 -0700)]
OSD: move the peer_epoch and map sharing infrastructure into OSDService

None of this code requires OSD-internal data or acquring locks from
anybody else.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoOSD: move the {boot,up,bind} epochs into OSDService
Greg Farnum [Fri, 25 Apr 2014 20:36:14 +0000 (13:36 -0700)]
OSD: move the {boot,up,bind} epochs into OSDService

Provide interfaces around setting and retrieving them, instead of accessing
them directly with a lock.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoOSD: scan for dropped PGs in consume_map instead of advance_map
Greg Farnum [Fri, 25 Apr 2014 00:20:48 +0000 (17:20 -0700)]
OSD: scan for dropped PGs in consume_map instead of advance_map

We have to wait until after we know that nobody will be adding ops for
newly-dead PGs to the list. While we're moving it, switch the locking
so we only hold a write lock while deleting the actual lists.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoOSD: do not take the pre_publish_lock in connection utility functions
Greg Farnum [Fri, 4 Apr 2014 21:32:37 +0000 (14:32 -0700)]
OSD: do not take the pre_publish_lock in connection utility functions

They loop back around for local connections and deadlock, so we use the
map reservation mechanism instead.
TODO: actually that issue is out of date, do we still want this change?

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoOSD: enable ms_fast_dispatch
Greg Farnum [Wed, 26 Mar 2014 22:04:39 +0000 (15:04 -0700)]
OSD: enable ms_fast_dispatch

We've been setting it up, now this patch actually adds a fast path for osd ops
which bypasses the osd_lock and should not block on any longly held locks. In
addition to the actual ms_fast_dispatch; we take advantage of the fast_notify
functions in order to create a Session for every peer, since that is now the
data structure around which we handle incoming Messages and waitlisting; and
fast_preprocess in order to track when a peer has already sent us a new map
(otherwise, if we see an op with a too-new epoch, we have to request it from
the monitor).

Signed-off-by: Samuel Just <sam.just@inktank.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoOSD: remove dead comment
Greg Farnum [Fri, 25 Apr 2014 00:27:18 +0000 (17:27 -0700)]
OSD: remove dead comment

enqueue_op no longer requires holding the osd_lock.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoOSD: Juggle the locking when resurrecting a PG
Greg Farnum [Sun, 13 Apr 2014 06:06:37 +0000 (23:06 -0700)]
OSD: Juggle the locking when resurrecting a PG

Don't hold the old PG's lock in _create_lock_pg. Instead, just copy the
necessary data bits into a holding location. Note that this means we aren't
protecting it against change while the new PG is created, which I *think*
is okay...

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoOSD: don't share_map_incoming() directly from handle_replica_op()
Greg Farnum [Fri, 4 Apr 2014 21:52:04 +0000 (14:52 -0700)]
OSD: don't share_map_incoming() directly from handle_replica_op()

Let the op_tp handle it, or our C_SendMap callback in the op_gen_wq.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoOSD: use the async workqueue to send OSDMap updates on dropped ops
Greg Farnum [Tue, 25 Mar 2014 03:42:19 +0000 (20:42 -0700)]
OSD: use the async workqueue to send OSDMap updates on dropped ops

Check whether we actually want to send a map in-line, and if we do, create
a GenContext which does so and put that in the op_gen_wq.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoOSD: add an op threadpool GenContext workqueue
Greg Farnum [Tue, 25 Mar 2014 03:31:58 +0000 (20:31 -0700)]
OSD: add an op threadpool GenContext workqueue

Signed-off-by: Greg Farnum <greg@inktank.com>