| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Switches the implemetnation of smart pointers and unordered map/set to
use the ceph:: versions.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
hobjects
Add ghobject_t to hboject.h header
Add constants NO_SHARD/NO_GEN and change gen_t/shard_t
Convert other headers from hobject_t to ghobject_t
Mostly straight hobject_t to ghobject_t for src/os cc files
Fix tools and tests and enable ceph-dencoder
Add filename generation and parsing including unittest addition
Get ceph-filestore-dump to build
Add gen/shard to DBObjectMap::ghobject_key() and update test case
Add CEPH_FS_FEATURE_INCOMPAT_SHARDS new FileStore feature
Add CEPH_OSD_FEATURE_INCOMPAT_SHARDS new osd feature
Fixes: #5862
Signed-off-by: David Zafman <david.zafman@inktank.com>
|
|
|
|
|
|
|
|
|
| |
A replay of an in progress merge or split might make
our counts unreliable.
Fixes: #5723
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add rados_ioctx_namespace_set_key() and librados::IoCtx::namespace_set_key()
Add namespace to admin-daemon operations
Support namespace in osd map command
Add namespace to object_locator_t and hobject_t
Add random namespaces to psim program
Feature: #4982 (OSD: namespaces pt 1 (librados/osd, not caps))
Signed-off-by: David Zafman <david.zafman@inktank.com>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Otherwise, the links might be ordered after the in progress
operation tag write. We need the in progress operation tag to
correctly recover from an interrupted merge, split, or col_split.
Fixes: #5180
Backport: cuttlefish, bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
|
|/
|
|
| |
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|
|
|
|
|
|
|
|
| |
Create helpers in hobject for generating prefixes for a
pg as well as matching hobjects against a pgid/numpgs
combo. Use these in HashIndex.cc.
Signed-off-by: Samuel Just <sam.just@inktank.com>
|
|
|
|
|
|
|
| |
Backport: bobtail
Fixes: #4379
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
|
|
|
|
|
|
|
|
| |
Use empty() since it should be prefered as it has, following the
standard, a constant time complexity regardless of the containter
type. The same is not guaranteed for size().
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|
|\
| |
| |
| | |
Reviewed-by: Greg Farnum <greg@inktank.com>
|
| |
| |
| |
| | |
Signed-off-by: Samuel Just <sam.just@inktank.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If an unlink is interupted between removing the file
and updating the subdir attribute, the attribute will
overestimate the number of files in the directory. This
is by design, at worst we will merge the collection later
than intended, but closing the gap would require a second
subdir xattr update. However, this can in extreme cases
result in a collection with subdirectories but no objects.
FileStore::_destry_collection would therefore see an
erroneous -ENOTEMPTY.
prep_delete allows the CollectionIndex implementation to
clean up state prior to removal.
Signed-off-by: Samuel Just <sam.just@inktank.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Several pieces of HashIndex involve multi-step operations
which are sensitive to OSD crashes. This patch introduces
failure injection to force retries from various points in
the LFNIndex helper methods to be used with store_test.cc.
Signed-off-by: Samuel Just <sam.just@inktank.com>
|
| |
| |
| |
| | |
Signed-off-by: Samuel Just <sam.just@inktank.com>
|
|/
|
|
|
|
|
|
|
|
|
|
| |
get_path_str() should not handle hobject_t::get_max(). get_path_str()
now asserts that the passed object is not max and the callers now check
for is_max(). This caused HashIndex.cc to incorrectly scan an entire
collection before returning no objects rather than scanning the top
level and returning no objects. It did not actually list_by_hash to
return an incorrect answer, however.
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Multimap does not make any guarantees about ordering of different
values with the same key. list_by_hash, however, assumes that
the iterator order matches hobject_t order. Thus, we use
set<pair<string, hobject_t> > to get the proper ordering.
Backport: stable
Signed-off-by: Samuel Just <sam.just@inktank.com>
|
|
|
|
|
|
|
|
|
| |
From this point, hobjects in the ObjectStore will be globally unique. This
will allow us to avoid including the collection in the ObjectMap key encoding
and thereby enable efficient collection renames and, eventually, collection
splits.
Signed-off-by: Samuel Just <sam.just@inktank.com>
|
|
|
|
|
|
|
|
|
| |
- explicitly defined subsystems, and ceph_subsys_FOO enums to go with them
- modular log system with Entry object
- separate gather level and log level
- drop lots of DoutStreambuf hackery
Signed-off-by: Sage Weil <sage@newdream.net>
|
|
|
|
| |
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
|
|
|
|
|
|
|
|
|
|
| |
We can scan starting from last_backfill to avoid rescanning portions
of the collection recovered by normal recovery. collection_list_partial
now includes begin if present. next will be <= the next object in the
collection. This way we can scan starting at last_backfill without
skipping last_backfill.
Signed-off-by: Samuel Just <rexludorum@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This means we should set it to a hash boundary or the last item of our
result set (not the next item we didn't include).
It means that during backfill we can set our last_backfill to the last
object we did recover and be sure that any new files locally will be
included in the next result set, and we can bound that result set by that
last object recovered and not include it in the resulting range.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
|
|
|
|
|
|
|
| |
No need for the old collection_list_partial instance: it's cleaner to
just use an hobject_t as the collection list handle.
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
|
|
|
|
|
|
| |
So we can return 0x100000000 when max=true.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
|
|
|
|
| |
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
|
|
|
|
| |
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This was accidentally left out of the must_split calculation. Put it
in, and rename it to split_multiplier (as that is a much better name
for how it's used).
In the default case this won't actually change behavior, but it
makes the behavior configurable as it's supposed to be.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
|
|
|
|
| |
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
|
|
|
|
|
|
|
|
| |
Previously, we stored the collection_list handle as an opaque
uint64_t. Now, collection_list_handle_t is a struct defined
in types.h.
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
|
|
Adds ColletionIndex, an interface for collection indexing
systems, and HashIndex, a mechanism for organising a prehashed
collection.
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
|