Commit Graph

40696 Commits

Author SHA1 Message Date
Jason Dillaman
57d2781da8 librbd: snap_remove should ignore -ENOENT errors
If the attempt to deregister the snapshot from the parent
image fails with -ENOENT, ignore the error as it is safe
to assume that the child is not associated with the parent.

Fixes: #11113
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit cf8094942c)
2015-04-01 15:54:51 -04:00
Jason Dillaman
572a2f5707 librbd: get_parent_info should protect against invalid parent
get_parent_info should return -ENOENT if the image does not
have an associated parent image.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 21afd0ef8e)
2015-04-01 15:54:51 -04:00
Josh Durgin
03d2d80131 Merge pull request #4221 from xiaoxichen/rbd_discard_skip
Add rbd_discard_skip_zeroing flag

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-04-01 10:35:58 -07:00
Sage Weil
777dfa51f9 Merge pull request #4213 from xiaoxichen/wip-new-rocksdb
RocksDB configuration

Reviewed-by: Sage Weil <sage@redhat.com>
2015-04-01 10:05:03 -07:00
Kefu Chai
ba5bfce584 Merge pull request #4208 from dmitryya/ceph_argparse_improvement
ceph_argparse: Remove code duplication and generalize ceph_argparse_with* routines

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-04-01 21:38:55 +08:00
Xiaoxi Chen
e7812b8416 Add rbd_skip_partial_discard flag
If we want to discard a range of an object, we will zero(use fallocate
to punch a hole) the range now. In general this introduce some overhead(extra writes).

If the filesystem ontop of RBD holding lots of small files, this
behavior will bring big performance penalty.

Adding a flag that allow user to control if they want to zero the
range.

Signed-off-by: Xiaoxi Chen <xiaoxi.chen@intel.com>
2015-04-01 14:43:23 +08:00
Sage Weil
52fd9c6323 ceph-disk: follow ceph-osd hints when setting up journal
- If the journal is required, require it.
- If the journal is not allowed, do not allow one to be specified
- If the journal is not wanted, to not set one up by default when none is
provided.

See #9580

Signed-off-by: Sage Weil <sage@redhat.com>
2015-03-31 17:19:32 -07:00
Sage Weil
542820d065 ceph-osd: add --check-wants-journal, --check-allows-journal
Completes OSD side of #9580

Signed-off-by: Sage Weil <sage@redhat.com>
2015-03-31 13:49:35 -07:00
Sage Weil
0c29343548 ceph-osd: fix usage
Signed-off-by: Sage Weil <sage@redhat.com>
2015-03-31 13:44:08 -07:00
Josh Durgin
01b5085235 Merge pull request #4235 from ceph/wip-rbd-unit-tests
tests: exercise all RBD features during unit testing

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-03-31 12:36:18 -07:00
Josh Durgin
41b9cee96f Merge pull request #4232 from ceph/fix-make-conf
Fix make conf

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-03-31 12:34:00 -07:00
Gregory Farnum
75c19140c9 Merge pull request #4236 from ceph/wip-verify-mds-journal-makefile
mds: update Makefile for removed script

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-03-31 12:27:34 -07:00
John Spray
81df12990a mds: update Makefile for removed script
Oversight in "mds: remove verify-mds-journal.sh script"

Signed-off-by: John Spray <john.spray@redhat.com>
2015-03-31 20:15:28 +01:00
Dmitry Yatsushkevich
aa77a4661c ceph_argparse: generalize ceph_argparse_with* routines
Remove code duplication by generalizing ceph_argparse_with{int,float,longlong}
routines - make one template function for those cases.

Signed-off-by: Dmitry Yatsushkevich <dyatsushkevich@mirantis.com>
2015-03-31 12:13:55 -07:00
Dmitry Yatsushkevich
b491c820bb rbd cli: remove erroneous arg for ceph_argparse_witharg
Remove erroneous arg for ceph_argparse_witharg call when '--io-pattern' parsed:
the name look up will point the compiler to bool ceph_argparse_witharg(
    std::vector<const char*> &args,
    std::vector<const char*>::iterator &i, std::string *ret, ...) when compiler
is resolving this function call. The &err argument will be wrongly interpreted
as a char * variable to be compared with the argument name pointed by i.

Signed-off-by: Dmitry Yatsushkevich <dyatsushkevich@mirantis.com>
2015-03-31 12:13:55 -07:00
Jason Dillaman
9859cae286 tests: exercise all RBD features during unit test
The librbd unit tests currently only test the old image format. Ensure
the new format and its possible features are also tested.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-03-31 14:34:05 -04:00
Noah Watkins
c4c646ca5b make: fix with_rbd guard
FileJournal needs stuff from blkdev.c in libcommon.

