stgt.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tgt-setup-lun: fix error when blocksize not given
@ 2016-07-26 10:49 Roi Dayan
  2016-08-02  3:31 ` FUJITA Tomonori
  0 siblings, 1 reply; 2+ messages in thread
From: Roi Dayan @ 2016-07-26 10:49 UTC (permalink / raw)
  To: fujita.tomonori; +Cc: stgt, Roi Dayan

A prev commit added option for blocksize but intorudced a bug
when user didn't provide a value.

Signed-off-by: Roi Dayan <roid@mellanox.com>
---
 scripts/tgt-setup-lun | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/scripts/tgt-setup-lun b/scripts/tgt-setup-lun
index f875b40..8983f10 100755
--- a/scripts/tgt-setup-lun
+++ b/scripts/tgt-setup-lun
@@ -281,7 +281,10 @@ if [ $bs_type ]; then
 	echo "Setting backing store type: $bs_type"
 	bs_opt="-E $bs_type"
 fi
-$TGTADM --lld $lld_name --op new --mode logicalunit --tid $tid --lun $lun --blocksize $block_size -b $dev $bs_opt
+if [ $block_size ]; then
+	blksize_opt="--blocksize $block_size"
+fi
+$TGTADM --lld $lld_name --op new --mode logicalunit --tid $tid --lun $lun -b $dev $bs_opt $blksize_opt
 res=$?
 
 if [ $res -ne 0 ]; then
-- 
1.8.4.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] tgt-setup-lun: fix error when blocksize not given
  2016-07-26 10:49 [PATCH] tgt-setup-lun: fix error when blocksize not given Roi Dayan
@ 2016-08-02  3:31 ` FUJITA Tomonori
  0 siblings, 0 replies; 2+ messages in thread
From: FUJITA Tomonori @ 2016-08-02  3:31 UTC (permalink / raw)
  To: roid; +Cc: fujita.tomonori, stgt

On Tue, 26 Jul 2016 13:49:25 +0300
Roi Dayan <roid@mellanox.com> wrote:

> A prev commit added option for blocksize but intorudced a bug
> when user didn't provide a value.
> 
> Signed-off-by: Roi Dayan <roid@mellanox.com>
> ---
>  scripts/tgt-setup-lun | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-02  3:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-26 10:49 [PATCH] tgt-setup-lun: fix error when blocksize not given Roi Dayan
2016-08-02  3:31 ` FUJITA Tomonori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).