linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] shared/289: do not special-case ext3
@ 2015-04-27 11:34 Eryu Guan
  2015-04-27 15:18 ` Eric Sandeen
  2015-04-27 15:51 ` [PATCH v2] " Eryu Guan
  0 siblings, 2 replies; 4+ messages in thread
From: Eryu Guan @ 2015-04-27 11:34 UTC (permalink / raw)
  To: fstests; +Cc: esandeen, linux-ext4, Eryu Guan

Commit "3574531 xfstests: count journal size in test 289" makes ext3 a
special case, but now it's not the case anymore after kernel commit

e6d8fb3 ext3: Count internal journal as bsddf overhead in ext3_statfs

So just remove the special case, now test passes on both ext3 and ext4,
also ext3 driven by ext4 module.

Signed-off-by: Eryu Guan <eguan@redhat.com>
---
 tests/shared/289 | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/tests/shared/289 b/tests/shared/289
index c53d38c..96c949d 100755
--- a/tests/shared/289
+++ b/tests/shared/289
@@ -58,18 +58,7 @@ TOTAL_BLOCKS=`dumpe2fs -h $SCRATCH_DEV 2>/dev/null \
 FREE_BLOCKS=`dumpe2fs -h $SCRATCH_DEV 2>/dev/null \
 		| awk '/Free blocks:/{print $3}'`
 
-# ext3 doesn't count journal blocks as overhead, ext4 does.
-if [ $FSTYP = "ext3" ]; then
-	JOURNAL_SIZE=`dumpe2fs -h $SCRATCH_DEV 2>/dev/null \
-		| awk '/Journal size:/{print $3}' | _filter_size_to_bytes`
-	BLOCK_SIZE=`dumpe2fs -h $SCRATCH_DEV 2>/dev/null \
-		| awk '/Block size:/{print $3}'`
-	JOURNAL_BLOCKS=$(($JOURNAL_SIZE/$BLOCK_SIZE))
-else
-	JOURNAL_BLOCKS=0
-fi
-
-OVERHEAD=$(($TOTAL_BLOCKS-$FREE_BLOCKS-$JOURNAL_BLOCKS))
+OVERHEAD=$(($TOTAL_BLOCKS-$FREE_BLOCKS))
 
 #  bsddf|minixdf
 #         Set the behaviour  for  the  statfs  system  call.  The  minixdf
-- 
2.1.0

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

* Re: [PATCH] shared/289: do not special-case ext3
  2015-04-27 11:34 [PATCH] shared/289: do not special-case ext3 Eryu Guan
@ 2015-04-27 15:18 ` Eric Sandeen
  2015-04-27 15:44   ` Eryu Guan
  2015-04-27 15:51 ` [PATCH v2] " Eryu Guan
  1 sibling, 1 reply; 4+ messages in thread
From: Eric Sandeen @ 2015-04-27 15:18 UTC (permalink / raw)
  To: Eryu Guan, fstests; +Cc: linux-ext4

On 4/27/15 6:34 AM, Eryu Guan wrote:
> Commit "3574531 xfstests: count journal size in test 289" makes ext3 a
> special case, but now it's not the case anymore after kernel commit
> 
> e6d8fb3 ext3: Count internal journal as bsddf overhead in ext3_statfs
> 
> So just remove the special case, now test passes on both ext3 and ext4,
> also ext3 driven by ext4 module.

I think perhaps it was actually:

2046fd1 ext3: Count journal as bsddf overhead in ext3_statfs

(in v3.13) which changed the behavior; the commit you mention only
removes the overhead again for external journals, but your change
below looks fine.

Reviewed-by: Eric Sandeen <sandeen@redhat.com>


.> Signed-off-by: Eryu Guan <eguan@redhat.com>
> ---
>  tests/shared/289 | 13 +------------
>  1 file changed, 1 insertion(+), 12 deletions(-)
> 
> diff --git a/tests/shared/289 b/tests/shared/289
> index c53d38c..96c949d 100755
> --- a/tests/shared/289
> +++ b/tests/shared/289
> @@ -58,18 +58,7 @@ TOTAL_BLOCKS=`dumpe2fs -h $SCRATCH_DEV 2>/dev/null \
>  FREE_BLOCKS=`dumpe2fs -h $SCRATCH_DEV 2>/dev/null \
>  		| awk '/Free blocks:/{print $3}'`
>  
> -# ext3 doesn't count journal blocks as overhead, ext4 does.
> -if [ $FSTYP = "ext3" ]; then
> -	JOURNAL_SIZE=`dumpe2fs -h $SCRATCH_DEV 2>/dev/null \
> -		| awk '/Journal size:/{print $3}' | _filter_size_to_bytes`
> -	BLOCK_SIZE=`dumpe2fs -h $SCRATCH_DEV 2>/dev/null \
> -		| awk '/Block size:/{print $3}'`
> -	JOURNAL_BLOCKS=$(($JOURNAL_SIZE/$BLOCK_SIZE))
> -else
> -	JOURNAL_BLOCKS=0
> -fi
> -
> -OVERHEAD=$(($TOTAL_BLOCKS-$FREE_BLOCKS-$JOURNAL_BLOCKS))
> +OVERHEAD=$(($TOTAL_BLOCKS-$FREE_BLOCKS))
>  
>  #  bsddf|minixdf
>  #         Set the behaviour  for  the  statfs  system  call.  The  minixdf
> 

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

* Re: [PATCH] shared/289: do not special-case ext3
  2015-04-27 15:18 ` Eric Sandeen
