This causes build failure in latest fedora builds, ceph_test_librbd_fsx adds -Wno-format cflag but the default AM_CFLAGS already contain -Werror=format-security, in previous releases, this was tolerated but in the latest fedora rawhide it no longer is, ceph_test_librbd_fsx builds fine without -Wno-format on x86_64 so there is likely no need for the flag anymore
Signed-off-by: Boris Ranto <branto@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Otherwise, an objecter callback might still be hanging
onto this reference until after the flush.
Fixes: #8894
Introduced: 589b639af7
Signed-off-by: Samuel Just <sam.just@inktank.com>
Remove the two old Wireshark plugins. They do not build and are
superseded by the dissector which is inside Wireshark.
Signed-Off-By: Kevin Cox <kevincox@kevincox.ca>
Often there will be a CRUSH rule present for erasure coding that uses the
new CRUSH steps or indep mode. If these rules are not referenced by any
pool, we do not need clients to support the mapping behavior. This is true
because the encoding has not changed; only the expected CRUSH output.
Fixes: #8963
Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>
Add methods to check if a *specific* rule uses v2 or v3 features. Refactor
the existing checks to use these.
Signed-off-by: Sage Weil <sage@redhat.com>
If the remap vector is not empty, use it to figure out the sequence of
data chunks.
http://tracker.ceph.com/issues/9025Fixes: #9025
Signed-off-by: Loic Dachary <loic@dachary.org>
Each D letter is a data chunk. For instance:
_DDD_DDD
is going to parse into:
[ 1, 2, 3, 5, 6, 7 ]
the 0 and 4 positions are not used by chunks and do not show in the
mapping. Implement ErasureCode::parse to support a reasonable default
for the mapping parameter.
Signed-off-by: Loic Dachary <loic@dachary.org>
Add support for erasure code plugins that do not sequentially map the
chunks encoded to the corresponding index. This is mostly transparent to
the caller, except when it comes to retrieving the data chunks when
reading. For this purpose there needs to be a remapping function so the
caller has a way to figure out which chunks actually contain the data
and reorder them.
Signed-off-by: Loic Dachary <loic@dachary.org>
While calling index->collection_version, there is no need to
hold WLock at the index level. RLock should be sufficient.
Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
In lfn_open() there is no point of building the Index if the
cache lookup is successful and caller is not asking for Index.
Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
IndexManager now has a Index caching. Index will only be created if not
found in the cache. Earlier, each op is creating an Index object and other
ops requesting the same index needed to wait till previous op is done.
Also, after finishing lookup, this Index object was destroyed.
Now, a Index cache is been implemented to persists these Indexes since
there is a major performance hit because each op is creating and destroying
these. A RWlock is been introduced in the CollectionIndex class and that is
responsible for sync between lookup and create.
Also, since these Index objects are persistent there is no need to use
smart pointers. So, Index is a wrapper class of CollecIndex* now.
It is the responsibility of the users of Index now to lock explicitely
before using them. Index object is sufficient now for locking and no need
to hold IndexPath for locking. The function interfaces of lfn_open,lfn_find
are changed accordingly.
Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
With the changes to the shared_cache, we no longer need the fdcache_lock
to prevent us from inserting a second fd for the same hobject into the cache.
Signed-off-by: Greg Farnum <greg@inktank.com>
Merged conflict fixed.
Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
Conflicts:
src/os/FileStore.cc
This is just a basic sharding. A more sophisticated implementation would
rely on something other than luck for keeping the distribution equitable.
The minimum FDCache shard size is 1.
Signed-off-by: Greg Farnum <greg@inktank.com>
Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
The LRU now handles you attempting to insert multiple values for the
same key, by telling you that you've done so and returning the
existing value before it manages to muck up existing data.
The param 'existed' is not mandatory, default value is NULL.
Signed-off-by: Greg Farnum <greg@inktank.com>
Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
Description: Currently setmaxosd command allows removal of OSDs by providing
a number less than current max OSD number. This causes abrupt removal of
OSDs causing data loss as well as kernel panic when kernel RBDs are involved.
Fix is to avoid removal of OSDs if any of the OSDs in the range between
current max OSD number and new max OSD number is part of the cluster.
Fixes: #8865
Signed-off-by: Anand Bhat <anand.bhat@sandisk.com>
The monitor does a create_anon_connection() to create a pseudo Connection
object for forwarded messages. If we try to call mark_down or similar
on one of these we should silently ignore the operation, not crash.
If we try to send a message, still crash (explicitly assert); the caller
should probably know better.
Fixes: #9062
Signed-off-by: Sage Weil <sage@redhat.com>
Back in 8f7900a09c we added the new fields
before the 'extended' section, which made the encoding incompatible.
Instead, add them at the end--old clients don't care whether the enabled
flag is set or what the 'fs name' is.
Fixes: #8725
Signed-off-by: Sage Weil <sage@redhat.com>
This keeps the old-version special cases in one place and make it obvious
what the current/forward-looking path is.
Signed-off-by: Sage Weil <sage@redhat.com>