Move the PoolAsyncCompletionImpl reference drop from
C_PoolAsync_Safe::finish() to ~C_PoolAsyncSafe(), as finish() is only
called when the async request is actually sent.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
If the OSD operations returns 0, these are unnecessary. If it does not,
then these are misleading. In both cases here, the OSD sets the result to
zero, so this has no client-visible change.r
Signed-off-by: Sage Weil <sage@inktank.com>
The normal Objecter handlers set *prval for each operation; we only need to
(re)set it if we have a special reason (like a decoding error).
Signed-off-by: Sage Weil <sage@inktank.com>
We should start doing this across the whole 'prepare_command' function.
Makes it prettier to the reader, and easier to add new code.
Change the command to send a string instead of an int to allow us to have
non-integer pool paramters that can be modified. Support input json with
both int and string values so that we work with all flavors of client.
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
The filer implementation does not delete stripe objects that are truncated
to zero. When purging a deleted file, we need to purge stripe objects up to
the max size the file has ever been.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
We only allow it if --quota-scope=bucket is specified. This is done in
order to avoid confusion with the future user level quota command.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Add bucket quota threshold so that when we're passed that value we
reread the bucket stats before every write and not rely on cached value.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Leverage the cache lru_map locking for making sure that we don't end
up with more than a single concurrent async update on the same bucket
within the same update window.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
make MDCache::populate_mydir() only fetch bare-bone stray dirs.
After all stray dirs are populated, call MDCache::scan_stray_dir(),
it fetches incomplete stray dirs.
Fixes: #4405
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Although fsstress was being called with a static path the directory
it was writing to was in the current directory so doing a cd to the
source directory that is made in /tmp and then removing it later
caused it to be unable to write the files in a non-existent dir.
This change gets the current path first and cd's back into it after
it is done compiling fsstress.
Issue #6479.
Signed-off-by: Sandon Van Ness <sandon@inktank.com>
Reviewed-by: Alfredo Deza <alfredo.deza@inktank.com>
Although fsstress was being called with a static path the directory
it was writing to was in the current directory so doing a cd to the
source directory that is made in /tmp and then removing it later
caused it to be unable to write the files in a non-existent dir.
This change gets the current path first and cd's back into it after
it is done compiling fsstress.
Issue #6479.
Signed-off-by: Sandon Van Ness <sandon@inktank.com>
Reviewed-by: Alfredo Deza <alfredo.deza@inktank.com>
This cannot work because client.volumes.key is not a command
ssh {your-compute-host} client.volumes.key
replace with a tee to allow for copy/paste as well as using the
cat client.volumes.key
in the following lines.
Signed-off-by: Loic Dachary <loic@dachary.org>
For encoding/decoding test purposes. The generate_test_instances should
be improved to cover more encoding/decoding cases.
Signed-off-by: Loic Dachary <loic@dachary.org>
It appears that the OSD is not filling in the individual return codes, and they
should be equivalent for all purposes we care about here (the only Op we are
doing is the copy-get, and if it fails we are getting its failure code).
Reported-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>