./.libs/libosd.a(libos_la-FileJournal.o): In function `FileJournal::_open_block_device()':
/home/nwatkins/src/ceph/src/os/FileJournal.cc:139: undefined reference to `get_block_device_size(int, long*)'
/home/nwatkins/src/ceph/src/os/FileJournal.cc:161: undefined reference to `block_device_support_discard(char const*)'
./.libs/libosd.a(libos_la-FileJournal.o): In function `FileJournal::do_discard(long, long)':
/home/nwatkins/src/ceph/src/os/FileJournal.cc:1587: undefined reference to `block_device_discard(int, long, long)'

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2015-03-31 10:46:10 -07:00
Noah Watkins
18edc50e95 make: add with_rbd guard
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2015-03-31 10:43:49 -07:00
Gregory Farnum
aedb2ecbae Merge pull request #4231 from ceph/wip-rm-verify-mds
mds: remove verify-mds-journal.sh script

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-03-31 10:08:53 -07:00
John Spray
7e49804a56 mds: remove verify-mds-journal.sh script
This invokes the MDS in a way that it no longer understands,
and is unused.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-03-31 17:50:11 +01:00
Samuel Just
28787d2184 Merge pull request #4230 from athanatos/wip-11244
ReplicatedPG::cancel_pull: requeue waiters as well

Reviewed-by: Sage Weil <sage@redhat.com>
2015-03-31 09:47:10 -07:00
Samuel Just
5ad54359a4 Merge pull request #4219 from liewegas/wip-scrub-mtime
osd: do not update mtime when recording digest

Reviewed-by: Samuel Just <sjust@redhat.com>
2015-03-31 09:45:46 -07:00
Sage Weil
fd26cd1f4e Merge pull request #4229 from athanatos/wip-scrub-hitsets
ReplicatedPG: don't write hitset while scrubbing, update scrub_cstat

Reviewed-by: Sage Weil <sage@redhat.com>
2015-03-31 09:39:32 -07:00
Sage Weil
9d0dcc1f06 Merge pull request #4228 from athanatos/wip-11280
Wip 11280

Reviewed-by: Sage Weil <sage@redhat.com>
2015-03-31 09:38:48 -07:00
Samuel Just
e5ff97201f Merge pull request #4207 from ceph/wip-11177
common: fix logging default channel to be 'cluster' not 'default' (11177)

Reviewed-by: Samuel Just <sjust@redhat.com>
2015-03-31 09:26:56 -07:00
Gregory Farnum
ba12448c80 Merge pull request #4211 from ceph/wip-11120
osdc/Striper.cc fix stripe_count == 1 && stripe_unit != object_size

Reviewed-by: John Spray <jspray@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-03-31 09:26:04 -07:00
Samuel Just
0b2e272430 ReplicatedPG::cancel_pull: requeue waiters as well
If we are in recovery_wait, we might not recover that object as part of
recover_primary for some time.  Worse, if we are waiting on a backfill
which is blocked waiting on a copy_from on the missing object in
question, it can become a dead lock.

Fixes: 11244
Backport: firefly
Signed-off-by: Samuel Just <sjust@redhat.com>
2015-03-31 09:21:36 -07:00
Samuel Just
23efab7d4f ReplicatedPG: don't write hitset while scrubbing, update scrub_cstat
Fixes: 11263
Fixes: 11262
Backport: firefly
Signed-off-by: Samuel Just <sjust@redhat.com>
2015-03-31 09:21:04 -07:00
Samuel Just
85307b933d ReplicatedPG: in do_op, requeue op if we requeue waiters in agent_choose_mode
The current op might be ordered after a waiter.

Fixes: 11280
Backport: firefly
Signed-off-by: Samuel Just <sjust@redhat.com>
2015-03-31 09:20:28 -07:00
Samuel Just
b1f078bc22 ReplicatedPG: requeue waiting_for_active before waiting_for_cache_not_full
The waiting_for_cache_not_full waiters must be dequeued first.

Fixes: 11267
Backport: firefly
Signed-off-by: Samuel Just <sjust@redhat.com>
2015-03-31 09:20:20 -07:00
Kefu Chai
508ee9bb95 Merge pull request #4225 from Fale/patch-1
doc: fix the architecture diagram in cephfs.rst

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-04-01 00:05:51 +08:00
Fabio Alessandro Locati
d5d6468e88 doc: fix the architecture diagram in cephfs.rst
Signed-off-by: Fabio Alessandro Locati <fabio@locati.cc>
2015-03-31 18:00:45 +02:00
Samuel Just
b0a3941ff6 ReplicatedPG::promote_object: do not create obc if not promoting
Otherwise, we can leave an incorrect cached obc around.

Introduced: 65bb4df599
Fixes: 11284
Signed-off-by: Samuel Just <sjust@redhat.com>
2015-03-31 08:41:09 -07:00
Samuel Just
bdc664fb3d ECTransaction: write out the hinfo key on touch as well
This way, even empty objects have the hinfo key written.  That way,
touch and touch->append->truncate end up with the same state.

Fixes: 11265
Signed-off-by: Samuel Just <sjust@redhat.com>
2015-03-31 08:30:10 -07:00
John Spray
9b171d23eb Merge pull request #4215 from ceph/wip-11258
Wip 11258

Reviewed-by: John Spray <john.spray@redhat.com>
2015-03-31 14:23:19 +01:00
Xiaoxi Chen
4c122c1a46 Set disableDataSync to false
If datasync is disabled, we may potentially lose data
on power failure.

Signed-off-by: Xiaoxi Chen <xiaoxi.chen@intel.com>
2015-03-31 08:44:57 +08:00
Xiaoxi Chen
0bd767fb7e Update RocksDB configuration to make it more clear
Add some performance critial configurations

Also group and polish the description of each configuration
to make it more clear, changed the default from 0 to actual
value.

Signed-off-by: Xiaoxi Chen <xiaoxi.chen@intel.com>
2015-03-31 08:44:57 +08:00
Sage Weil
497737aabf Merge remote-tracking branch 'gh/hammer'
Conflicts:
	src/gmock
	src/osd/ReplicatedPG.cc
2015-03-30 15:41:13 -07:00
Josh Durgin
febb5a47f0 librados: define C++ global flags from the C constants
This will help prevent drift in the future. It also makes it clear
that the flags are supposed to have the same values.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
2015-03-30 15:29:24 -07:00
Josh Durgin
b2b436906d test: add librados global op flags test
Just verify that the read gets the right data, to demonstrate that
passing a flag doesn't cause problems.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
2015-03-30 15:19:25 -07:00
Sage Weil
c7de236d2f os/KeyValueDB: skip experimental check for test_init
We don't want to spit out the warning twice, and we don't have cct
anyway.

Also test_init is annoying; we should try to kill it.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-03-30 15:14:15 -07:00
Josh Durgin
7e5b81b381 Revert "librados: remove the unused flags."
This reverts commit 4bd2bd6bb8.

These constants are the only way these flags are exposed through the C
interface. C users can't include librados.hpp.  Ideally we would have
only one version of these (just the C ones), but the C++ ones came
first and need to stay for backwards compatibility.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
2015-03-30 13:22:16 -07:00
Sage Weil
2e908f1e87 Merge pull request #3878 from ceph/wip-dirty-pg-keys
osd: coalesce into single omap_setkeys for normal writes

Tested-by: Andreas Bluemle <andreas.bluemle@itxperts.de>
Reviewed-by: David Zafman <dzafman@redhat.com>
2015-03-30 11:18:56 -07:00
Loic Dachary
b28a42ce32 Merge pull request #4212 from zhouyuan/isal_2.13
erasure-code: Update ISA-L to 2.13

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-03-30 20:17:38 +02:00
Sage Weil
a05871a185 Merge pull request #4160 from ceph/wip-rocksdb
update rocksdb
2015-03-30 10:57:07 -07:00
Sage Weil
8e5d4c66dc osd: drop unused utime_t now arg to issue_repop
Signed-off-by: Sage Weil <sage@redhat.com>
2015-03-30 10:45:00 -07:00
Jianpeng Ma
8db4056ba8 osd: do not update mtime when recording digest
The user mtime and local_mtime are normally set in finish_ctx based on the
value of ctx->mtime; clear that to avoid this update.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
[Sage: simplified]
Signed-off-by: Sage Weil <sage@redhat.com>
2015-03-30 10:41:58 -07:00
Sage Weil
a4c01f38f1 mark kinetic experimental
Signed-off-by: Sage Weil <sage@redhat.com>
2015-03-30 10:00:01 -07:00
Sage Weil
002b7fdadf mark rocksdb experimental
Signed-off-by: Sage Weil <sage@redhat.com>
2015-03-30 10:00:01 -07:00
Loic Dachary
6f4936ee96 Merge pull request #4131 from t-miyamae/wip-mshec-documentation-h2
erasure code: add shec's documentation / change default layout

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-03-30 14:37:08 +02:00