blkdiscard


Description:

[ Version ( since = "1.25.44" ) ]
public bool blkdiscard (string device) throws Error

discard all blocks on a device

This discards all blocks on the block device device, giving the free space back to the host.

This operation requires support in libguestfs, the host filesystem, qemu and the host kernel. If this support isn't present it may give an error or even appear to run but do nothing. You must also set the discard attribute on the underlying drive (see guestfs_session_add_drive_opts).

This function depends on the feature "blkdiscard". See also feature_available.

Parameters:

this

A GuestfsSession object

Returns:

true on success, false on error