librbd now defaults to write-through until the first flush
is received. For rbd, force the use of write-through.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
In-flight cache reads were not previously counted against
new cache read requests, which could result in very large
cache usage. This effect is most noticeable when writing
small chunks to a cloned image since each write requires
a full object read from the parent.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Otherwise it is not found and the real cause obscured by the test
setup. The thread returns immediately and the timeout test sometime
fails.
http://tracker.ceph.com/issues/9368Fixes: #9368
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
Github shows up a `guidelines for contributing` while opening a new pull
request for any repository with a CONTRIBUTING file at the repo
root, which allows for a quick overview to contribute to the
repository.
Currently this file just links to the Submitting Patches and the
documentation start guide.
Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
This workunit will be used by tests as a placeholder that always return
true. This is helpful in tests when a script from the qa/workunits
directory is mandatory but we do not care about testing anything. For
an example of how it can be used, check
https://github.com/ceph/ceph-qa-suite/pull/120
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
These two functions should be protected by the Journal::mutex. Furthermore,
wait_for_readable() is racy. The journal may have already become readable
when it is called.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Add a list to Locker to track revoking caps. print a warning message if client does not
release caps within the given time.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
S3 API supports getting the location for a bucket, which gives out one
of those geographic zones (US-WEST-1, EU for eg). Also it returns an
empty string for the default region.
(http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlocation.html)
Since LocationConstraint corresponds to regions in our case, this API
returns the region, for the "default" region empty string is returned
Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@ril.com>
Adding basic unit test to test the new formatter class'
dump_format_ns. Since the functionality only affects XML (and other
implementations mimic dump_format exactly), tests are added for these.
`fmt.close_section()` is avoided in the tests as this calls an
assert (and there is no section to close) and this triggers a test
failure.
Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@ril.com>
Since the base formatter was extended with a dump_format_ns class,
implementing this here. For now, this is exactly same as dump_format, as
the concept of ns in json is not used.
Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@ril.com>
`dump_format_ns` is a generic formatter to dump a simple format along
with a namespace. It is `dump_format` with an optional ns. This also
extends the XML formatter with this functionality. This allows creation
of xml tags with ns and a specified format. The JSON Format doesn't
define a ns, and here the functionality is exactly same as that of
`dump_format`
Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@ril.com>
When standby-replay MDS detects a log segment is expired, it should check
the expired segment's dirty lists and clear corresponding objects' dirty
bits. Otherwise these objects will be pinned in the standby-replay MDS's
cache forever.
Fixes: #8648
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Fix for:
CID 1232602 (#1 of 1): Division or modulo by zero (DIVIDE_BY_ZERO)
divide_by_zero: In expression num_pg_copies / num_osds, division
by expression num_osds which may be zero has undefined behavior.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CID 1232603 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
overflow_before_widen: Potentially overflowing expression
objs_per_folder * folders_range(rng) with type int (32 bits,
signed) is evaluated using 32-bit arithmetic before being
used in a context which expects an expression of type
uint64_t (64 bits, unsigned). To avoid overflow, cast
either operand to uint64_t before performing the multiplication.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CID 1232604 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
overflow_before_widen: Potentially overflowing expression
(unsigned int)abs(this->merge_threshold) * 16U * this->split_multiplier
with type unsigned int (32 bits, unsigned) is evaluated using 32-bit
arithmetic before being used in a context which expects an expression of
type uint64_t const (64 bits, unsigned). To avoid overflow, cast either
operand to uint64_t const before performing the multiplication.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>