| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Not done yet.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
|
|
|
|
|
|
| |
Use new lru_map::find_and_update() to update internal cache state.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
|
|
|
|
|
|
| |
A new find_and_update() call to make atomic changes.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
|
|
|
|
| |
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
|
|
|
|
|
|
| |
This means that we can have a 0 as a quota value.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
|
|
|
|
|
|
| |
Can set, disable and enable bucket quota.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
|
|
|
|
| |
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
|
|
|
|
| |
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
|
|
|
|
| |
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
|
|
|
|
|
|
| |
Now update the quota stats when completing specific operations.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
|
|
|
|
|
|
|
| |
In that case we only do it if it's not chunked upload (for which we
don't have the content length).
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
|
|
|
|
| |
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
|
|
|
|
|
|
| |
size is in kb
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
|
|
|
|
| |
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
|
|
|
|
| |
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
|
|
|
|
|
|
|
| |
Add bucket quota fields to various entities: regionmap (for global
configuration), user info, bucket info.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
|
|
|
|
| |
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
|
|
|
|
| |
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
|
|
|
|
| |
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
|
|\
| |
| |
| |
| | |
ErasureCode: minimum_to_decode unit tests and optimization
Reviewed-by: Sage Weil <sage@inktank.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The minimum_to_decode function simply returns the available chunks if no
recovery is necessary.
Add unit tests covering all minimum_to_decode situations:
* trying to read nothing
* read a chunk if none are available
* reading a subset of the available chunks
* read a missing chunk if there is less than k chunks available.
* reading when a chunk must be recovered
Signed-off-by: Loic Dachary <loic@dachary.org>
|
|\ \
| | |
| | | |
erasure code plugin test
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* TestErasureCodePluginExample.cc is renamed to TestErasureCodePlugin.cc
because it's not limited to the example which is really used to
support tests rather than being tested.
* Bugous plugins are added to exhibit failures and enable the unit tests
to check they are handled as expected
ErasureCodePluginFailToInitialize : the entry point returns != 0
ErasureCodePluginFailToRegister : the plugin registry is not updated
ErasureCodePluginMissingEntryPoint : the shared library has no entry
point
* It would be difficult to prove that the mutex protecting against
multiple loads actually does what it is expected to because of the
lack of thread introspection functions such as : tell me if this
thread is waiting on this mutex. A simpler approach is chosen : create
a thread that blocks forever when loading ( that's what the delay in
the example plugin is for ) and then check that the lock has indeed
been acquired. Since this mutex is merely about making sure that only
one thread at a time runs this sequence of code, it's probably enough.
Signed-off-by: Loic Dachary <loic@dachary.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The bool loading data member of ErasureCodePluginRegistry is
set to true when a plugin is being loaded, to provide an observable side
effect for test purposes.
Signed-off-by: Loic Dachary <loic@dachary.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* minimum_to_decode and minimum_to_decode_with_cost are replaced with
meaningfull examples instead of placeholders
* encode and decode are commented and hard coded constants are replaced
by defines for readability
* run against valgrind
Signed-off-by: Loic Dachary <loic@dachary.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Andreas-Joachim Peters suggests to reduce copies to the minimum. When
possible the output arguments will just point to the input
argument. This must be documented as any side effect on the input
argument may modify the output argument
* Fix typos
* Fix may/could/must/should to better reflect what's mandatory and
what's not.
* Reword the explanation of minimum_to_decode_with_cost to not suggest
an implementation. This will need to be revisited anyway, when the
semantic of the cost is defined.
* Explain chunk size constraints
Signed-off-by: Loic Dachary <loic@dachary.org>
|
|\ \ \
| | | |
| | | | |
erasure code example cleanup
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* minimum_to_decode and minimum_to_decode_with_cost are replaced with
meaningfull examples instead of placeholders
* encode and decode are commented and hard coded constants are replaced
by defines for readability
* run against valgrind
Signed-off-by: Loic Dachary <loic@dachary.org>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* Andreas-Joachim Peters suggests to reduce copies to the minimum. When
possible the output arguments will just point to the input
argument. This must be documented as any side effect on the input
argument may modify the output argument
* Fix typos
* Fix may/could/must/should to better reflect what's mandatory and
what's not.
* Reword the explanation of minimum_to_decode_with_cost to not suggest
an implementation. This will need to be revisited anyway, when the
semantic of the cost is defined.
* Explain chunk size constraints
Signed-off-by: Loic Dachary <loic@dachary.org>
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
code_env: use feature test for PR_GET_NAME support
Reviewed-by: Sage Weil <sage@inktank.com>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Function `get_process_name` has platform specific dependencies. Check
for Linux prctl function and correct command flag.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
automake: fixup am_common_flags to avoid re-definitions
Reviewed-by: Roald J. van Loon <roaldvanloon@gmail.com>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
| | |_|_|/
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
AM_COMMON_FLAGS included both CPP and C[XX] flags. This can cause
re-definition errors like this:
make[4]: Nothing to be done for `all-am'.
CXX cls/version/cls_version_client.o
<command-line>: warning: "__STDC_FORMAT_MACROS" redefined
because the macro definition appears in both AM_CXXFLAGS and
AM_CPPFLAGS.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Prevent copy_from against yourself, and fix issues with the testing framework around it
Reviewed-by: Greg Farnum <greg@inktank.com>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Fix the copy_from operation to not remove the objects from the in_use list
until after the entire operation is complete. In particular, the racing
read was completing and removing the dest oid from the in-use list before
the copy-from completed. This keeps the model in sync with what the OSD
is actually doing.
If another new read started up, it would grab the previous value from the
model and expect to see that, but would instead see the updated value.
Signed-off-by: Sage Weil <sage@inktank.com>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Signed-off-by: Sage Weil <sage@inktank.com>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
In particular, we need to allow all in-flight ops to be COPY_FROM.
Signed-off-by: Sage Weil <sage@inktank.com>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Signed-off-by: Sage Weil <sage@inktank.com>
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Return EINVAL if we try to COPY_FROM ourselves.
Signed-off-by: Sage Weil <sage@inktank.com>
|
|\ \ \ \ \ |
|
| |\ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
perfglue/heapprofiler: expect cmd name when handling command instead of 'heap <cmd>'
This was broken by the cli rework.
Reviewed-by: Samuel Just <sam.just@inktank.com>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Must have been forgotten during the cli rework.
Backport: dumpling
Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The heap profiler doesn't care, nor should it, what our command name is.
It only cares about the commands it handles.
Backport: dumpling
Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
We used to pass 'heap' as the first element of the cmd vector when
handling commands. We haven't been doing so for a while now, so we
needed to fix this.
Not expecting 'heap' also makes sense, considering that what we need to
know when we reach this function is what command we should handle, and
we should not care what the caller calls us when handling his business.
Fixes: #6361
Backport: dumpling
Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Fixes: #6293
Signed-off-by: Dan Mick <dan.mick@inktank.com>
(cherry picked from commit 16ebb25f7cdb8e92c618a333c505c16edb16c95c)
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Fixes: #6176
Backport: dumpling
We take different code paths in copy_obj, make sure we close the handle
when we exit the function. Move the call to finish_get_obj() out of
copy_obj_data() as we don't create the handle there, so that should
makes code less confusing and less prone to errors.
Also, note that RGWRados::get_obj() also calls finish_get_obj(). For
everything to work in concert we need to pass a pointer to the handle
and not the handle itself. Therefore we needed to also change the call
to copy_obj_data().
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
replace list::size() with map::size(), which should have
a constant time complexity.
Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This code was originally used in a token cache, now
as a generic infrastructure rename token fields.
Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
|