os/filestore/FileStore.cc: In member function ‘int FileStore::_zero(const coll_t&, const ghobject_t&, uint64_t, size_t)’:
os/filestore/FileStore.cc:3294:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (offset + len > st.st_size) {
^
Signed-off-by: Sage Weil <sage@redhat.com>
os/filestore: require offset == length == 0 for full object read; add test
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Igor Fedotov <ifedotov@mirantis.com>
osd/ReplicatedPG: be more careful about calling publish_stats_to_osd()
Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
handle_osd_map now adds OSDMaps to the cache as it receives them
but before they are stable. Ensure that we don't try to use them.
Signed-off-by: Sage Weil <sage@redhat.com>
handle_osd_map and the PGs use different sequencers when writing
their updates. We therefore need to make sure new osdmaps are
committed to disk before we expose them to PGs, lest they update
their info to reference a new osdmap that hasn't actually
committed yet.
This doesn't happen with FileStore because transactions are
ordered when they are queued, but it does affect BlueStore.
Fix by splitting handle_osd_map into two phases, one that just
persists stuff, and the second half that publishes the new maps to
the rest of the OSD.
Fixes: #15073
Signed-off-by: Sage Weil <sage@redhat.com>
When change write mode of FileWrite(in _flush_range) from buffer to
direct. osd met segment fault.
This because call _close_writer don't check related ios whether
complete.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
there is chance that a connection gets reset, and the session attached
to a message that was sent over this connection is reset. i.e.
con->set_priv(NULL) in Monitor::ms_handle_reset(), but we are about to
handle_command() this message after the message is somehow requeued. so,
not all MonOpRequests have an attached Session, especially those are
re-dispatched. we could check conn->is_connected() everywhere, but
that's error-prone and hard to maintain. so, in this change:
* we need to check for the session before looking at it closer.
* hold a reference to it when holding it, because in another thread,
ms_handle_reset() could be freeing it.
Fixes: #15113
Signed-off-by: Kefu Chai <kchai@redhat.com>
When StupidAllocator searches for free extents, if hint is not 0(most times),
it will search extents starting from hint and up in each applicable bin,
if not found, then search all extents in those bins again.
If the extent to find(>= needs) exists below hint and is not in the choose_bin(),
let's say it's in the bin_X; then during this twice searches, all extents from
hint and up in bins before bin_X will be searched twice. This patch will eliminate
those unnecessary searches.
Signed-off-by: Jianjian Huo <samuel.huo@gmail.com>
This allows us to rip out the code for supporting the old
repop format. We can't actually reuse this bit until all
4 1<<46 bits are deprecated for one release.
Signed-off-by: Samuel Just <sjust@redhat.com>