Skip to content

Commit

Permalink
lxd/storage/drivers: Drop block options from VM block volumes
Browse files Browse the repository at this point in the history
This drops block mode related options from VM block volumes.

Signed-off-by: Thomas Hipp <[email protected]>
  • Loading branch information
monstermunchkin committed Jun 27, 2023
1 parent a0ef37c commit c4f9cd6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lxd/storage/drivers/driver_zfs_volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -3204,11 +3204,10 @@ func (d *zfs) FillVolumeConfig(vol Volume) error {
return err
}

// Only validate filesystem config keys for filesystem volumes or VM block volumes (which have an
// associated filesystem volume).
if d.isBlockBacked(vol) && vol.ContentType() == ContentTypeFS || vol.IsVMBlock() {
// Only validate filesystem config keys for filesystem volumes.
if d.isBlockBacked(vol) && vol.ContentType() == ContentTypeFS {
// Inherit block mode from pool if not set.
if d.isBlockBacked(vol) && vol.ContentType() == ContentTypeFS && vol.config["zfs.block_mode"] == "" {
if vol.config["zfs.block_mode"] == "" {
vol.config["zfs.block_mode"] = d.config["volume.zfs.block_mode"]
}

Expand Down

0 comments on commit c4f9cd6

Please sign in to comment.