[stgt] [PATCH] Print out backing store type

Alexander Nezhinsky alexandern at Voltaire.COM
Tue Sep 8 16:17:38 CEST 2009


Resending, with TABs and the title fixed
---
Prints out the type of a backing store per device in --mode target --op show

Signed-off-by: Alexander Nezhinsky <alexandern at voltaire.com>
---
diff --git a/usr/target.c b/usr/target.c
index 9d979bf..14ab298 100644
--- a/usr/target.c
+++ b/usr/target.c
@@ -1601,7 +1601,8 @@ int tgt_target_show_all(char *buf, int rest)
 				 _TAB3 "Size: %s\n"
 				 _TAB3 "Online: %s\n"
 				 _TAB3 "Removable media: %s\n"
-				 _TAB3 "Backing store: %s\n",
+				 _TAB3 "Backing store type: %s\n"
+				 _TAB3 "Backing store path: %s\n",
 				 lu->lun,
   				 print_type(lu->attrs.device_type),
 				 lu->attrs.scsi_id,
@@ -1609,7 +1610,10 @@ int tgt_target_show_all(char *buf, int rest)
 				 print_disksize(lu->size),
 				 lu->attrs.online ? "Yes" : "No",
 				 lu->attrs.removable ? "Yes" : "No",
-				 lu->path ? : "No backing store");
+				 lu->bst ?
+					(lu->bst->bs_name ? : "Unknown") :
+					"None",
+				 lu->path ? : "None");
 
 		if (!strcmp(tgt_drivers[target->lid]->name, "iscsi")) {
 			int i, aid;
--
1.5.5


--
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