[PATCH] tgt-admin: support multiple backing-stores on dump operation
FUJITA Tomonori
fujita.tomonori at lab.ntt.co.jp
Fri Aug 15 09:17:15 CEST 2008
Applied,
=
From: Jesse Nelson <spheromak at gmail.com>
Subject: [PATCH] tgt-admin: support multiple backing-stores on dump operation
If you have a target with multiple backing-stores, tgt-addmin dump
operation does not reflect that properly. This patch fixes the issue.
With the patch, I get this output:
<target iqn.2001-08.com.foo:tc>
driver iscsi
backing-store /dev/vgSAN01/base01s06
backing-store /dev/vgSAN01/base01s07
backing-store /dev/vgSAN01/base01s08
backing-store /dev/vgSAN01/base01s09
initiator-address ALL
</target>
Without the patch, I would see only:
<target iqn.2001-08.com.foo:tc>
driver iscsi
backing-store /dev/vgSAN01/base01s06
initiator-address ALL
</target>
Signed-off-by: FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp>
---
scripts/tgt-admin | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/scripts/tgt-admin b/scripts/tgt-admin
index 170035b..d4246a6 100755
--- a/scripts/tgt-admin
+++ b/scripts/tgt-admin
@@ -396,7 +396,8 @@ sub dump_config {
}
if ( $show_target_line =~ m/\s+Backing store: (?!No backing store)(.+)/ ) {
- print "\tbacking-store $1\n";
+ my @backing = $show_target_line =~ m{\s+Backing Store: (?!No backing store)(.+)}gi;
+ foreach my $back (@backing) { print "\tbacking-store $back\n"; }
}
}
--
1.5.5.GIT
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
More information about the stgt
mailing list