Commit Graph

33958 Commits

Author SHA1 Message Date
Somnath Roy
b15bf6bbcb OSD:Derived sharded queue implementation is changed
All the threadpool related stuff like stop/pause/drain etc. are not
handled by sharded queue anymore. All it is implementing are related to
processing,enqueue , signaling of waiting threads and shard queue status.
The pg ordering is been taken care of by introducing a map <pg,op> in each
shard.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
2014-05-30 18:45:42 -07:00
Somnath Roy
c24ef0074d ceph-common: The Sharded threadpool worker logic changed
Now, the _process() of the derived queue is processing one request
at a time and the outer loop is controlled by the sharded threadpool.
The stop/pause/drain functionalities are controlled by the sharded TP.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
2014-05-30 18:45:31 -07:00
Somnath Roy
06845d0bf6 OSD: Sharded Op worker queue implementation for handling OSD ops
This is the implementation for the client of the
sharded thread pool/sharded workQ. Removed the op_wq class and now OSD
ops are going through sharded workqueue model which is used by the
sharded threadpool. Derived ShardedOpWQ implementation has a data structure
called ShardData which has it's own lock/cond and storage. ShardedOpWQ
holds a vector of that and the size of the vector is a config option.
During enqueue operation on the queue, the ops are sharded across these
ShardData based on pg hash % number of shards.
Similarly, in the _process function the sharded thread pool threads are
divided across ShardData based on thread index % number of shards

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
2014-05-30 18:44:51 -07:00
Somnath Roy
8369c08e4c ceph-common: Implementation of the sharded threadpool.
Threadpool will only be having a single work queue and internally the
work queue will be having multiple storage data structures.
Based on some logic (which is derived class implementation specific)
the work queue will shard the requests among these storage structures.
Each storage will be guarded by finer grained sunchronization
objects. Sharded threadpool threads will be assigned to work on a
shard based on some algorithm which is again derived class implementation
specific.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
2014-05-30 18:44:27 -07:00
Sage Weil
83ccba3228 msg: remove comparison operators for sockaddr_storage
We don't need these at all, it turns out.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-05-30 16:26:25 -07:00
Yehuda Sadeh
70afaaabf9 rgw: fetch object attrs on multipart completion
Fixes: #8452
Backport: firefly
This fixes a regression following a code cleanup.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2014-05-30 16:20:22 -07:00
Yehuda Sadeh
b300318113 rgw: if extra data pool name is empty, use data pool name instead
Fixes: #8311
An empty pool name could be used as the extra data pool.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2014-05-30 14:49:23 -07:00
Joao Eduardo Luis
38405d3554 qa/workunits/cephtool: test setting options using SI units
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-05-30 22:09:23 +01:00
Joao Eduardo Luis
5500437e06 common/config.cc: allow integer values to be parsed as SI units
We are allowing this for all and any integer values; that is, OPT_INT,
OPT_LONGLONG, OPT_U32 and OPT_U64.

It's on the user to use appropriate units.  For instance, the user should
not use 'E(xabyte)' when setting a signed int, and use his best judgment
when setting options that, for instance, ought to receive seconds.

Fixes: 8265
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-05-30 22:09:23 +01:00
Joao Eduardo Luis
40587d4792 test/strtol.cc: Test 'strict_strtosi()'
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-05-30 22:09:23 +01:00
Joao Eduardo Luis
67dc5751ba common/strtol.cc: strict_strtosi() converts str with SI units to uint64_t
Accepts values with a suffix (B, K, M, G, T, P, E) and returns the
appropriate byte value.

E.g., 10B = 10, while 10K = 10240.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-05-30 22:09:23 +01:00
Sage Weil
3b884becca Merge remote-tracking branch 'gh/next' 2014-05-30 10:13:59 -07:00
Yehuda Sadeh
9c56c86bda rgw: calc md5 and compare if user provided appropriate header
Fixes: #8436
Backport: firefly

This was broken in ddc2e1a8e3. The fix
resurrects and old check that was dropped.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2014-05-30 09:51:52 -07:00
Loic Dachary
8691773ef0 Merge pull request #1888 from ceph/wip-8472
msg_types.h: Don't use strncmp for comparing sockaddr_in.

