diff mbox

xfstests: fix set-default test in btrfs/001

Message ID 1379537307-21681-1-git-send-email-jbacik@fusionio.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Josef Bacik Sept. 18, 2013, 8:48 p.m. UTC
We were actually testing this improperly, there was a bug in the set default
code so we weren't actually honoring the 0 subvolid properly.  To fix this we
need to get the subvolid for the subvol we want to set as the default and use
that in the command.  With this patch we now pass again with the fix for the 0
subvolid.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
---
 tests/btrfs/001 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

David Sterba Sept. 19, 2013, 1:30 p.m. UTC | #1
On Wed, Sep 18, 2013 at 04:48:27PM -0400, Josef Bacik wrote:
> We were actually testing this improperly, there was a bug in the set default
> code so we weren't actually honoring the 0 subvolid properly.  To fix this we
> need to get the subvolid for the subvol we want to set as the default and use
> that in the command.  With this patch we now pass again with the fix for the 0
> subvolid.  Thanks,
> 
> Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Tested-by: David Sterba <dsterba@suse.cz>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rich Johnston Oct. 16, 2013, 7:56 p.m. UTC | #2
As it was tested by David Sterba

Lokks good

Reviewed-by: Rich Johnston <rjohnston@sgi.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rich Johnston Oct. 16, 2013, 7:59 p.m. UTC | #3
This has been committed.

Thanks
--Rich

commit d4bc9576f09992dfc76eb34bb1aca3e80eaee1e7
Author: Josef Bacik <jbacik@fusionio.com>
Date:   Wed Sep 18 20:48:27 2013 +0000

     xfstests: fix set-default test in btrfs/001

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/tests/btrfs/001 b/tests/btrfs/001
index 9aa2431..c05d772 100755
--- a/tests/btrfs/001
+++ b/tests/btrfs/001
@@ -77,7 +77,8 @@  ls $SCRATCH_MNT/subvol
 echo "Creating file bar in subvol"
 dd if=/dev/zero of=$SCRATCH_MNT/subvol/bar bs=1M count=1 &> /dev/null
 echo "Setting subvol to the default"
-$BTRFS_UTIL_PROG subvolume set-default 0 $SCRATCH_MNT/subvol | _filter_scratch
+subvolid=$(_btrfs_get_subvolid $SCRATCH_MNT subvol)
+$BTRFS_UTIL_PROG subvolume set-default $subvolid $SCRATCH_MNT | _filter_scratch
 _scratch_remount
 echo "List root dir which is now subvol"
 ls $SCRATCH_MNT