[PATCH] Enable tgt-admin to bring up Gluster backing stores

Andy Grover <[email protected]> Mon, 4 Apr 2016 15:32:14 -0700
Newsgroups org.kernel.vger.stgt
Message-ID <[email protected]>
As reported in:

https://bugzilla.redhat.com/show_bug.cgi?id=1323356

tgt-admin needs a small change to properly bring up Gluster glfs
backing stores, which do not have an associated local block device.

Reported-by: Nathan Coulson <[email protected]>
Signed-off-by: Andy Grover <[email protected]>
---
 scripts/tgt-admin | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/tgt-admin b/scripts/tgt-admin
index 7130a3d..8f6fb7f 100755
--- a/scripts/tgt-admin
+++ b/scripts/tgt-admin
@@ -488,7 +488,7 @@ sub add_backing_direct {
 	}
 
 	if ($can_alloc == 1 &&
-	   ($bstype =~ "rbd" || (-e $backing_store && ! -d $backing_store))) {
+	   ($bstype =~ "glfs" || $bstype =~ "rbd" || (-e $backing_store && ! -d $backing_store))) {
 		my @exec_commands;
 		my $device_type;
 		my $bs_type;
-- 
2.5.5