Reviewed-by: Loic Dachary <loic@dachary.org>
2014-05-30 10:03:04 +02:00
Dan Mick
cae085b676 msg_types.h: Don't use strncmp for comparing sockaddr_in.
Fixes: #8472
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2014-05-29 16:20:01 -07:00
Kevin Dalley
00b92119e5 doc: Improve man page for rados bench
Add information about seq and rand for bench. Also mention
--no-cleanup option.

Signed-off-by: Kevin Dalley <kevin@kelphead.org>
2014-05-29 16:03:50 -07:00
Loic Dachary
2bfb8d48c6 Merge pull request #1886 from nereocystis/pools-doc
doc: update pools documentation

Reviewed-by: Loic Dachary <loic@dachary.org>
2014-05-30 00:08:16 +02:00
Kevin Dalley
2da2699925 doc: update pools documentation
set=>get in "Get Pool Values"
grep for 'replicated size', not 'rep size'

Signed-off-by: Kevin Dalley <kevin@kelphead.org>
2014-05-29 14:56:06 -07:00
Kevin Dalley
ab59a100ad doc: Improve man page for bench
Add information about seq and rand for bench. Also mention
--no-cleanup option.

Signed-off-by: Kevin Dalley <kevin@kelphead.org>
2014-05-29 14:28:47 -07:00
Loic Dachary
0fd6e12bdd osd: replace shard_t usage with shard_id_t
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-05-29 23:20:53 +02:00
Loic Dachary
dedd8e265d osd: explicit shard_id_t() and NO_SHARD
Whenever an integer needs to be converted in a shard_id_t,
replace the implicit conversion with an explicit call to the
constructor.

