diff mbox series

xfs/029: filter out "extended-header: cycle: 1" from output

Message ID 1581922940-14074-1-git-send-email-xuyang2018.jy@cn.fujitsu.com (mailing list archive)
State New, archived
Headers show
Series xfs/029: filter out "extended-header: cycle: 1" from output | expand

Commit Message

Yang Xu Feb. 17, 2020, 7:02 a.m. UTC
When I test this case under GPT disklabel type, this case will fail,
as below:
cycle: 1        version: 2              lsn: 1,0        tail_lsn: 1,0
length of Log Record: 258048    prev offset: -1         num ops: 1

...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
extended-header: cycle: 1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...

my mkfs information as below:
meta-data=/dev/sda7              isize=512    agcount=16, agsize=327680 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=1, sparse=1, rmapbt=0
         =                       reflink=1
data     =                       bsize=4096   blocks=5242880, imaxpct=25
         =                       sunit=64     swidth=64 blks
naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
log      =internal log           bsize=4096   blocks=5184, version=2
         =                       sectsz=512   sunit=64 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0

It reports this info because xfs_logprint only read 32k header every time, so it
needs to read more times. We can filter this useless info.

Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
---
 tests/xfs/029 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Darrick J. Wong Feb. 19, 2020, 12:32 a.m. UTC | #1
On Mon, Feb 17, 2020 at 03:02:20PM +0800, Yang Xu wrote:
> When I test this case under GPT disklabel type, this case will fail,
> as below:
> cycle: 1        version: 2              lsn: 1,0        tail_lsn: 1,0
> length of Log Record: 258048    prev offset: -1         num ops: 1
> 
> ...
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> extended-header: cycle: 1
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ...
> 
> my mkfs information as below:
> meta-data=/dev/sda7              isize=512    agcount=16, agsize=327680 blks
>          =                       sectsz=512   attr=2, projid32bit=1
>          =                       crc=1        finobt=1, sparse=1, rmapbt=0
>          =                       reflink=1
> data     =                       bsize=4096   blocks=5242880, imaxpct=25
>          =                       sunit=64     swidth=64 blks
> naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
> log      =internal log           bsize=4096   blocks=5184, version=2
>          =                       sectsz=512   sunit=64 blks, lazy-count=1
> realtime =none                   extsz=4096   blocks=0, rtextents=0
> 
> It reports this info because xfs_logprint only read 32k header every time, so it
> needs to read more times. We can filter this useless info.
> 
> Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
> ---
>  tests/xfs/029 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/xfs/029 b/tests/xfs/029
> index f532a21b..99742792 100755
> --- a/tests/xfs/029
> +++ b/tests/xfs/029
> @@ -45,7 +45,7 @@ echo
>  _scratch_mkfs_xfs | _filter_mkfs 2>/dev/null
>  
>  echo
> -_scratch_xfs_logprint | _filter_logprint
> +_scratch_xfs_logprint | _filter_logprint | sed -e "/^~~~/d" -e "/extended-header/d"

Is there a reason not to add that to _filter_logprint?

--D

>  
>  status=0
>  exit
> -- 
> 2.18.0
> 
> 
>
Yang Xu Feb. 19, 2020, 1:27 a.m. UTC | #2
on 2020/02/19 8:32, Darrick J. Wong wrote:
> On Mon, Feb 17, 2020 at 03:02:20PM +0800, Yang Xu wrote:
>> When I test this case under GPT disklabel type, this case will fail,
>> as below:
>> cycle: 1        version: 2              lsn: 1,0        tail_lsn: 1,0
>> length of Log Record: 258048    prev offset: -1         num ops: 1
>>
>> ...
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> extended-header: cycle: 1
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> ...
>>
>> my mkfs information as below:
>> meta-data=/dev/sda7              isize=512    agcount=16, agsize=327680 blks
>>           =                       sectsz=512   attr=2, projid32bit=1
>>           =                       crc=1        finobt=1, sparse=1, rmapbt=0
>>           =                       reflink=1
>> data     =                       bsize=4096   blocks=5242880, imaxpct=25
>>           =                       sunit=64     swidth=64 blks
>> naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
>> log      =internal log           bsize=4096   blocks=5184, version=2
>>           =                       sectsz=512   sunit=64 blks, lazy-count=1
>> realtime =none                   extsz=4096   blocks=0, rtextents=0
>>
>> It reports this info because xfs_logprint only read 32k header every time, so it
>> needs to read more times. We can filter this useless info.
>>
>> Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
>> ---
>>   tests/xfs/029 | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/tests/xfs/029 b/tests/xfs/029
>> index f532a21b..99742792 100755
>> --- a/tests/xfs/029
>> +++ b/tests/xfs/029
>> @@ -45,7 +45,7 @@ echo
>>   _scratch_mkfs_xfs | _filter_mkfs 2>/dev/null
>>   
>>   echo
>> -_scratch_xfs_logprint | _filter_logprint
>> +_scratch_xfs_logprint | _filter_logprint | sed -e "/^~~~/d" -e "/extended-header/d"
> 
> Is there a reason not to add that to _filter_logprint?
I haven't mastered perl(never used). Can you add that to filter_logprint?