@ 2015-04-27 15:44   ` Eryu Guan
  0 siblings, 0 replies; 4+ messages in thread
From: Eryu Guan @ 2015-04-27 15:44 UTC (permalink / raw)
  To: sandeen; +Cc: fstests, linux-ext4

On Mon, Apr 27, 2015 at 10:18:35AM -0500, Eric Sandeen wrote:
> On 4/27/15 6:34 AM, Eryu Guan wrote:
> > Commit "3574531 xfstests: count journal size in test 289" makes ext3 a
> > special case, but now it's not the case anymore after kernel commit
> > 
> > e6d8fb3 ext3: Count internal journal as bsddf overhead in ext3_statfs
> > 
> > So just remove the special case, now test passes on both ext3 and ext4,
> > also ext3 driven by ext4 module.
> 
> I think perhaps it was actually:
> 
> 2046fd1 ext3: Count journal as bsddf overhead in ext3_statfs
> 
> (in v3.13) which changed the behavior; the commit you mention only
> removes the overhead again for external journals, but your change
> below looks fine.

You're right, I pasted the wrong commit, I meant 2046fd1, will send v2.

> 
> Reviewed-by: Eric Sandeen <sandeen@redhat.com>

Thanks for the review!

Eryu
> 
> 
> .> Signed-off-by: Eryu Guan <eguan@redhat.com>
> > ---
> >  tests/shared/289 | 13 +------------
> >  1 file changed, 1 insertion(+), 12 deletions(-)
> > 
> > diff --git a/tests/shared/289 b/tests/shared/289
> > index c53d38c..96c949d 100755
> > --- a/tests/shared/289
> > +++ b/tests/shared/289
> > @@ -58,18 +58,7 @@ TOTAL_BLOCKS=`dumpe2fs -h $SCRATCH_DEV 2>/dev/null \
> >  FREE_BLOCKS=`dumpe2fs -h $SCRATCH_DEV 2>/dev/null \
> >  		| awk '/Free blocks:/{print $3}'`
> >  
> > -# ext3 doesn't count journal blocks as overhead, ext4 does.
> > -if [ $FSTYP = "ext3" ]; then
> > -	JOURNAL_SIZE=`dumpe2fs -h $SCRATCH_DEV 2>/dev/null \
> > -		| awk '/Journal size:/{print $3}' | _filter_size_to_bytes`
> > -	BLOCK_SIZE=`dumpe2fs -h $SCRATCH_DEV 2>/dev/null \
> > -		| awk '/Block size:/{print $3}'`
> > -	JOURNAL_BLOCKS=$(($JOURNAL_SIZE/$BLOCK_SIZE))
> > -else
> > -	JOURNAL_BLOCKS=0
> > -fi
> > -
> > -OVERHEAD=$(($TOTAL_BLOCKS-$FREE_BLOCKS-$JOURNAL_BLOCKS))
> > +OVERHEAD=$(($TOTAL_BLOCKS-$FREE_BLOCKS))
> >  
> >  #  bsddf|minixdf
> >  #         Set the behaviour  for  the  statfs  system  call.  The  minixdf
> > 
> 

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

* [PATCH v2] shared/289: do not special-case ext3
  2015-04-27 11:34 [PATCH] shared/289: do not special-case ext3 Eryu Guan
  2015-04-27 15:18 ` Eric Sandeen
@ 2015-04-27 15:51 ` Eryu Guan
  1 sibling, 0 replies; 4+ messages in thread
From: Eryu Guan @ 2015-04-27 15:51 UTC (permalink / raw)
  To: fstests; +Cc: linux-ext4, Eryu Guan

Commit "3574531 xfstests: count journal size in test 289" makes ext3 a
special case, but now it's not the case anymore after kernel commit

2046fd1 ext3: Count journal as bsddf overhead in ext3_statfs

So just remove the special case, now test passes on both ext3 and ext4,
also ext3 driven by ext4 module.

Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
---
v2:
- point to right kernel commit id in commit message

 tests/shared/289 | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/tests/shared/289 b/tests/shared/289
index c53d38c..96c949d 100755
--- a/tests/shared/289
+++ b/tests/shared/289
@@ -58,18 +58,7 @@ TOTAL_BLOCKS=`dumpe2fs -h $SCRATCH_DEV 2>/dev/null \
 FREE_BLOCKS=`dumpe2fs -h $SCRATCH_DEV 2>/dev/null \
 		| awk '/Free blocks:/{print $3}'`
 
-# ext3 doesn't count journal blocks as overhead, ext4 does.
-if [ $FSTYP = "ext3" ]; then
-	JOURNAL_SIZE=`dumpe2fs -h $SCRATCH_DEV 2>/dev/null \
-		| awk '/Journal size:/{print $3}' | _filter_size_to_bytes`
-	BLOCK_SIZE=`dumpe2fs -h $SCRATCH_DEV 2>/dev/null \
-		| awk '/Block size:/{print $3}'`
-	JOURNAL_BLOCKS=$(($JOURNAL_SIZE/$BLOCK_SIZE))
-else
-	JOURNAL_BLOCKS=0
-fi
-
-OVERHEAD=$(($TOTAL_BLOCKS-$FREE_BLOCKS-$JOURNAL_BLOCKS))
+OVERHEAD=$(($TOTAL_BLOCKS-$FREE_BLOCKS))
 
 #  bsddf|minixdf
 #         Set the behaviour  for  the  statfs  system  call.  The  minixdf
-- 
2.1.0

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

end of thread, other threads:[~2015-04-27 15:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-27 11:34 [PATCH] shared/289: do not special-case ext3 Eryu Guan
2015-04-27 15:18 ` Eric Sandeen
2015-04-27 15:44   ` Eryu Guan
2015-04-27 15:51 ` [PATCH v2] " Eryu Guan

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