Kernel ABI:
A discard_granularity of 0 means
that the device does not support discard functionality.
Also discard_granularity is RO attribute, while rotational are RW.
That means what rotational can be overridden in user space if needed.
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
And then Clang complains:
```
/home/jenkins/workspace/ceph-master/src/common/blkdev.cc:700:13: error: out-of-line definition of 'serial' does not match any declaration in 'Bl
kDev'
int BlkDev::serial(char *serial, size_t max)
^~~~~~
/home/jenkins/workspace/ceph-master/src/common/blkdev.h:50:7: note: member declaration does not match because it is const qualified
int serial(char *serial, size_t max) const;
^ ~~~~~
1 error generated.
```
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
Some of the tests were importing the wrong HttpClient Module and that was
causing random errors.
Fixes: https://tracker.ceph.com/issues/36528
Signed-off-by: Tiago Melo <tmelo@suse.com>
For multiple inputs, we want to avoid a situation like:
```
$ ceph osd safe-to-destroy 0 1 2
Error EBUSY: OSD(s) 1,2 have 96 pgs currently mapped to them
$ ceph osd safe-to-destroy 0
Error EBUSY: OSD(s) 0 last reported they still store some PG data, and not all PGs are active+clean; we cannot be sure they aren't still needed.
```
The first command seems to be implying osd.0 is safe-to-destroy whereas it isn't.
This patch instead gives a complete report of each osd if multiple osds are specified.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
mgr/dashboard: Fix problem with ErasureCodeProfileService
Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
When a cache tier promotes an object with one or more error PG log
entries, these errors need to be propagated and recorded for dup
op detection.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
If the base tier records an error against an operation, the cache
tier currently might incorrectly respond with a success return code.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
A B
SharedBlobSet::lookup()
takes lock
nref is not 0
SharedBlob::put()
--nref
returns SharedBlobRef,
++nref
takes cache lock
SharedBlobSet::remove
takes lock
removes
deletes SharedBlob
-> A ends up with a ref to deleted SharedBlob
Fix by verifying that nref is still zero in SharedBlobSet::remove(),
while we are holding the SharedBlobSet::lock. The lock ensures that we
have increased the ref for the lookup before entering remove, so we can
verify that nref is still zero before removing it. If not, we have
raced, and put() bails out and does nothing.
Fixes: http://tracker.ceph.com/issues/36526
Signed-off-by: Sage Weil <sage@redhat.com>
After the recent logging rework, ManyGatherLog and
ManyGatherLogStringAssign are identical barring the string.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Unlike ConcreteEntry, MutableEntry can be appended to. Reserving the
exact number of elements before every append is harmful: vector will
likely reallocate each time and grow linearly instead of geometrically.
This results in quadratic behaviour when we spill past the preallocated
capacity and doesn't benefit the fast path in any way.
The new test case takes half a second with this patch and many hours
spinning in memmove without this patch.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
we pack the asset() params for smaller code size, but this creates a
inlined `assert_data_ctx` instance for every compilation unit which
call ceph_assert() defined in .h .
__PRETTY_FUNCTION__ is likely to be referenced by `assert_data_ctx`
sections which are included by different compiled object files. if the
ceph_assert() call is used by header file, then there will be multiple
`assert_data_ctx` sections sharing the same identifier. these sections are
defined as "COMDAT" group sections, i.e. common data sections. when linker
see multiple COMDAT sections with the same identifer, it will simply discard
the duplicated ones, and only keep a single copy of them. without enabling
ASan, GCC can always handle this problem just fine. but the dedup feature
does not work well with ASan. if ASan is enabled, and we link the objects
with the wrong order, some references will be pointing to the discarded
sections.
to address this issue, we could audit the link command line and inspect
all .o files to make sure they are properly ordered. but this is
non-trivial. as a workaround, in this change, the assert params are not
packed, and sent to the __ceph_assert_fail() overrides which accepts
unpacked params directly, so the COMDAT section is not created.
Signed-off-by: Kefu Chai <kchai@redhat.com>
If there is a workunit task associated with the same client, the two
tasks will attempt to clone the suite repo to the same directory.
Worse, if it's parallel tasks, the two clones will clobber each
other.
Fixes: http://tracker.ceph.com/issues/36542
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
- rename from foo to bar
- foo onode is moved to bar in onode_map
- keys removed at position foo as part of txc
- new onode for foo is installed at foo in map
...
- cache trims foo
...
- new txn B does get_onode on foo, reads old foo (now bar) onode into foo ***
- txn A commits
-> onode cache has foo with stale bar content
Fix by holding a ref to the replacement foo onode so that get_onode cannot
read stale metadata out of kvdb before txn A commits.
Fixes: http://tracker.ceph.com/issues/36541
Signed-off-by: Sage Weil <sage@redhat.com>
ErasureCodeProfileService was being provided twice and that was causing
problems in production mode.
Fixes: https://tracker.ceph.com/issues/36544
Signed-off-by: Tiago Melo <tmelo@suse.com>