Best Regards
Yang Xu
> 
> --D
> 
>>   
>>   status=0
>>   exit
>> -- 
>> 2.18.0
>>
>>
>>
> 
>
Darrick J. Wong Feb. 19, 2020, 5:07 a.m. UTC | #3
On Wed, Feb 19, 2020 at 09:27:29AM +0800, Yang Xu wrote:
> 
> 
> on 2020/02/19 8:32, Darrick J. Wong wrote:
> > On Mon, Feb 17, 2020 at 03:02:20PM +0800, Yang Xu wrote:
> > > When I test this case under GPT disklabel type, this case will fail,
> > > as below:
> > > cycle: 1        version: 2              lsn: 1,0        tail_lsn: 1,0
> > > length of Log Record: 258048    prev offset: -1         num ops: 1
> > > 
> > > ...
> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > extended-header: cycle: 1
> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > ...
> > > 
> > > my mkfs information as below:
> > > meta-data=/dev/sda7              isize=512    agcount=16, agsize=327680 blks
> > >           =                       sectsz=512   attr=2, projid32bit=1
> > >           =                       crc=1        finobt=1, sparse=1, rmapbt=0
> > >           =                       reflink=1
> > > data     =                       bsize=4096   blocks=5242880, imaxpct=25
> > >           =                       sunit=64     swidth=64 blks
> > > naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
> > > log      =internal log           bsize=4096   blocks=5184, version=2
> > >           =                       sectsz=512   sunit=64 blks, lazy-count=1
> > > realtime =none                   extsz=4096   blocks=0, rtextents=0
> > > 
> > > It reports this info because xfs_logprint only read 32k header every time, so it
> > > needs to read more times. We can filter this useless info.
> > > 
> > > Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
> > > ---
> > >   tests/xfs/029 | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/tests/xfs/029 b/tests/xfs/029
> > > index f532a21b..99742792 100755
> > > --- a/tests/xfs/029
> > > +++ b/tests/xfs/029
> > > @@ -45,7 +45,7 @@ echo
> > >   _scratch_mkfs_xfs | _filter_mkfs 2>/dev/null
> > >   echo
> > > -_scratch_xfs_logprint | _filter_logprint
> > > +_scratch_xfs_logprint | _filter_logprint | sed -e "/^~~~/d" -e "/extended-header/d"
> > 
> > Is there a reason not to add that to _filter_logprint?
> I haven't mastered perl(never used). Can you add that to filter_logprint?

That helper function does not call perl.

--D

> Best Regards
> Yang Xu
> > 
> > --D
> > 
> > >   status=0
> > >   exit
> > > -- 
> > > 2.18.0
> > > 
> > > 
> > > 
> > 
> > 
> 
>
Yang Xu Feb. 19, 2020, 9:49 a.m. UTC | #4
on 2020/02/19 13:07, Darrick J. Wong wrote:
> On Wed, Feb 19, 2020 at 09:27:29AM +0800, Yang Xu wrote:
>>
>>
>> on 2020/02/19 8:32, Darrick J. Wong wrote:
>>> On Mon, Feb 17, 2020 at 03:02:20PM +0800, Yang Xu wrote:
>>>> When I test this case under GPT disklabel type, this case will fail,
>>>> as below:
>>>> cycle: 1        version: 2              lsn: 1,0        tail_lsn: 1,0
>>>> length of Log Record: 258048    prev offset: -1         num ops: 1
>>>>
>>>> ...
>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>> extended-header: cycle: 1
>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>> ...
>>>>
>>>> my mkfs information as below:
>>>> meta-data=/dev/sda7              isize=512    agcount=16, agsize=327680 blks
>>>>            =                       sectsz=512   attr=2, projid32bit=1
>>>>            =                       crc=1        finobt=1, sparse=1, rmapbt=0
>>>>            =                       reflink=1
>>>> data     =                       bsize=4096   blocks=5242880, imaxpct=25
>>>>            =                       sunit=64     swidth=64 blks
>>>> naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
>>>> log      =internal log           bsize=4096   blocks=5184, version=2
>>>>            =                       sectsz=512   sunit=64 blks, lazy-count=1
>>>> realtime =none                   extsz=4096   blocks=0, rtextents=0
>>>>
>>>> It reports this info because xfs_logprint only read 32k header every time, so it
>>>> needs to read more times. We can filter this useless info.
>>>>
>>>> Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
>>>> ---
>>>>    tests/xfs/029 | 2 +-
>>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/tests/xfs/029 b/tests/xfs/029
>>>> index f532a21b..99742792 100755
>>>> --- a/tests/xfs/029
>>>> +++ b/tests/xfs/029
>>>> @@ -45,7 +45,7 @@ echo
>>>>    _scratch_mkfs_xfs | _filter_mkfs 2>/dev/null
>>>>    echo
>>>> -_scratch_xfs_logprint | _filter_logprint
>>>> +_scratch_xfs_logprint | _filter_logprint | sed -e "/^~~~/d" -e "/extended-header/d"
>>>
>>> Is there a reason not to add that to _filter_logprint?
>> I haven't mastered perl(never used). Can you add that to filter_logprint?
> 
> That helper function does not call perl.
Hi Darrick
xfs/029 used itself filter_logprint(perl) not used common/log 
filter_logprint(sed) function. Do we should use common/log and change 
xfs/029.out? Also, common/log filter_logprint has considered "~~~" and 
"extended-header: cycle: 1" output.

