[lxc-devel] [lxd/master] Storage: Only detect volume.block.filesystem changes on block backed pool FS volumes

tomponline on Github lxc-bot at linuxcontainers.org
Mon Jan 27 10:15:20 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 450 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200127/13b873b4/attachment-0001.bin>
-------------- next part --------------
From 432ac48f1cd0d2d8052b86774eba3396cb6c0aa5 Mon Sep 17 00:00:00 2001
From: Thomas Parrott <thomas.parrott at canonical.com>
Date: Mon, 27 Jan 2020 10:13:50 +0000
Subject: [PATCH] lxd/storage/backend/lxd: Only detect volume.block.filesystem
 changes on block backed pool FS volumes

Signed-off-by: Thomas Parrott <thomas.parrott at canonical.com>
---
 lxd/storage/backend_lxd.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxd/storage/backend_lxd.go b/lxd/storage/backend_lxd.go
index 43d5a6b273..82180a3b88 100644
--- a/lxd/storage/backend_lxd.go
+++ b/lxd/storage/backend_lxd.go
@@ -1937,7 +1937,7 @@ func (b *lxdBackend) EnsureImage(fingerprint string, op *operations.Operation) e
 	// If an existing DB row was found, check if filesystem is the same as the current pool's filesystem.
 	// If not we need to delete the existing cached image volume and re-create using new filesystem.
 	if imgDBVol != nil && contentType == drivers.ContentTypeFS {
-		if imgDBVol.Config["block.filesystem"] != b.poolBlockFilesystem() {
+		if b.Driver().Info().BlockBacking && imgDBVol.Config["block.filesystem"] != b.poolBlockFilesystem() {
 			logger.Debug("Filesystem of pool has changed since cached image volume created, regenerating image volume")
 			err = b.DeleteImage(fingerprint, op)
 			if err != nil {


More information about the lxc-devel mailing list