xfs
[Top] [All Lists]

BUG 799747 - xfs_logprint doesn't grok external log footer

To: nb@xxxxxxx
Subject: BUG 799747 - xfs_logprint doesn't grok external log footer
From: pv@xxxxxxxxxxxxx (nathans@xxxxxxxxxxxx)
Date: Tue, 22 Aug 2000 19:36:24 -0700 (PDT)
Cc: linux-xfs@xxxxxxxxxxx
Reply-to: sgi.bugs.xfs@xxxxxxxxxxxxxxxxx
Sender: owner-linux-xfs@xxxxxxxxxxx
Webexec: webpvsubmit,PvProjectIncident
Webpv: wobbly.melbourne.sgi.com
View Incident: 
http://co-op.engr.sgi.com/BugWorks/code/bwxquery.cgi?search=Search&wlong=1&view_type=Bug&wi=799747

Submitter : nathans                   Submitter Domain : engr               
Assigned Engineer : nb                Assigned Domain : sgi.com             
Assigned Group : xfs-linux            Category : software                   
Customer Reported : F                 Priority : 4                          
Project : xfs-linux                   Status : open                         
Description :
So, I thought it would be a good idea to make absolutely
sure that the log zeroing code is working again - and it is.

However, it seems that with an external log device, logprint
thinks the log footer which mkfs writes at the end of the
log is bad-looking "data" and prints an error message.  This
problem exists in both the libsim (mkfs_xfs below) and libxfs
(/sbin/mkfs.xfs below) versions of mkfs.

In write_log_footer() the log footer seems to start with:
        0x70, 0x68, 0x69, 0x6c
as magic...


### external log, libxfs ###

11:32 nathans@troppo ~ 19> sudo ./devzero /dev/hda8 -1
Wrote 38146 x 4K blocks (value 0xffffffff)
11:34 nathans@troppo ~ 21> sudo /sbin/mkfs.xfs -f -l 
logdev=/dev/hda8,size=32000b -d name=/dev/hda7
meta-data=/dev/hda7              isize=256    agcount=8, agsize=31878 blks
data     =                       bsize=4096   blocks=255023, imaxpct=25
         =                       sunit=0      swidth=0 blks, unwritten=0
naming   =version 2              bsize=4096  
log      =/dev/hda8              bsize=4096   blocks=32000
realtime =none                   extsz=65536  blocks=0, rtextents=0
11:35 nathans@troppo ~ 23> sudo /usr/sbin/xfs_logprint /dev/hda7 -l /dev/hda8
xfs_logprint:
    data device: 0x307
    log file: "/dev/hda8" daddr: 0 length: 256000

Header 0x7068696c wanted 0xfeedbabe
xfs_logprint: after 255999 zeroed blocks
**********************************************************************
* ERROR: found data after zeroed blocks block=255999                 *
**********************************************************************
**********************************************************************
* ERROR: header cycle=1885890924  block=255999                       *
**********************************************************************
xfs_logprint: physical end of log
============================================================================
xfs_logprint: logical end of log
============================================================================


### external log, libsim ###

11:41 nathans@troppo ~ 37> sudo ./devzero /dev/hda8 -1
Wrote 38146 x 4K blocks (value 0xffffffff)
11:42 nathans@troppo ~ 38> sudo ./mkfs_xfs  -f -l logdev=/dev/hda8,size=32000b 
-d name=/dev/hda7
xfs: using dummy primary network address
meta-data=/dev/hda7              isize=256    agcount=8, agsize=31878 blks
data     =                       bsize=4096   blocks=255023, imaxpct=25
         =                       sunit=0      swidth=0 blks, unwritten=0
naming   =version 2              bsize=4096  
log      =/dev/hda8              bsize=4096   blocks=32000
realtime =none                   extsz=65536  blocks=0, rtextents=0
11:42 nathans@troppo ~ 39> sudo /usr/sbin/xfs_logprint /dev/hda7 -l /dev/hda8
xfs_logprint:
    data device: 0x307
    log file: "/dev/hda8" daddr: 0 length: 256000

Header 0x7068696c wanted 0xfeedbabe
xfs_logprint: after 255999 zeroed blocks
**********************************************************************
* ERROR: found data after zeroed blocks block=255999                 *
**********************************************************************
**********************************************************************
* ERROR: header cycle=1885890924  block=255999                       *
**********************************************************************
xfs_logprint: physical end of log
============================================================================
xfs_logprint: logical end of log
============================================================================
11:43 nathans@troppo ~ 40> 


### internal log, libsim ###  (this looks good)

12:07 nathans@troppo ~ 41> sudo ./devzero /dev/hda8 -1
Wrote 38146 x 4K blocks (value 0xffffffff)
12:08 nathans@troppo ~ 42> sudo ./mkfs_xfs -f /dev/hda8 
xfs: using dummy primary network address
meta-data=/dev/hda8              isize=256    agcount=8, agsize=4769 blks
data     =                       bsize=4096   blocks=38146, imaxpct=25
         =                       sunit=0      swidth=0 blks, unwritten=0
naming   =version 2              bsize=4096  
log      =internal log           bsize=4096   blocks=1200
realtime =none                   extsz=65536  blocks=0, rtextents=0
12:10 nathans@troppo ~ 43> sudo /usr/sbin/xfs_logprint /dev/hda8 
xfs_logprint:
    data device: 0x308
    log device: 0x308 daddr: 152640 length: 9600

xfs_logprint: skipped 9600 zeroed blocks
xfs_logprint: totally zeroed log
xfs_logprint: physical end of log
============================================================================
xfs_logprint: logical end of log
============================================================================


### internal log, libxfs ###  (this looks good too)

12:10 nathans@troppo ~ 44> sudo ./devzero /dev/hda8 -1
Wrote 38146 x 4K blocks (value 0xffffffff)
12:11 nathans@troppo ~ 45> sudo /sbin/mkfs.xfs /dev/hda8 
meta-data=/dev/hda8              isize=256    agcount=8, agsize=4769 blks
data     =                       bsize=4096   blocks=38146, imaxpct=25
         =                       sunit=0      swidth=0 blks, unwritten=0
naming   =version 2              bsize=4096  
log      =internal log           bsize=4096   blocks=1200
realtime =none                   extsz=65536  blocks=0, rtextents=0
12:11 nathans@troppo ~ 46> sudo /usr/sbin/xfs_logprint /dev/hda8 
xfs_logprint:
    data device: 0x308
    log device: 0x308 daddr: 152640 length: 9600

xfs_logprint: skipped 9600 zeroed blocks
xfs_logprint: totally zeroed log
xfs_logprint: physical end of log
============================================================================
xfs_logprint: logical end of log
============================================================================
12:11 nathans@troppo ~ 47>

<Prev in Thread] Current Thread [Next in Thread>
  • BUG 799747 - xfs_logprint doesn't grok external log footer, nathans@xxxxxxxxxxxx <=