Best Regards
Yang Xu
> 
> --D
> 
>> Best Regards
>> Yang Xu
>>>
>>> --D
>>>
>>>>    status=0
>>>>    exit
>>>> -- 
>>>> 2.18.0
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
> 
>
Darrick J. Wong Feb. 19, 2020, 10:09 p.m. UTC | #5
On Wed, Feb 19, 2020 at 05:49:30PM +0800, Yang Xu wrote:
> 
> on 2020/02/19 13:07, Darrick J. Wong wrote:
> > On Wed, Feb 19, 2020 at 09:27:29AM +0800, Yang Xu wrote:
> > > 
> > > 
> > > on 2020/02/19 8:32, Darrick J. Wong wrote:
> > > > On Mon, Feb 17, 2020 at 03:02:20PM +0800, Yang Xu wrote:
> > > > > When I test this case under GPT disklabel type, this case will fail,
> > > > > as below:
> > > > > cycle: 1        version: 2              lsn: 1,0        tail_lsn: 1,0
> > > > > length of Log Record: 258048    prev offset: -1         num ops: 1
> > > > > 
> > > > > ...
> > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > > > extended-header: cycle: 1
> > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > > > ...
> > > > > 
> > > > > my mkfs information as below:
> > > > > meta-data=/dev/sda7              isize=512    agcount=16, agsize=327680 blks
> > > > >            =                       sectsz=512   attr=2, projid32bit=1
> > > > >            =                       crc=1        finobt=1, sparse=1, rmapbt=0
> > > > >            =                       reflink=1
> > > > > data     =                       bsize=4096   blocks=5242880, imaxpct=25
> > > > >            =                       sunit=64     swidth=64 blks
> > > > > naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
> > > > > log      =internal log           bsize=4096   blocks=5184, version=2
> > > > >            =                       sectsz=512   sunit=64 blks, lazy-count=1
> > > > > realtime =none                   extsz=4096   blocks=0, rtextents=0
> > > > > 
> > > > > It reports this info because xfs_logprint only read 32k header every time, so it
> > > > > needs to read more times. We can filter this useless info.
> > > > > 
> > > > > Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
> > > > > ---
> > > > >    tests/xfs/029 | 2 +-
> > > > >    1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > 
> > > > > diff --git a/tests/xfs/029 b/tests/xfs/029
> > > > > index f532a21b..99742792 100755
> > > > > --- a/tests/xfs/029
> > > > > +++ b/tests/xfs/029
> > > > > @@ -45,7 +45,7 @@ echo
> > > > >    _scratch_mkfs_xfs | _filter_mkfs 2>/dev/null
> > > > >    echo
> > > > > -_scratch_xfs_logprint | _filter_logprint
> > > > > +_scratch_xfs_logprint | _filter_logprint | sed -e "/^~~~/d" -e "/extended-header/d"
> > > > 
> > > > Is there a reason not to add that to _filter_logprint?
> > > I haven't mastered perl(never used). Can you add that to filter_logprint?
> > 
> > That helper function does not call perl.
> Hi Darrick
> xfs/029 used itself filter_logprint(perl) not used common/log
> filter_logprint(sed) function.

<grumble> Ok, that function in xfs/029 shouldn't be prefixed with "_".

> Do we should use common/log and change
> xfs/029.out? Also, common/log filter_logprint has considered "~~~" and
> "extended-header: cycle: 1" output.

<shrug> I'm not much of a perl hacker either.

--D

