public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Eryu Guan <eguan@redhat.com>
To: Harish <harish@linux.vnet.ibm.com>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH] common/dmthin: Fix grep command for finding exact value
Date: Thu, 16 Mar 2017 15:24:01 +0800	[thread overview]
Message-ID: <20170316072401.GQ14226@eguan.usersys.redhat.com> (raw)
In-Reply-To: <1489639730-15004-1-git-send-email-harish@linux.vnet.ibm.com>

On Thu, Mar 16, 2017 at 10:18:50AM +0530, Harish wrote:
> Sometimes there are multiple occurences of pool_name and data_name in
> dmsetup command which causes failures while adding in next line.
> This patch greps for pool_name at start of line.
> 
> Signed-off-by: Harish <harish@linux.vnet.ibm.com>
> ---
>  common/dmthin | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/common/dmthin b/common/dmthin
> index e774175..fe48eef 100644
> --- a/common/dmthin
> +++ b/common/dmthin
> @@ -180,8 +180,8 @@ _dmthin_grow()
>  	# Get current sizes & values
>  	local   meta_dev_size=`$DMSETUP_PROG table | grep $DMTHIN_META_NAME | awk '{print $3}'`
>  	local meta_dev_offset=`$DMSETUP_PROG table | grep $DMTHIN_META_NAME | awk '{print $6}'`
> -	local   data_dev_size=`$DMSETUP_PROG table | grep $DMTHIN_DATA_NAME | awk '{print $3}'`
> -	local   pool_dev_size=`$DMSETUP_PROG table | grep $DMTHIN_POOL_NAME | awk '{print $3}'`
> +	local   data_dev_size=`$DMSETUP_PROG table | grep ^$DMTHIN_DATA_NAME | awk '{print $3}'`
> +	local   pool_dev_size=`$DMSETUP_PROG table | grep ^$DMTHIN_POOL_NAME | awk '{print $3}'`

Do we need to do the same to all other $DMTHIN_.*_NAME, not only
DMTHIN_DATA_NAME and DMTHIN_POOL_NAME?

Thanks,
Eryu
>  	local    cluster_size=`$DMSETUP_PROG table | grep $DMTHIN_POOL_NAME | awk '{print $7}'`
>  	local       low_water=`$DMSETUP_PROG table | grep $DMTHIN_POOL_NAME | awk '{print $8}'`
>  
> -- 
> 2.7.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2017-03-16  7:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-16  4:48 [PATCH] common/dmthin: Fix grep command for finding exact value Harish
2017-03-16  7:24 ` Eryu Guan [this message]
     [not found]   ` <32c10b3d-80a9-cd1d-4abd-8db5f904c381@linux.vnet.ibm.com>
2017-03-16 10:23     ` Eryu Guan
  -- strict thread matches above, loose matches on Subject: below --
2017-03-16 10:31 Harish

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170316072401.GQ14226@eguan.usersys.redhat.com \
    --to=eguan@redhat.com \
    --cc=fstests@vger.kernel.org \
    --cc=harish@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox