We don't have a particularly tidy way to kick off ceph-create-keys from
sysvinit. So, do something simple, ugly, and functional: if we are
starting a mon, and it looks like a 'new' type that is in /var/lib/ceph,
then start ceph-create-keys too.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Performance tests on high-end machines have indicated the Linux autotuning
of the receive buffer sizes can cause throughput collapse. See bug
#2100, and this email discussion:
http://marc.info/?l=ceph-devel&m=133009796706284&w=2
Initially default to 0, which leaves us with the default. We may adjust
the default in the future.
Tested-by: Jim Schutt <jaschut@sandia.gov>
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Use static_cast<T>() instead of C-Style cast. Add some missing
includes to make the static_cast work.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix handling of realloc. If realloc() fails it returns NULL, assigning
the return value of realloc() directly to the pointer without checking
for the result will lead to a memory leak in error case.
Use a temporary pointer to hold the result of realloc(). In error case
return -ENOMEM, otherwise assign it to the pointer we want to realloc.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix sizeof handling for realloc/malloc of bucket->h.items. items are
of type __s32 and not __u32 (sizeof gives the same size, but fix it
to represent the correct type).
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Remove 'new_snaps' since it only used for a sizeof() call,
get the size directly from the data type of new_snaps instead.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Use static_cast<const T>() instead of C-Style cast. Change CInode* to
const, since it never changed.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
get_version(version_t,bufferlist) can only return one of two values:
-ENOENT iff the version doesn't exist
zero iff it was successful
Any other value is incorrect.
Fixes: #4281
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
We rely on min_last_complete_ondisk being accurate; as long as we have logs
from that point, the current replicas will be able to safely recovery via
their logs. Bump the target size, just as we do with degraded.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
This will make it easier to disable these for end users, and for platforms
with old libfuse versions that don't support them.
Signed-off-by: Sage Weil <sage@inktank.com>
And adjust version_t get(string,string) so that, in case of -ENOENT, it
returns 0 (when a key doesn't exist, assumes its value is zero), and make
sure it asserts in all other negative return values.
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>