]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
test: fix TierFlushDuringFlush to wait until dedup_tier is set on base pool 45624/head
authorSungmin Lee <ssdohammer@gmail.com>
Mon, 14 Feb 2022 05:15:00 +0000 (14:15 +0900)
committerLaura Flores <lflores@redhat.com>
Thu, 24 Mar 2022 15:28:42 +0000 (10:28 -0500)
commit23a0b9b93ef82f71af9fe15ea1b66e11ea65fcfe
tree1fdcfb9ba8ebb665af8c5772bd4eed07bf921cc6
parent06806b4daf15629b6b20d88969fb82ca71faf71d
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>
(cherry picked from commit 66ad91eb1e4c40535c1618e3f13a302623f87ed8)
src/osd/PrimaryLogPG.cc
src/test/librados/tier_cxx.cc