]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
test: fix TierFlushDuringFlush to wait until dedup_tier is set on base pool 45035/head
authorSungmin Lee <ssdohammer@gmail.com>
Mon, 14 Feb 2022 05:15:00 +0000 (14:15 +0900)
committerSungmin Lee <ssdohammer@gmail.com>
Thu, 24 Feb 2022 00:56:29 +0000 (09:56 +0900)
commit66ad91eb1e4c40535c1618e3f13a302623f87ed8
treef92a206905895ad5f576f5693acee20402e8dcdb
parent959663007321a369c83218414a29bd9dbc8bda3a
test: fix TierFlushDuringFlush to wait until dedup_tier is set on base pool

When start_dedup() is called while the base pool is not set the dedup_tier,
it is not possible to know the target pool of the chunk object.

1. User set the dedup_tier on a base pool by mon_command().
2. User issues tier_flush on the object which has a manifest (base pool)
  before the dedup_tier is applied on the base pool.
3. OSD calls start_dedup() to flush the chunk objects to chunk pool.
4. OSD calls get_dedup_tier() to get the chunk pool of the base pool,
  but it is not possible to know the chunk pool.
5. get_dedup_tier() returns 0 because it is not applied on the base pool yet.
6. This makes refcount_manifest() lost it's way to chunk pool.

To prevent this issue, start_dedup() has to be called after dedup_tier is set
on the base pool. To do so, this commit prohibits getting chunk pool id if
dedup_tier is not set.

Fixes: http://tracker.ceph.com/issues/53855
Signed-off-by: Sungmin Lee <sung_min.lee@samsung.com>
src/osd/PrimaryLogPG.cc
src/test/librados/tier_cxx.cc