All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
To: Eryu Guan <eguan@redhat.com>
Cc: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] fstest: btrfs: add a test for quota number when deleting a subvol.
Date: Mon, 16 Mar 2015 13:47:29 +0800	[thread overview]
Message-ID: <55066E71.3000402@cn.fujitsu.com> (raw)
In-Reply-To: <20150316053337.GA23302@dhcp-13-216.nay.redhat.com>

On 03/16/2015 01:33 PM, Eryu Guan wrote:
> On Mon, Mar 16, 2015 at 01:06:52PM +0800, Dongsheng Yang wrote:
>> Hi Guan,  sorry for the late.
>>
>> On 03/06/2015 01:06 PM, Eryu Guan wrote:
>>> On Tue, Mar 03, 2015 at 07:13:30PM +0800, Dongsheng Yang wrote:
>>>> This regression is introduced by two commits:
>>>>
>>>> e339a6b0 (Btrfs: __btrfs_mod_ref should always use no_quota)
>>>> 1152651a (btrfs: qgroup: account shared subtrees during snapshot delete)
> [snip]
>
>>>> +_cleanup()
>>>> +{
>>>> +    cd /
>>>> +    rm -f $tmp.*
>>> Better to use a tab not 4 spaces, maybe "new" should be updated too (in
>>> another patch)
>> Thanx, will send another patch for "./new".
> Just FYI, I've already sent out the fix, please see
>
> http://www.spinics.net/lists/fstests/msg01073.html
Great!! Thanx for your information. But I found some other 4 spaces in 
new, I am not sure
whether we also need to replace them with tab or not as shown below.

Thanx

commit 931340c0c5599ae2c6714df16c796ea24240a5a7
Author: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Date:   Mon Mar 16 01:15:53 2015 -0400

     new: replace 4 spaces with a tab.

     Sugguested-by: Eryu Guan <eguan@redhat.com>
     Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>

diff --git a/new b/new
index 86f9075..f94daed 100755
--- a/new
+++ b/new
@@ -29,15 +29,15 @@ trap "rm -f /tmp/$$.; exit" 0 1 2 3 15

  _cleanup()
  {
-    :
+       :
  }

  SRC_GROUPS=`find tests -not -path tests -type d -printf "%f "`
  usage()
  {
-    echo "Usage $0 test_dir"
-    echo "Available dirs are: $SRC_GROUPS"
-    exit
+       echo "Usage $0 test_dir"
+       echo "Available dirs are: $SRC_GROUPS"
+       exit
  }

  [ $# -eq 0 ] && usage
@@ -46,8 +46,8 @@ shift

  if [ ! -f $tdir/group ]
  then
-    echo "Creating the $tdir/group index ..."
-    cat <<'End-of-File' >$tdir/group
+       echo "Creating the $tdir/group index ..."
+       cat <<'End-of-File' >$tdir/group
  # QA groups control
  #
  # define groups and default group owners
@@ -65,15 +65,15 @@ fi

  if [ ! -w $tdir/group ]
  then
-    chmod u+w $tdir/group
-    echo "Warning: making the index file \"$tdir/group\" writeable"
+       chmod u+w $tdir/group
+       echo "Warning: making the index file \"$tdir/group\" writeable"
  fi

  if make
  then
-    :
+       :
  else
-    echo "Warning: make failed -- some tests may be missing"
+       echo "Warning: make failed -- some tests may be missing"
  fi

  i=0
@@ -83,16 +83,16 @@ eof=1

  for found in `cat $tdir/group | $AWK_PROG '{ print $1 }'`
  do
-    line=$((line+1))
-    if [ -z "$found" ] || [ "$found" == "#" ];then
+       line=$((line+1))
+       if [ -z "$found" ] || [ "$found" == "#" ];then
         continue
-    fi
-    i=$((i+1))
-    id=`printf "%03d" $i`
-    if [ "$id" != "$found" ];then
+       fi
+       i=$((i+1))
+       id=`printf "%03d" $i`
+       if [ "$id" != "$found" ];then
         eof=0
         break
-    fi
+       fi
  done
  if [ $eof -eq 1 ]; then
     line=$((line+1))
@@ -104,9 +104,9 @@ echo "Next test is $id"

  if [ -f $tdir/$id ]
  then
-    echo "Error: test $id already exists!"
-    _cleanup
-    exit 1
+       echo "Error: test $id already exists!"
+       _cleanup
+       exit 1
  fi

  echo -n "Creating skeletal script for you to edit ..."
@@ -148,8 +148,8 @@ trap "_cleanup; exit \\\$status" 0 1 2 3 15

  _cleanup()
  {
-    cd /
-    rm -f \$tmp.*
+       cd /
+       rm -f \$tmp.*
  }

  # get standard environment, filters and checks
@@ -184,39 +184,39 @@ ${EDITOR-vi} $tdir/$id
  if [ $# -eq 0 ]
  then

-    while true
-    do
+       while true
+       do
         echo -n "Add to group(s) [other] (? for list): "
         read ans
         [ -z "$ans" ] && ans=other
         if [ "X$ans" = "X?" ]
         then
-           for d in $SRC_GROUPS; do
+               for d in $SRC_GROUPS; do
                 l=$(sed -n < tests/$d/group \
-                   -e 's/#.*//' \
-                   -e 's/$/ /' \
-                   -e 's;\(^[0-9][0-9][0-9]\)\(.*$\);\2;p')
+                       -e 's/#.*//' \
+                       -e 's/$/ /' \
+                       -e 's;\(^[0-9][0-9][0-9]\)\(.*$\);\2;p')
                 grpl="$grpl $l"
-           done
-           lst=`for word in $grpl; do echo $word; done | sort| uniq `
-           echo $lst
+               done
+               lst=`for word in $grpl; do echo $word; done | sort| uniq `
+               echo $lst
         else
-           break
+               break
         fi
-    done
+       done
  else
-    # expert mode, groups are on the command line
-    #
-    for g in $*
-    do
+       # expert mode, groups are on the command line
+       #
+       for g in $*
+       do
         if grep "^$g[   ]" $tdir/group >/dev/null
         then
-           :
+               :
         else
-           echo "Warning: group \"$g\" not defined in $tdir/group"
+               echo "Warning: group \"$g\" not defined in $tdir/group"
         fi
-    done
-    ans="$*"
+       done
+       ans="$*"
  fi

>
> Thanks,
> Eryu Guan
> .
>


WARNING: multiple messages have this Message-ID (diff)
From: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
To: Eryu Guan <eguan@redhat.com>
Cc: <fstests@vger.kernel.org>, <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] fstest: btrfs: add a test for quota number when deleting a subvol.
Date: Mon, 16 Mar 2015 13:47:29 +0800	[thread overview]
Message-ID: <55066E71.3000402@cn.fujitsu.com> (raw)
In-Reply-To: <20150316053337.GA23302@dhcp-13-216.nay.redhat.com>

On 03/16/2015 01:33 PM, Eryu Guan wrote:
> On Mon, Mar 16, 2015 at 01:06:52PM +0800, Dongsheng Yang wrote:
>> Hi Guan,  sorry for the late.
>>
>> On 03/06/2015 01:06 PM, Eryu Guan wrote:
>>> On Tue, Mar 03, 2015 at 07:13:30PM +0800, Dongsheng Yang wrote:
>>>> This regression is introduced by two commits:
>>>>
>>>> e339a6b0 (Btrfs: __btrfs_mod_ref should always use no_quota)
>>>> 1152651a (btrfs: qgroup: account shared subtrees during snapshot delete)
> [snip]
>
>>>> +_cleanup()
>>>> +{
>>>> +    cd /
>>>> +    rm -f $tmp.*
>>> Better to use a tab not 4 spaces, maybe "new" should be updated too (in
>>> another patch)
>> Thanx, will send another patch for "./new".
> Just FYI, I've already sent out the fix, please see
>
> http://www.spinics.net/lists/fstests/msg01073.html
Great!! Thanx for your information. But I found some other 4 spaces in 
new, I am not sure
whether we also need to replace them with tab or not as shown below.

Thanx

commit 931340c0c5599ae2c6714df16c796ea24240a5a7
Author: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Date:   Mon Mar 16 01:15:53 2015 -0400

     new: replace 4 spaces with a tab.

     Sugguested-by: Eryu Guan <eguan@redhat.com>
     Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>

diff --git a/new b/new
index 86f9075..f94daed 100755
--- a/new
+++ b/new
@@ -29,15 +29,15 @@ trap "rm -f /tmp/$$.; exit" 0 1 2 3 15

  _cleanup()
  {
-    :
+       :
  }

  SRC_GROUPS=`find tests -not -path tests -type d -printf "%f "`
  usage()
  {
-    echo "Usage $0 test_dir"
-    echo "Available dirs are: $SRC_GROUPS"
-    exit
+       echo "Usage $0 test_dir"
+       echo "Available dirs are: $SRC_GROUPS"
+       exit
  }

  [ $# -eq 0 ] && usage
@@ -46,8 +46,8 @@ shift

  if [ ! -f $tdir/group ]
  then
-    echo "Creating the $tdir/group index ..."
-    cat <<'End-of-File' >$tdir/group
+       echo "Creating the $tdir/group index ..."
+       cat <<'End-of-File' >$tdir/group
  # QA groups control
  #
  # define groups and default group owners
@@ -65,15 +65,15 @@ fi

  if [ ! -w $tdir/group ]
  then
-    chmod u+w $tdir/group
-    echo "Warning: making the index file \"$tdir/group\" writeable"
+       chmod u+w $tdir/group
+       echo "Warning: making the index file \"$tdir/group\" writeable"
  fi

  if make
  then
-    :
+       :
  else
-    echo "Warning: make failed -- some tests may be missing"
+       echo "Warning: make failed -- some tests may be missing"
  fi

  i=0
@@ -83,16 +83,16 @@ eof=1

  for found in `cat $tdir/group | $AWK_PROG '{ print $1 }'`
  do
-    line=$((line+1))
-    if [ -z "$found" ] || [ "$found" == "#" ];then
+       line=$((line+1))
+       if [ -z "$found" ] || [ "$found" == "#" ];then
         continue
-    fi
-    i=$((i+1))
-    id=`printf "%03d" $i`
-    if [ "$id" != "$found" ];then
+       fi
+       i=$((i+1))
+       id=`printf "%03d" $i`
+       if [ "$id" != "$found" ];then
         eof=0
         break
-    fi
+       fi
  done
  if [ $eof -eq 1 ]; then
     line=$((line+1))
@@ -104,9 +104,9 @@ echo "Next test is $id"

  if [ -f $tdir/$id ]
  then
-    echo "Error: test $id already exists!"
-    _cleanup
-    exit 1
+       echo "Error: test $id already exists!"
+       _cleanup
+       exit 1
  fi

  echo -n "Creating skeletal script for you to edit ..."
@@ -148,8 +148,8 @@ trap "_cleanup; exit \\\$status" 0 1 2 3 15

  _cleanup()
  {
-    cd /
-    rm -f \$tmp.*
+       cd /
+       rm -f \$tmp.*
  }

  # get standard environment, filters and checks
@@ -184,39 +184,39 @@ ${EDITOR-vi} $tdir/$id
  if [ $# -eq 0 ]
  then

-    while true
-    do
+       while true
+       do
         echo -n "Add to group(s) [other] (? for list): "
         read ans
         [ -z "$ans" ] && ans=other
         if [ "X$ans" = "X?" ]
         then
-           for d in $SRC_GROUPS; do
+               for d in $SRC_GROUPS; do
                 l=$(sed -n < tests/$d/group \
-                   -e 's/#.*//' \
-                   -e 's/$/ /' \
-                   -e 's;\(^[0-9][0-9][0-9]\)\(.*$\);\2;p')
+                       -e 's/#.*//' \
+                       -e 's/$/ /' \
+                       -e 's;\(^[0-9][0-9][0-9]\)\(.*$\);\2;p')
                 grpl="$grpl $l"
-           done
-           lst=`for word in $grpl; do echo $word; done | sort| uniq `
-           echo $lst
+               done
+               lst=`for word in $grpl; do echo $word; done | sort| uniq `
+               echo $lst
         else
-           break
+               break
         fi
-    done
+       done
  else
-    # expert mode, groups are on the command line
-    #
-    for g in $*
-    do
+       # expert mode, groups are on the command line
+       #
+       for g in $*
+       do
         if grep "^$g[   ]" $tdir/group >/dev/null
         then
-           :
+               :
         else
-           echo "Warning: group \"$g\" not defined in $tdir/group"
+               echo "Warning: group \"$g\" not defined in $tdir/group"
         fi
-    done
-    ans="$*"
+       done
+       ans="$*"
  fi

>
> Thanks,
> Eryu Guan
> .
>


  reply	other threads:[~2015-03-16  5:51 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-10 10:24 [PATCH 0/3] Btrfs: qgroup: part-3: bug fixes for deleting subvolume Dongsheng Yang
2015-02-10 10:24 ` [PATCH 1/3] btrfs: qgroup: return EINVAL if level of parent is not higher than child's Dongsheng Yang
2015-02-10 10:24 ` [PATCH 2/3] btrfs: qgroup: allow to remove qgroup which has parent but no child Dongsheng Yang
2015-02-10 10:24 ` [PATCH 3/3] btrfs: qgroup: fix a wrong parameter of no_quota Dongsheng Yang
2015-02-10 11:24   ` Filipe David Manana
2015-02-11  2:51     ` Dongsheng Yang
2015-02-13  9:38   ` Dongsheng Yang
2015-02-26  6:05     ` Dongsheng Yang
2015-03-03 11:13       ` [PATCH] fstest: btrfs: add a test for quota number when deleting a subvol Dongsheng Yang
2015-03-03 11:13         ` Dongsheng Yang
2015-03-06  5:06         ` Eryu Guan
2015-03-16  5:06           ` Dongsheng Yang
2015-03-16  5:06             ` Dongsheng Yang
2015-03-16  5:33             ` Eryu Guan
2015-03-16  5:47               ` Dongsheng Yang [this message]
2015-03-16  5:47                 ` Dongsheng Yang
2015-03-16  5:58             ` [PATCH v2] " Dongsheng Yang
2015-03-16  5:58               ` Dongsheng Yang
2015-03-03 11:18       ` [PATCH 3/3] btrfs: qgroup: fix a wrong parameter of no_quota Dongsheng Yang
2015-03-03 14:00         ` Josef Bacik
2015-03-03 20:20           ` Mark Fasheh
2015-03-16  4:59             ` Dongsheng Yang
2015-03-17 15:27               ` Dongsheng Yang

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=55066E71.3000402@cn.fujitsu.com \
    --to=yangds.fnst@cn.fujitsu.com \
    --cc=eguan@redhat.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.