r was not being set in the loop.
CID 716936: Infinite loop (INFINITE_LOOP)
At (1): Top of the loop.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Order is never actually this high currently, but it be via librbd.
CID 716937: Overflowed return value (INTEGER_OVERFLOW)
At (3): Overflowed or truncated value (or a value computed from an
overflowed or truncated value) "offset" used as return value.
CID 717012: Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
At (1): Potentially overflowing expression "1 << obj_order" with type
"int" (32 bits, signed) is evaluated using 32-bit arithmetic before
being used in a context which expects an expression of type "uint64_t"
(64 bits, unsigned). To avoid overflow, cast the left operand to
"uint64_t" before performing the left shift.
CID 717011: Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
At (1): Potentially overflowing expression "1 << order" with type
"int" (32 bits, signed) is evaluated using 32-bit arithmetic before
being used in a context which expects an expression of type "uint64_t"
(64 bits, unsigned). To avoid overflow, cast the left operand to
"uint64_t" before performing the left shift.
CID 717013: Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
At (1): Potentially overflowing expression "1 << order" with type
"int" (32 bits, signed) is evaluated using 32-bit arithmetic before
being used in a context which expects an expression of type "uint64_t"
(64 bits, unsigned). To avoid overflow, cast the left operand to
"uint64_t" before performing the left shift.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
CID 717226: Uninitialized scalar field (UNINIT_CTOR)
At (2): Non-static class member "cookie" is not initialized in this
constructor nor in any functions that it calls.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
CID 717225: Uninitialized pointer field (UNINIT_CTOR)
At (2): Non-static class member "m_req" is not initialized in this
constructor nor in any functions that it calls.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
CID 717224: Uninitialized scalar field (UNINIT_CTOR)
At (26): Non-static class member field "header.snaps" is not
initialized in this constructor nor in any functions that it calls.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
CID 717222: Uninitialized pointer field (UNINIT_CTOR)
At (16): Non-static class member "m_hide_enoent" is not initialized
in this constructor nor in any functions that it calls.
CID 717223: Uninitialized scalar field (UNINIT_CTOR)
At (4): Non-static class member "m_has_parent" is not initialized in
this constructor nor in any functions that it calls.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
CID 717220: Uninitialized pointer field (UNINIT_CTOR)
At (4): Non-static class member "aio_type" is not initialized in this
constructor nor in any functions that it calls.
CID 717221: Uninitialized pointer field (UNINIT_CTOR)
At (2): Non-static class member "m_req" is not initialized in this
constructor nor in any functions that it calls.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Use an assert version op in combination with our watch, and re-read
the header until it's not stale. Header updates are infrequent, so
this should not cause any delay with normal use.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
The README provides a list of packages needed to successfully
configure ceph. uuid-dev and libatomic-ops-dev are missing from
the list.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
We want to avoid a race like:
- entry() starts, populates pfd with listen_sd, gets past !done check
- stop() does shutdown + close on listen_sd
- someone else opens a new fd
- entry() thread calls poll(2) on wrong sd
- stop() calls join, waits forever for entry thread
Signed-off-by: Sage Weil <sage@inktank.com>
Should just return true. This way we don't need higher level
functions to be aware of system buckets. Also, don't use
marker.empty() to test for system bucket, use bucket_is_system().
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
The previous fix (0f7c516f3e) breaks osd startup with -k. This one
from dmick just tells the ceph-mon which keyring to use through the
command line rather than moving the keyring path to the [global]
section of the config file.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
When handling master request with slaves, the mds could crash
after receiving all slaves' commit acknowledgement, but before
journalling the ECommitted. Current MDS recovery code does not
handle this case correctly, the request will be left in
LogSegment's uncommitted_masters after recovery is finished.
It prevents LogSegment from being trimmed. The fix is find and
clean up request of this kind when recovery enters rejoin stage.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Signed-off-by: Sage Weil <sage@inktank.com>
Defines the macro CEPH_INO_DOTDOT (to 3) and uses it as the top-level
parent directory (..) inode number. The value of 2 is already taken
by the .ceph hidden directory.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
In the lowlevel fuse api, the current (.) and parent (..) entries
must be added manually in a readdir call. For the root directory
the parent is not a ceph inode, so we give it a fake inode value
(2) and intercept that inode on a getattr.
Fixes: #1957
Signed-off-by: Sam Lang <sam.lang@inktank.com>