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>
In commit dc0dfb9e01 the omap xattrs code
moved up a block and r was no longer local to the block. Translate
ENOENT -> 0 to compensate.
Fix the same error in _rmattrs().
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
fix mon double-free when dropping unhandled messages, and allow "get monmap" messages to go through without authenticating for MonCliente::get_monmap_privately()
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
If we return false because we aren't handling a message, we should not put
the ref. This fixes a double-free.
Signed-off-by: Sage Weil <sage@inktank.com>
Fix bug in compress() when compressing to less than .5 or original.
Make the argument have sane units (target size relative to current size;
not a precentage reduction).
Signed-off-by: Sage Weil <sage@inktank.com>
We need to compensate for the fact that there are fewer bits than there
used to be.
This is a crappy adjustment; it is non-linear. It's clone enough for now,
though.
Signed-off-by: Sage Weil <sage@inktank.com>
The RPM spec file currently lists `junit` as a dependency on all
platforms except recent versions of OpenSUSE. This is problematic
because `junit` refers to version 3.x, which doesn't satisfy the check
in the configure script:
configure: Cannot find junit4.jar (apt-get install junit4)
As a result, rpmbuild doesn't build `libcephfs-test.jar` and fails:
http://tracker.ceph.com/issues/6216
So let's depend on `junit4` in all cases. This package is provided by
all supported platforms (el6, fc17, fc18, fc19, opensuse12.2,
opensuse12, sles11), and my testing on CentOS 6 shows that rpmbuild
now succeeds and produces the expected `libcephfs_jni1` RPM.
Note that a bunch of stuff we thought would go in 0.70 is actually in 0.69,
so the update/release notes were adjusted accordingly.
Signed-off-by: Sage Weil <sage@inktank.com>
We were storing table_size_ and raw_table_size_, where one is the size in
bits and the other is the size in bytes. This is silly. Store only the
size in bytes.
Also, bytes are always 8 bits, so use bit shifts and drop some of that
silliness too.
Move the member declarations to the top of the class so you read them
before the methods.
Fix some annoying whitespace.
Avoid allocating a 0-length array.
Mark the encoding incompatible with v1.
Signed-off-by: Sage Weil <sage@inktank.com>
If fragtree is (*^1, 1*^1) and we want leaves under frag 000*.
get_leaves_under() return frag 0*, frag 10* and frag 11*. This is
obviously wrong.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
If client has outdated directory fragments information, it may request
readdir an non-existent directory fragment. In this case, the MDS finds
an approximate directory fragment and sends its contents back to the
client. When receiving a reply with fragment that is different than the
requested one, the client need to reset the 'readdir offset'.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>