Replace all ghobject_t::NO_SHARD and ghobject_t::no_shard() with
shard_id_t::NO_SHARD

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-05-29 23:20:53 +02:00
Loic Dachary
20e66d1609 osd: loop over uint8_t instead of shard_id_t
When looping in the range [0,number of shards[ using a uint8_t variable
which is an integer instead of shard_id_t. The alternative would be
define the ++ operator on shard_id_t but since the two are used
interchangeably in a number of places, that seems unnecessary.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-05-29 23:19:50 +02:00
John Wilkins
47e6fc2b05 Merge pull request #1884 from nereocystis/glossary-rados
doc: Define RADOS in glossary
2014-05-29 14:12:40 -07:00
Loic Dachary
d723cac03b osd: factorize shard_id_t/shard_t into a struct
The struct contains a single uint8_t and is preferred to control
conversions that would otherwise be implicit. There is no difference
between shard_id_t and shard_t. The definition is moved in
include/types.h so it is available to both hobject.h and osd_types.h

http://tracker.ceph.com/issues/8254 Fixes: #8254

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-05-29 23:11:48 +02:00
Kevin Dalley
dcf9568b67 doc: Define RADOS in glossary
Signed-off-by: Kevin Dalley <kevin@kelphead.org>
2014-05-29 14:03:30 -07:00
John Wilkins
e52b9c641d doc: Added osd pool default size setting example.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2014-05-29 13:22:52 -07:00
John Wilkins
20a04c6c9c doc: Moved redundant text out of quick-common.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2014-05-29 13:22:18 -07:00
Loic Dachary
6786d60917 common: WRITE_{EQ,CMP}_OPERATORS_1
For when a struct is defined to encapsulate a single value and get
control over implicit conversions that would otherwise be impossible
with typedef.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-05-29 21:53:19 +02:00
Samuel Just
e5f9d40b19 Merge pull request #1882 from ceph/wip-8465
osd: fix bad is_active() assert in share_map()

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-05-29 12:27:48 -07:00
Samuel Just
7ac05dc0a8 Merge pull request #1840 from yuyuyu101/wip-8381
Fix set_alloc_hint op cause KeyValueStore crash problem

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-05-29 12:25:50 -07:00
Sage Weil
1db4e2cf39 Merge pull request #1874 from ceph/wip-8292
better error reporting on incompatible device requirements

Reviewed-by: Dan Mick <dan.mick@inktank.com>
2014-05-29 11:24:47 -07:00
Sage Weil
f1b890ecb3 osd: fix bad is_active() assert in share_map()
We may be is_stopping() here if we are racing with shutdown().

Fixes: #8465
Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
2014-05-29 11:10:18 -07:00
Sage Weil
18d56c2724 Merge pull request #1880 from ailzhang/patch-1
rest-api: key missing for per "rx" and "rwx"

Backport: firefly
Reviewed-by: Sage Weil <sage@inktank.com>
2014-05-29 10:42:10 -07:00
Sage Weil
72fbff6f44 Merge pull request #1847 from ceph/wip-8259
README, Makefile: make install-deps easier

Reviewed-by: Loic Dachary <loic@dachary.org>
2014-05-29 10:40:39 -07:00
Sage Weil
e54f5e3ab8 Merge pull request #1860 from ceph/wip-filestore
osd: filestore backend improvements

Reviewed-by: Loic Dachary <loic@dachary.org>
2014-05-29 10:37:23 -07:00
Sage Weil
49ac0c0e2c Merge pull request #1864 from dachary/wip-filestore
unit tests for #1860
2014-05-29 10:26:17 -07:00
Loic Dachary
bc26a55566 Merge pull request #1879 from ceph/wip-8321
fix incompatible `Counter` usage on Python 2.6

Reviewed-by: Loic Dachary <loic@dachary.org>
2014-05-29 13:42:29 +02:00
John Wilkins
f153bc186e doc: Made additional changes s/CRUSH/Ceph for pull request #1855
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2014-05-28 17:49:21 -07:00
John Wilkins
cbd759872b Merge pull request #1855 from kazhang/patch-1
doc: Update architecture.rst:Calculating PG IDs
2014-05-28 17:46:05 -07:00
John Wilkins
1edb8821de Merge pull request #1866 from cmattson/radosgwdoc
doc: Improvements to radosgw docs
2014-05-28 17:33:32 -07:00
John Wilkins
dd85e2d639 Merge pull request #1881 from hsdhillon/master
doc: Fixes broken hyperlinks
2014-05-28 17:31:15 -07:00
Ross Turk
c08f48101e doc: alter doc CSS for the removal of Apex Sans
Signed-off-by: Ross Turk <rturk@redhat.com>
2014-05-28 22:55:01 +00:00
Ross Turk
7f46b7b5e0 doc: removed Apex Sans font, replace with font from GFE
Signed-off-by: Ross Turk <rturk@redhat.com>
2014-05-28 22:52:47 +00:00
Harpreet Dhillon
692f998914 doc: Fixes broken hyperlinks 2014-05-28 15:12:46 -07:00
Sage Weil
93a61dfca0 Makefile: make install-deps rule
This only works if autoconf is happy, but it's better than nothing.

Fixes: #8259
Signed-off-by: Sage Weil <sage@inktank.com>
2014-05-28 14:55:54 -07:00
Sage Weil
6fe7564254 debian: improve package dep list
This is based on the Build-Depends in debian/control.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-05-28 14:55:47 -07:00
Sage Weil
2fcdbf9c7f Merge pull request #1812 from ceph/wip-smart-df
mon: show writeable space in 'ceph df'

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-05-28 14:51:55 -07:00
Sage Weil
e06c58c9b8 mon: set min_size to data chunk count for erasure pools
Make the min_size value meaningful for erasure pools.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-05-28 13:59:47 -07:00
Sage Weil
7a9652b58e mon: include 'max avail' in df output
Include an estimate of the maximum writeable space for each pool.  Note
that this value is a conservative estimate for that pool based on the
most-full OSD.  It is also potentially misleading as it is the available
space if *all* new data were written to this pool; one cannot (generally)
add up the available space for all pools.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-05-28 13:57:40 -07:00
Sage Weil
2f63a309df mon: right justify df values
Signed-off-by: Sage Weil <sage@inktank.com>
2014-05-28 13:52:12 -07:00