Commit Graph

33580 Commits

Author SHA1 Message Date
Ilya Dryomov
421e6c5617 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>
2014-05-07 17:30:05 +04:00
Ilya Dryomov
d5daf7187a 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>
2014-05-07 17:30:05 +04:00
Ilya Dryomov
fef984b937 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>
2014-05-07 17:30:05 +04:00
Ilya Dryomov
d63808ed09 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>
2014-05-07 17:30:05 +04:00
Ilya Dryomov
3513ba0ac4 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>
2014-05-07 17:30:05 +04:00
Ilya Dryomov
7df50ecd80 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>
2014-05-07 17:30:05 +04:00
Ilya Dryomov
d13e32e201 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>
2014-05-07 17:30:05 +04:00
Ilya Dryomov
8d41f86f42 test_librbd_fsx: update usage
Update usage to include all options and flags.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
2014-05-07 17:30:05 +04:00
Danny Al-Gaaf
99400f8218 osdmaptool.cc: cleanup included headers
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 14:21:46 +02:00
Danny Al-Gaaf
a5e0d802e4 monmaptool.cc: cleanup included headers
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 14:21:08 +02:00
Danny Al-Gaaf
537385cc16 ceph_osdomap_tool.cc: cleanup included headers
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 14:17:40 +02:00
Danny Al-Gaaf
d57561a8b7 ceph_monstore_tool.cc: cleanup included headers
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 14:15:25 +02:00
Danny Al-Gaaf
e2e3d1d074 ceph_filestore_tool.cc: remove not needed includes
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 14:14:44 +02:00
Danny Al-Gaaf
ea6df887ea ceph_kvstore_tool.cc: cleanup includes
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 14:12:56 +02:00
Danny Al-Gaaf
8620609884 ceph_filestore_dump.cc: cleanup includes
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 14:12:15 +02:00
Danny Al-Gaaf
16e86aef79 mon_store_converter.cc: remove not needed includes
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 14:03:35 +02:00
Danny Al-Gaaf
2c33ace302 dupstore.cc: remove not needed include of <iostream>
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 14:03:02 +02:00
Danny Al-Gaaf
b1f4cd45fc rest_bench.cc: remove not needed includes, re-order includes
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 14:02:20 +02:00
Danny Al-Gaaf
bc166f3a28 psim.cc: remove not used includes
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 13:56:33 +02:00
Danny Al-Gaaf
de252c11f5 scratchtool.c: remove not needed include of <pthread.h>
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 13:55:59 +02:00
Danny Al-Gaaf
4da889458c radosacl.cc: remove include of <iostream>, re-order includes
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 13:55:36 +02:00
Danny Al-Gaaf
24a047eca6 ceph_conf.cc: cleanup includes, remove not needed headers
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 13:53:36 +02:00
Danny Al-Gaaf
c0dcd231e9 ceph_authtool.cc: remove not needed includes
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 13:53:07 +02:00
Danny Al-Gaaf
e2b4d4175f ceph_monstore_tool.cc: remove not needed includes
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 13:27:38 +02:00
Danny Al-Gaaf
8ab3232ab6 rgw_admin.cc: remove twice included header, resort includes
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 13:27:38 +02:00
Danny Al-Gaaf
ddb9ce0e2f MDSMonitor.cc: remove twice included header, resorted includes
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 13:27:38 +02:00
Danny Al-Gaaf
a8a2b56437 AuthMonitor.cc: remove twice included header, resorted includes
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 13:27:38 +02:00
Danny Al-Gaaf
71b340a0fd ceph_osdomap_tool.cc: remove some twice included headers
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 13:27:38 +02:00
Danny Al-Gaaf
e66aec6eed ceph_monstore_tool.cc: remove twice included headers
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-07 13:27:38 +02:00
Guang Yang
f9a91f2b62 Update doc to reflect the bahavior change for filestore_merge_threshold setting.
Signed-off-by: Guang Yang (yguang@yahoo-inc.com)
2014-05-07 09:41:36 +00:00
Gregory Farnum
523619b0e5 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>
2014-05-06 23:06:14 -07:00
Greg Farnum
5e5a0867b1 Merge remote-tracking branch 'origin/master' into wip-fast-dispatch
Conflicts:
	src/osd/OSD.cc
2014-05-06 22:23:06 -07:00
Xing Lin
0d3cdb9fdb 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>
2014-05-06 22:44:37 -06:00
Sage Weil
8fa5408f1f client: handle traceless rename in insert_trace, not verify_reply_trace
The insert_trace() logic is about managing local cache consistency; the
verify_reply_trace() is about retrying requests to get the results that
our callers need.

Set up stubs to handle rmdir and unlink while we are here.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-05-07 10:06:52 +08:00
Sage Weil
334c43f54d client: avoid blindly removing dentries
MetaRequests may have references to these dentries.  Instead of removing
them and tearing down the directory, just unlink them from the inodes.

We could be a bit smarter here if we looked at the reference count, but
this works too.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-05-07 10:06:52 +08:00
Sage Weil
25d2469f03 client: leave NULL dentry in place on ENOENT during lookup
If we get a NULL lookup result, unlink the inode but leave the dentry
in place.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-05-07 10:06:52 +08:00
Sage Weil
cc65c39272 client: add debugging around traceless reply failures
Tracking down #5021

Signed-off-by: Sage Weil <sage@inktank.com>
2014-05-07 10:06:51 +08:00
Yehuda Sadeh
545d8ad1d2 rgw: extend manifest to avoid old style manifest
In case we hit issue #8269 we'd like to avoid creating an old style
manifest. Since we need to have parts that use different prefix we add a
new rule param that overrides the manifest prefix.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2014-05-06 17:04:06 -07:00
Yehuda Sadeh
9968b938b5 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>
2014-05-06 16:55:27 -07:00
Yan, Zheng
6c2b173231 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>
2014-05-07 07:10:17 +08:00
Yan, Zheng
a09070ab45 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>
2014-05-07 07:10:16 +08:00
Yan, Zheng
22abd7b006 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>
2014-05-07 07:10:16 +08:00
Yan, Zheng
6e3501bd31 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>
2014-05-07 07:10:16 +08:00
Yan, Zheng
da17394941 mds: fix root and mdsdir inodes' rsubdirs
inode rstat accounts inode itself.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-05-07 07:10:16 +08:00
Yan, Zheng
5283d80d32 mds: ignore stale rstat/fragstat when splitting dirfrag
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-05-07 07:10:16 +08:00
Yan, Zheng
4e844c948b 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>
2014-05-07 07:10:16 +08:00
Yan, Zheng
f7541067d0 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>
2014-05-07 07:10:16 +08:00
Yan, Zheng
a2caea7c91 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>
2014-05-07 07:10:16 +08:00
Yan, Zheng
a85bf8c960 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>
2014-05-07 07:10:16 +08:00
Yan, Zheng
c4f0f0510b mds: tolerate bad sessionmap during journal replay
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-05-07 07:10:16 +08:00