Much like the CRUSH tunables, this first appears in kernel v3.9.
Unlike the CRUSH tunables, it does not appear in Ceph until v0.64
(post cuttlefish, pre dumpling).
Signed-off-by: Sage Weil <sage@inktank.com>
68fdcfa1cc249af859400a2ce4590fefbb2f525b changed the ObjectStore
interface in the 'next' branch, which was merged into master by
e5a02c33e23e4fbdc7bf0f16a5bbff61f4e37186. Unfortunately the
Memstore (added via the master branch) was not corrected for this
interface change.
Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
Replace
Ceph distributed file system
with
Ceph distributed storage system
to help reduce the idea that Ceph is just a file system.
Signed-off-by: Loic Dachary <loic@dachary.org>
We can easily deadlock if we put this in the Finisher thread behind other
work; do it synchronously!
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Support the presence of ITEM_NONE device numbers in the indep mapping as
proof of a bad mapping. Implement the associated unit tests.
Signed-off-by: Loic Dachary <loic@dachary.org>
The leader now checks to see if any monitors did not provide their
command set, and if so, shares the list of "classic" commands instead
of his own set. This will prevent users from seeing different commands
(depending on whether they connect to an old or new mon) while
performing upgrades, and will make it really obvious if they forgot
to upgrade one of the monitors!
Signed-off-by: Greg Farnum <greg@inktank.com>
We're about to use this at a basic level, to identify when we have
"classic" monitors in-quorum, but could also do something more
sophisticated like a set intersection on the commands.
Signed-off-by: Greg Farnum <greg@inktank.com>
If the Elector doesn't receive a set of commands from the elected leader, it
assumes the monitor is "classic" and uses the Dumpling command set as
the leader set.
Signed-off-by: Greg Farnum <greg@inktank.com>
If we're the leader, just point to our local set. Disseminating these
will let peons advertise the full command set supported by the leader.
INCOMPLETE: does not yet handle winning Electors who do not send a command set.
Signed-off-by: Greg Farnum <greg@inktank.com>
We want to be able to validate commands against both the leader and
local command sets, so make that functionality generic.
Signed-off-by: Greg Farnum <greg@inktank.com>
--show-utilization* outputs only if --show-statistics is set, which is
confusing. Instead of failing, set --show-statistics to avoid the
confusion.
Signed-off-by: Loic Dachary <loic@dachary.org>
We want to actually encode each element and keep it, rather than
writing each one at the position after the array end!
Signed-off-by: Greg Farnum <greg@inktank.com>
CrushWrapper::start_choose_profile allocates map->choose_tries with
choose_total_tries elements. When crush_choose_firstn sets a value, it
tests against map->choose_local_tries which could lead to memory
corruption if map->choose_total_tries is smaller than
map->choose_local_tries.
Another indesirable but non fatal side effect is that the output crushtool
--show-choose-tries will be truncated to choose_local_tries which is
set to a lower value than choose_total_tries by the default tuneables.
Signed-off-by: Loic Dachary <loic@dachary.org>
A howmany macro exists on some platforms in standard headers, but there
really isn't any sort of standard that I've found. We just avoid the
conflict entirely this way.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Checking for fdatasync uses the same approach as the qemu configure
script. The relevant commit is d1722a27f552a22561104210e0afad4577878e53.
Here is a copy of the commit message which explains the check:
Under Darwin, a symbol exists for the fdatasync() function, so that our
link test succeeds. However _POSIX_SYNCHRONIZED_IO is set to '-1'.
According to POSIX:2008, a value of -1 means the feature is not
supported.
A value of 0 means supported at compilation time, and a value greater 0
means supported at both compilation and run time.
Enable fdatasync() only if _POSIX_SYNCHRONIZED_IO is '>0'.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>