[stgt] setting write cache fails in recent git

Doron Shoham dorons at Voltaire.COM
Thu Oct 16 14:09:26 CEST 2008


FUJITA Tomonori wrote:
> On Thu, 16 Oct 2008 12:21:21 +0200
> Tomasz Chmielewski <mangoo at wpkg.org> wrote:
> 
>> FUJITA Tomonori schrieb:
>>> On Thu, 16 Oct 2008 10:35:29 +0200
>>> Tomasz Chmielewski <mangoo at wpkg.org> wrote:
>>>
>>>> In recent git, setting write cache to off fails:
>>>>
>>>> # tgtadm --lld iscsi --op update --mode logicalunit --tid 2 --lun=1 --params mode_page=8:0:18:0x10:0:0xff:0xff:0:0:0xff:0xff:0xff:0xff:0x80:0x14:0:0:0:0:0:0
>>>> tgtadm: option 5 not supported in logicalunit mode
>>>>
>>>>
>>>> I checked the git from 2008-10-16 and 2008-10-15.
>>>>
>>>> It works fine (i.e., I'm able to disable write cache) in git fetched on 2008-10-13.
>>> I think that this fixes the update operations in the logicalunit mode
>>> though there might be other regressions about the tgtadm.
>> Indeed, that patch helps.
> 
> Thanks, merged.
> 
> Doron, are you writing up all the options of tgtadm (as you
> suggested)? It also helps us to verify if tgtadm checks all the
> options properly (in other words, we can avoid bugs like this).

A very similar bug...
I know that checking the input can be a little
bit annoying but I think it is required.


enable bstype option when creating a new logicalunit

Signed-off-by: root <root at debiancloner.voltaire.com>
---
 usr/tgtadm.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/usr/tgtadm.c b/usr/tgtadm.c
index 06f18e2..c9a3d74 100644
--- a/usr/tgtadm.c
+++ b/usr/tgtadm.c
@@ -140,7 +140,7 @@ Linux SCSI Target Framework Administration Utility.\n\
                         enable the target to accept the specific initiators.\n\
   --lld [driver] --mode target --op unbind --tid=[id] --initiator-address=[src]\n\
                         disable the specific permitted initiators.\n\
-  --lld [driver] --mode logicalunit --op new --tid=[id] --lun=[lun] --backing-store=[path]\n\
+  --lld [driver] --mode logicalunit --op new --tid=[id] --lun=[lun] --backing-store=[path] --bstype=[type]\n\
                         add a new logical unit with [lun] to the specific\n\
                         target with [id]. The logical unit is offered\n\
                         to the initiators. [path] must be block device files\n\
@@ -646,7 +646,7 @@ int main(int argc, char **argv)
 		}
 		switch (op) {
 		case OP_NEW:
-			rc = verify_mode_params(argc, argv, "Lmotlb");
+			rc = verify_mode_params(argc, argv, "LmotlbE");
 			if (rc) {
 				eprintf("target mode: option '-%c' is not "
 					  "allowed/supported\n", rc);
-- 
1.5.3.8

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