Commit 2acfb846 authored by Damiano Cipriani's avatar Damiano Cipriani Committed by Jim Harris
Browse files

doc: add lvol/blob reparent descriptions



CHANGELOG.md, lvol.md and blob.md have been updated with
informations about the functionalities to change the parent
of a lvol/blob.

Change-Id: I9ee95b216468dc98e9ee1c55160c923a7599d57f
Signed-off-by: default avatarDamiano Cipriani <damiano.cipriani@suse.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/22502


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
parent 672ba928
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -16,11 +16,18 @@ Added `bdev_lvol_start_shallow_copy` RPC to start a shallow copy of an lvol over
`bdev_lvol_check_shallow_copy` RPC to get the status of the operation.
These RPCs use the new API `spdk_lvol_shallow_copy`.

Added `bdev_lvol_set_parent` and `bdev_lvol_set_parent_bdev` RPC to change the parent of an existing lvol
with the use of the new APIs `spdk_lvol_set_parent` and `spdk_lvol_set_external_parent`.

### blobstore

Added new API `spdk_bs_blob_shallow_copy` to make a shallow copy from a blob to a blobstore device. Only clusters
allocated to the blob will be written on the device.

Added new APIs `spdk_bs_blob_set_parent` and `spdk_bs_blob_set_external_parent` to change the parent of an
existing lvol. With these new API a thin provisioned blob can become a clone of an existing snapshot
or of an existing external snapshot.

### event

SPDK applications can now start with `--wait-for-rpc` and JSON configuration provided at the same time.
+11 −0
Original line number Diff line number Diff line
@@ -446,6 +446,17 @@ than blob's size and blob store's block size must be an integer multiple of devi
This functionality can be used to recreate the entire snapshot stack of a blob into a different blob
store.

#### Change the parent of a blob {#blob_reparent}

We can change the parent of a thin provisioned blob, making the blob a clone of a snapshot of the
same blobstore or a clone of an external snapshot. The previous parent of the blob can be a snapshot,
an external snapshot or none.

If the new parent of the blob is a snapshot of the same blobstore, blob and snapshot must have the same number of clusters.

If the new parent of the blob is an external snapshot, the size of the esnap must be an integer multiple of
blob's cluster size.

#### Copy-on-write {#blob_pg_copy_on_write}

A copy-on-write operation is somewhat expensive, with the cost being proportional to the cluster
+8 −0
Original line number Diff line number Diff line
@@ -207,4 +207,12 @@ bdev_lvol_check_shallow_copy [-h] operation_id
    Get shallow copy status
    optional arguments:
    -h, --help  show help
bdev_lvol_set_parent [-h] lvol_name snapshot_name
    Set the parent snapshot of a lvol
    optional arguments:
    -h, --help  show help
bdev_lvol_set_parent_bdev lvol_name esnap_name
    Set the parent external snapshot of a lvol
    optional arguments:
    -h, --help  show help
```