Project

General

Profile

Actions

Bug #51458

open

make "rbd flatten" preserve non-sparseness

Added by Ilya Dryomov almost 3 years ago. Updated 18 days ago.

Status:
In Progress
Priority:
Normal
Assignee:
Target version:
-
% Done:

0%

Source:
Development
Tags:
Backport:
reef quincy squid
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

The deep-copy state machine saw significant changes in pacific. One user-visible side effect is that "rbd deep copy --flatten" now preserves non-sparseness (commit cc87a8bd697e ("librbd: deep-copy object utilizes image-extent IO methods") from https://github.com/ceph/ceph/pull/37074):

$ rbd create --size 100M --thick-provision a
$ rbd clone a@snap b
$ rbd deep copy --flatten b c

Before:

$ rbd du --exact
NAME     PROVISIONED  USED   
a@snap       100 MiB  100 MiB
a            100 MiB      0 B
b            100 MiB      0 B
c            100 MiB      0 B
<TOTAL>      300 MiB  100 MiB

After:

$ rbd du --exact
NAME     PROVISIONED  USED   
a@snap       100 MiB  100 MiB
a            100 MiB      0 B
b            100 MiB      0 B
c            100 MiB  100 MiB
<TOTAL>      300 MiB  200 MiB

This may have been unintended but it is actually the right thing to do IMO. If the user took care to preallocate the parent image by writing zeroes, the flattened clone should preserve those zeroes not just logically but also physically.

I think we should make a similar change to "rbd flatten" and backport this to pacific so that both flatten-like operations behave the same.

Actions #1

Updated by Ilya Dryomov almost 3 years ago

  • Status changed from New to In Progress
  • Assignee set to Ilya Dryomov
Actions #2

Updated by Konstantin Shalygin 18 days ago

  • Source set to Development
  • Backport changed from pacific to reef quincy squid
Actions

Also available in: Atom PDF