Use fdupes to avoid duplicated files as done in the SUSE
packages. Since it doesn't work as expected on Fedora/RHEL
do this only on SUSE based distros.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix package Requirements to get sgdisk. On RHEL/CentOS/Fedora the
package is gdisk. On SUSE/openSUSE < 12.2 it's scsirastools on
openSUSE >= 12.2 it's in gptfdisk.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Back in commit 6339c5d439, we tried to make
this deal with a race between a faulting pipe and new messages being
queued. The sequence is
- fault starts on pipe
- fault drops pipe_lock to unregister the pipe
- user (objecter) queues new message on the con
- submit_message reopens a Pipe (due to this bug)
- the message managed to make it out over the wire
- fault finishes faulting, calls ms_reset
- user (objecter) closes the con
- user (objecter) resends everything
It appears as though the previous patch *meant* to drop *m on the floor in
this case, which is what this patch does. And that fixes the crash I am
hitting; see #4271.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Keep a big fat slow map in memory to ensure that client ops are applied to
objects in the order the clien sent them. This will make it easier to
catch ordering bugs due to requeuing as soon as they happen, when the logs
are easier to wade through, and not later when the client notices something
is awry.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
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>
Otherwise, we may feed an offset past the end of the journal to
check_header in read_entry and incorrectly determine that the entry is
corrupt.
Fixes: 4296
Backport: bobtail
Backport: argonaut
Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Samuel Just <sam.just@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>