mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
storage: Add TRIM algorithm to storage volume API
This new algorithm adds support for wiping volumes using TRIM. It does not overwrite all the data in a volume, but it tells the backing storage pool/driver that all bytes in a volume can be discarded. It depends on the backing storage pool how this is handled. A SCSI backend might send UNMAP commands to remove all data present on a LUN. A Ceph backend might use rbd_discard() to instruct the Ceph cluster that all data on that RBD volume can be discarded. Signed-off-by: Wido den Hollander <wido@widodh.nl>
This commit is contained in:
committed by
John Ferlan
parent
f226ecbfbb
commit
63cdc92f04
@@ -4,7 +4,7 @@
|
||||
* Description: Provides APIs for the management of storage pools and volumes
|
||||
* Author: Daniel Veillard <veillard@redhat.com>
|
||||
*
|
||||
* Copyright (C) 2006-2014 Red Hat, Inc.
|
||||
* Copyright (C) 2006-2016 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@@ -153,6 +153,9 @@ typedef enum {
|
||||
|
||||
VIR_STORAGE_VOL_WIPE_ALG_RANDOM = 8, /* 1-pass random */
|
||||
|
||||
VIR_STORAGE_VOL_WIPE_ALG_TRIM = 9, /* 1-pass, trim all data on the
|
||||
volume by using TRIM or DISCARD */
|
||||
|
||||
# ifdef VIR_ENUM_SENTINELS
|
||||
VIR_STORAGE_VOL_WIPE_ALG_LAST
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user