> Best Regards
> Yang Xu
> > 
> > --D
> > 
> > > Best Regards
> > > Yang Xu
> > > > 
> > > > --D
> > > > 
> > > > >    status=0
> > > > >    exit
> > > > > -- 
> > > > > 2.18.0
> > > > > 
> > > > > 
> > > > > 
> > > > 
> > > > 
> > > 
> > > 
> > 
> > 
> 
>
Yang Xu Feb. 20, 2020, 2:11 a.m. UTC | #6
on 2020/02/20 6:09, Darrick J. Wong wrote:
> On Wed, Feb 19, 2020 at 05:49:30PM +0800, Yang Xu wrote:
>>
>> on 2020/02/19 13:07, Darrick J. Wong wrote:
>>> On Wed, Feb 19, 2020 at 09:27:29AM +0800, Yang Xu wrote:
>>>>
>>>>
>>>> on 2020/02/19 8:32, Darrick J. Wong wrote:
>>>>> On Mon, Feb 17, 2020 at 03:02:20PM +0800, Yang Xu wrote:
>>>>>> When I test this case under GPT disklabel type, this case will fail,
>>>>>> as below:
>>>>>> cycle: 1        version: 2              lsn: 1,0        tail_lsn: 1,0
>>>>>> length of Log Record: 258048    prev offset: -1         num ops: 1
>>>>>>
>>>>>> ...
>>>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>>>> extended-header: cycle: 1
>>>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>>>> ...
>>>>>>
>>>>>> my mkfs information as below:
>>>>>> meta-data=/dev/sda7              isize=512    agcount=16, agsize=327680 blks
>>>>>>             =                       sectsz=512   attr=2, projid32bit=1
>>>>>>             =                       crc=1        finobt=1, sparse=1, rmapbt=0
>>>>>>             =                       reflink=1
>>>>>> data     =                       bsize=4096   blocks=5242880, imaxpct=25
>>>>>>             =                       sunit=64     swidth=64 blks
>>>>>> naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
>>>>>> log      =internal log           bsize=4096   blocks=5184, version=2
>>>>>>             =                       sectsz=512   sunit=64 blks, lazy-count=1
>>>>>> realtime =none                   extsz=4096   blocks=0, rtextents=0
>>>>>>
>>>>>> It reports this info because xfs_logprint only read 32k header every time, so it
>>>>>> needs to read more times. We can filter this useless info.
>>>>>>
>>>>>> Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
>>>>>> ---
>>>>>>     tests/xfs/029 | 2 +-
>>>>>>     1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>>
>>>>>> diff --git a/tests/xfs/029 b/tests/xfs/029
>>>>>> index f532a21b..99742792 100755
>>>>>> --- a/tests/xfs/029
>>>>>> +++ b/tests/xfs/029
>>>>>> @@ -45,7 +45,7 @@ echo
>>>>>>     _scratch_mkfs_xfs | _filter_mkfs 2>/dev/null
>>>>>>     echo
>>>>>> -_scratch_xfs_logprint | _filter_logprint
>>>>>> +_scratch_xfs_logprint | _filter_logprint | sed -e "/^~~~/d" -e "/extended-header/d"
>>>>>
>>>>> Is there a reason not to add that to _filter_logprint?
>>>> I haven't mastered perl(never used). Can you add that to filter_logprint?
>>>
>>> That helper function does not call perl.
>> Hi Darrick
>> xfs/029 used itself filter_logprint(perl) not used common/log
>> filter_logprint(sed) function.
> 
> <grumble> Ok, that function in xfs/029 shouldn't be prefixed with "_".
also for xfs/044. I will fix that.
> 
>> Do we should use common/log and change
>> xfs/029.out? Also, common/log filter_logprint has considered "~~~" and
>> "extended-header: cycle: 1" output.
> 
> <shrug> I'm not much of a perl hacker either.
OK. I will think about this. Thanks

Best Regards
Yang Xu
> 
> --D
> 
>> Best Regards
>> Yang Xu
>>>
>>> --D
>>>
>>>> Best Regards
>>>> Yang Xu
>>>>>
>>>>> --D
>>>>>
>>>>>>     status=0
>>>>>>     exit
>>>>>> -- 
>>>>>> 2.18.0
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
> 
>
diff mbox series

Patch

diff --git a/tests/xfs/029 b/tests/xfs/029
index f532a21b..99742792 100755
--- a/tests/xfs/029
+++ b/tests/xfs/029
@@ -45,7 +45,7 @@  echo
 _scratch_mkfs_xfs | _filter_mkfs 2>/dev/null
 
 echo
-_scratch_xfs_logprint | _filter_logprint
+_scratch_xfs_logprint | _filter_logprint | sed -e "/^~~~/d" -e "/extended-header/d"
 
 status=0
 exit