Commit Graph

142706 Commits

Author SHA1 Message Date
Ilya Dryomov
2ab5b52f71 common/bit_vector: fix IteratorImpl post-increment operator
It's totally broken: instead of returning the current position and
moving to the next position, it returns the next position and doesn't
move anywhere.  Luckily it hasn't been used until now.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-01-20 16:06:54 +01:00
Ilya Dryomov
1503b96bf9 librbd: drop DiffIterate::diff_object_map() declaration
This is a leftover from commit 2b3a46801d39 ("librbd: switch
diff-iterate API to use new object-map diff helper").

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-01-20 16:06:54 +01:00
Ilya Dryomov
7677d4b1b5 librbd: propagate diff-iterate range to parent in fast-diff mode
When getting parent diff, pass the overlap-reduced image extent instead
of the entire 0..overlap range to avoid a similar quadratic slowdown on
cloned images.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-01-20 16:06:54 +01:00
Ilya Dryomov
0b5ba5fedf librbd/object_map: add support for ranged diff-iterate
Currently diff-iterate in fast-diff mode is performed on the entire
image no matter what image extent is passed to the API.  Then, unused
diff just gets discarded as DiffIterate ends up querying only objects
that the passed image extent maps to.  This hasn't been an issue for
internal consumers ("rbd du", "rbd diff", etc) because they work on the
entire image, but turns out to lead to quadratic slowdown in some QEMU
use cases.

0..UINT64_MAX range is carved out for deep-copy which is unranged by
definition.  To get effectively unranged diff-iterate, 0..UINT64_MAX-1
range can be used.

Fixes: https://tracker.ceph.com/issues/63341
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-01-20 16:06:53 +01:00
Ilya Dryomov
94bf3a5d74 include/intarith: introduce round_down_to()
Same as with round_up_to(), d isn't required to be a power of two.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-01-20 16:06:53 +01:00
Ilya Dryomov
9931282bfd test/librbd: expand TestMockObjectMapDiffRequest edge case coverage
For each covered edge case or error, run through the following
scenarios:

- where the edge case concerns snap_id_start
- where the edge case concerns snap_id_end
- where the edge case concerns intermediate snapshot and
  snap_id_start == 0 (diff against the beginning of time)
- where the edge case concerns intermediate snapshot and
  snap_id_start != 0 (diff from snapshot)

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-01-20 16:06:53 +01:00
Ilya Dryomov
23c675f04a librbd/object_map: allow intermediate snaps to be skipped on diff-iterate
In case of diff-iterate against the beginning of time, the result
depends only on the end version.  Loading and processing object maps
or intermediate snapshots is redundant and can be skipped.

This optimization is made possible by commit be507aaed15f ("librbd:
diff-iterate shouldn't ever report "new hole" against a hole") and, to
a lesser extent, the previous commit.

Getting FastDiffInvalid, LoadObjectMapError and ObjectMapTooSmall to
pass required tweaking not just expectations, but also start/end snap
ids and thus also the meaning of these tests.  This is addressed in the
next commit.

Fixes: https://tracker.ceph.com/issues/63341
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-01-20 16:06:53 +01:00
Ilya Dryomov
19c7c4a535 librbd/object_map: resurrect diff-iterate behavior when image is shrunk
The new "track the largest of all versions in the set, diff state is
only ever grown" semantics introduced in commit 330f2a7bb9 ("librbd:
helper state machine for computing diffs between object-maps") don't
make sense for diff-iterate.  It's a waste because DiffIterate won't
query beyond the end version size -- this is baked into the API.

Limit this behavior to deep-copy and resurrect the original behavior
from 2015 for diff-iterate.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-01-20 16:06:53 +01:00
Ilya Dryomov
34386d29a8 librbd/object_map: fix diff from snapshot when image is grown
Commit 399a45e113 ("librbd/object_map: rbd diff between two
snapshots lists entire image content") fixed most of the damage caused
by commit b81cd2460d ("librbd/object_map: diff state machine should
track object existence"), but the case of a "resize diff" when diffing
from snapshot was missed.  An area that was freshly allocated in image
resize is the same in principle as a freshly created image and objects
marked OBJECT_EXISTS_CLEAN are no exception.  Diff for such objects in
such an area should be set to DIFF_STATE_DATA_UPDATED, however
currently when diffing from snapshot, it's set to DIFF_STATE_DATA.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-01-20 16:06:53 +01:00
Ilya Dryomov
4e036d65b9 librbd/object_map: drop bogus if in handle_load_object_map()
It became redundant with commit b81cd2460d ("librbd/object_map: diff
state machine should track object existence") -- it != end_it condition
in the loop is sufficient.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-01-20 16:06:53 +01:00
Ilya Dryomov
718f6b5546 test/librbd: refactor TestMockObjectMapDiffRequest tests
In preparation for multiple similarly configured MockTestImageCtx
objects being used in a single test, centralize their creation and add
a couple of helpers for setting expectations from a callback.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-01-20 16:06:53 +01:00
Ilya Dryomov
64a5afcaad test/librbd: improve TestMockObjectMapDiffRequest.InvalidStartSnap
Use a range where only snap_id_start is invalid.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-01-20 16:06:53 +01:00
zdover23
010b1fb4e7
Merge pull request #55177 from zdover23/wip-doc-2024-01-15-radosgw-admin-get-bucket-rate-limit
doc/radosgw: edit admin.rst "Get Bucket Rate Limit"

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
2024-01-20 17:34:44 +10:00
Zac Dover
7c4fdd3762 doc/radosgw: edit admin.rst "Get Bucket Rate Limit"
Edit "Get Bucket Rate Limit" in doc/radosgw/admin.rst.

Co-authored-by: Anthony D'Atri <anthony.datri@gmail.com>
Signed-off-by: Zac Dover <zac.dover@proton.me>
2024-01-20 16:55:56 +10:00
Samuel Just
b6436f47e8 crimson/osd/ops_executor: simplify prepare_clone, use set_clone_state
- Remove static_snap_oi name -- left over from old classic implementation,
  misleading.
- OpsExecutor::prepare_clone can only be invoked on a primary, remove
  the branch.
- Create the obs directly and pass to obc via set_clone_state, which
  sets fully_loaded.

Signed-off-by: Samuel Just <sjust@redhat.com>
2024-01-19 17:42:09 -08:00
Samuel Just
83d535cd27 crimson/osd: invalidate contents of obc_registry on interval_change
We can't guarantee that all continuations will complete before on_flush,
so we unhook and invalidate all live obcs from the registry upon
interval_change.  As long as any lingering continuations simply note the
interval change and terminate, this should be safe.

Signed-off-by: Samuel Just <sjust@redhat.com>
2024-01-19 17:42:06 -08:00
Venky Shankar
d7e2a322a5 Merge PR #54869 into main
* refs/pull/54869/head:
	mds: dump sr objects in debug output

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Dhairya Parmar <dparmar@redhat.com>
2024-01-19 13:19:21 +05:30
Venky Shankar
51487f8cd2 Merge PR #54915 into main
* refs/pull/54915/head:
	doc/cephfs/client-auth.rst: correct `This so because` to  `This is because`
	doc/cephfs/client-auth.rst: correct ``fs authorize cephfs1 /dir1 client.x rw``

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2024-01-19 13:16:19 +05:30
Venky Shankar
b96f345ae9 Merge PR #54972 into main
* refs/pull/54972/head:
	src: kernel mount command returning misleading error message

Reviewed-by: Dhairya Parmar <dparmar@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
2024-01-19 13:04:18 +05:30
zdover23
6f0afdb7bd
Merge pull request #55170 from zdover23/wip-doc-2024-01-14-radosgw-admin-set-bucket-rate-limit
doc/radosgw: edit admin.rst "set bucket rate limit"

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
2024-01-19 15:54:08 +10:00
luo rixin
04691123ed install-deps: Force remove ceph-libboost* packages
As `apt-get remove ceph-libboost*` show the error and cause the make check failed.
`E: The package ceph-libboost1.79-dev needs to be reinstalled, but I can't find an archive for it.`
The ceph-libboost* packages may be not removed, so use `dpkg` to force remove ceph-libboost*.

Fixes: https://tracker.ceph.com/issues/64032

Signed-off-by: luo rixin <luorixin@huawei.com>
2024-01-19 11:50:30 +08:00
Samuel Just
9fd22e142f common/intrusive_lru: add clear() mechanism and state for removed items with live references
We need to be able to clear the lru without waiting for all outstanding
references to be released.  Items with such references enter an
invalidated state where references can still be added and removed with
deletion at use_count == 0, but can't be accessed any longer via the lru.

Signed-off-by: Samuel Just <sjust@redhat.com>
2024-01-18 11:56:10 -08:00
Igor Fedotov
abd94a051d
Merge pull request #54990 from ifed01/wip-ifed-fix-expand-with-ncb
os/bluestore: fix free space update after bdev-expand in NCB mode.

Reviewed-by: Pere Diaz Bou <pere-altea@hotmail.com>
2024-01-18 21:31:00 +03:00
Samuel Just
31f7971eaf
Merge pull request #55188 from cyx1231st/wip-crimson-increase-obc-lru
common/options/crimson: increase crimson_osd_obc_lru_size to 512

Reviewed-by: Matan Breizman <mbreizma@redhat.com>
Reviewed-by: Samuel Just <sjust@redhat.com>
2024-01-18 08:52:15 -08:00
Casey Bodley
67874c5ea8
Merge pull request #54759 from jzhu116-bloomberg/wip-63178
rgw/lc: do not add datalog/bilog for some lc actions

Reviewed-by: Matt Benjamin <mbenjamin@redhat.com>
2024-01-18 16:13:19 +00:00
Yuri Weinstein
e7ccff5930
Merge pull request #54973 from Matan-B/wip-matanb-should-whiteout-helper
osd/osd/PrimaryLogPG: use should_whiteout helper in _delete_oid()

Reviewed-by: Samuel Just <sjust@redhat.com>
2024-01-18 07:39:25 -08:00
Yuri Weinstein
30c4873370
Merge pull request #54780 from jianwei1216/log_to_syslog_main
common: LogClient do not output meaningless logs by default

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2024-01-18 07:38:17 -08:00
Yuri Weinstein
db7669c3b0
Merge pull request #54116 from EdwardVitor/fix-warning-mon
mon: resolve warning about inconsistent variable types

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
2024-01-18 07:37:34 -08:00
zdover23
19aa8fc73d
Merge pull request #55161 from tobydarling/patch-2
doc/rados/operations: Fix off-by-one erors in control.rst

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
2024-01-18 20:41:38 +10:00
Matan Breizman
914b986610
Merge pull request #55172 from Matan-B/wip-matanb-crimson-neorados
rados_api_tests: Crimson Skip unsupported

Reviewed-by: Samuel Just <sjust@redhat.com>
2024-01-18 12:22:49 +02:00
Matan Breizman
74624a73d2
Merge pull request #53281 from xxhdx1985126/wip-crimson-recover-snapset
crimson/osd/pg: set obc's ssc when handling pull responses
2024-01-18 12:06:49 +02:00
Matan Breizman
74d985f64e
Merge pull request #55202 from zhscn/fix-ssc
crimson/osd: get SnapSetContext from head_obc

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Matan Breizman <mbreizma@redhat.com>
2024-01-18 12:05:04 +02:00
neeraj pratap singh
f14899ce08 src: kernel mount command returning misleading error message
Fixes: https://tracker.ceph.com/issues/63866
Signed-off-by: Neeraj Pratap Singh <neesingh@redhat.com>
2024-01-18 15:02:14 +05:30
Venky Shankar
ab49906b7a mds: adhere to mds_health_summarize_threshold config when reporting laggy clients
Signed-off-by: Venky Shankar <vshankar@redhat.com>
2024-01-18 14:07:03 +05:30
Aashish Sharma
62d18d65b1
Merge pull request #53814 from rhcs-dashboard/fix-61720-main
mgr/dashboard: upgrade from old 'graph' type panels to the new 'timeseries' panel

Reviewed-by: Pedro Gonzalez Gomez <pegonzal@redhat.com>
2024-01-18 13:33:49 +05:30
Redouane Kachach
4603c5b349
Merge pull request #55181 from rkachach/fix_issue_64027
mgr/rook: always recreate kvm default network + fix groups refresh
2024-01-18 06:55:38 +01:00
Samuel Just
10c9fb3240 common/intrusive_lru: generalize evict() slightly to allow other target values
Signed-off-by: Samuel Just <sjust@redhat.com>
2024-01-17 21:08:17 -08:00
Samuel Just
5c056d6ca0 common/intrusive_lru: clarify invariants
Signed-off-by: Samuel Just <sjust@redhat.com>
2024-01-17 21:08:13 -08:00
Venky Shankar
2f867c0697 Merge PR #53080 into main
* refs/pull/53080/head:
	mds/journal: make used_preallocated_ino crash more graceful

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2024-01-18 10:32:24 +05:30
Venky Shankar
2c5167261c Merge PR #53238 into main
* refs/pull/53238/head:
	mds: just wait the client flushes the snap and dirty buffer

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2024-01-18 10:30:00 +05:30
Venky Shankar
aeb75b5e4a Merge PR #54511 into main
* refs/pull/54511/head:
	test/libcephfs: move the snapdiff to a dedicated binary

Reviewed-by: Kotresh Hiremath Ravishankar <khiremat@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
2024-01-18 10:29:04 +05:30
Venky Shankar
9acc0cab3c Merge PR #54958 into main
* refs/pull/54958/head:
	mds: func name fixup, plus, and additional log message

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Dhairya Parmar <dparmar@redhat.com>
2024-01-18 10:27:38 +05:30
Venky Shankar
433fe34047 Merge PR #54682 into main
* refs/pull/54682/head:
	qa: drop mon_host check from test_cephfs_mirror_peer_bootstrap
	pybind/mgr/mirroring: drop mon_host from peer_list

Reviewed-by: Dhairya Parmar <dparmar@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
2024-01-18 10:25:47 +05:30
Redouane Kachach
11a9fe8947
mgr/rook: always recreate kvm default network + fix groups refresh
Fixes: https://tracker.ceph.com/issues/64027

This change also includes:
- adding ~/.local/bin to path so behave binary can be found
- adding requirements.txt file for testing dependencies
- increasing timeout used to wait for tools deployment to 90s
- increasing timeout used to wait for kvm network to 20s

Signed-off-by: Redouane Kachach <rkachach@redhat.com>
2024-01-17 22:55:23 +01:00
Anthony D'Atri
ed2cf56d85
Merge pull request #55168 from anthonyeleven/ec-table
doc/rados/operations: add EC overhead table to erasure-code.rst
2024-01-17 15:04:43 -05:00
Anthony D'Atri
9e1999c13d doc/rados/operations: add EC overhead table to erasure-code.rst
Signed-off-by: Anthony D'Atri <anthonyeleven@users.noreply.github.com>
2024-01-17 11:55:39 -05:00
Samarah
ee50056b44 rgw/asio: Add asserts to ensure asio isn't running during run and
`stop` calls

Signed-off-by: Samarah <samarah.uriarte@ibm.com>
2024-01-17 16:05:02 +00:00
Venky Shankar
b5d0337092 Merge PR #54041 into main
* refs/pull/54041/head:
	qa: fix error reporting string in assert_cluster_log

Reviewed-by: Milind Changire <mchangir@redhat.com>
Reviewed-by: Neeraj Pratap Singh <neesingh@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
2024-01-17 19:59:22 +05:30
Ronen Friedman
035b9e6d75
Merge pull request #55105 from ronen-fr/wip-rf-nonorecovery
osd/scrub: allow replicas to scrub even if their OSDs have ongoing backfills

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Samuel Just <sjust@redhat.com>
2024-01-17 14:02:26 +02:00
Matan Breizman
19e943627d qa/config/crimson_qa_overrides.yaml: Decrease lru_size for testing
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
2024-01-17 11:51:50 +00:00