xfs
[Top] [All Lists]

ADD 801063 - mkfs.xfs after having ext2 mounted on a device can fail

To: nathans@xxxxxxxxxxxx
Subject: ADD 801063 - mkfs.xfs after having ext2 mounted on a device can fail
From: pv@xxxxxxxxxxxxx (nathans@xxxxxxxxxxxx)
Date: Wed, 6 Sep 2000 20:56:41 -0700 (PDT)
Cc: linux-xfs@xxxxxxxxxxx
Reply-to: sgi.bugs.xfs@xxxxxxxxxxxxxxxxx
Sender: owner-linux-xfs@xxxxxxxxxxx
Webexec: webpvupdate,pvincident
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=801063

 Status : open                         Priority : 3                         
 Assigned Engineer : nathans           Submitter : lord                     
*Modified User : nathans              *Modified User Domain : engr          
*Description :
Running mkfs to build an xfs filesystem after a partition has
been mounted as ext2 has periodically failed for me. The failure
is usually this:

[root@lord /]# mkfs -t xfs -f -l size=16000b /dev/sda4
meta-data=/dev/sda4              isize=256    agcount=8, agsize=149104 blks
data     =                       bsize=4096   blocks=1192826, imaxpct=25
         =                       sunit=0      swidth=0 blks, unwritten=0
naming   =version 2              bsize=4096  
log      =internal log           bsize=4096   blocks=16000

.....


==========================
ADDITIONAL INFORMATION (ADD)
From: nathans@engr (BugWorks)
Date: Sep 06 2000 08:56:40PM
==========================

Steve,

Are you using tools built with -DDEBUG defined?

There's an ASSERT in libxfs/rdwr.c, line 248, which I would have
expected to have been tripped here ... a core file would be quite
handy to diagnose this.  I've added a couple more asserts (around
lseeks) as well now, just in case.

If you see this again & you get a good dump, pls send me a pointer
to the binary & core file - I haven't been able to reproduce it at
all.


Seeing all the zeroes in the strace write line, I'd guess we're failing
at one of (in xfs_mkfs.c):

- line 1804  (touch last block, make fs the right size if it's a file)
OR
- line 1813  (splat a bunch of zeroes over the last potential EFS SB)
this second one could probably be removed anyway?

BUT, from your fdisk & strace output, we seek to byte offset:
        4885815296 ( / 1024  =  4771304 blocks )

+ fdisk tells us we have 4771305 blocks on sda4,

+ strace tells us we're writing 512 bytes, and that the
lseek to the start of block 4771304 didn't fail;

... which all seems very much above board to me, so at the moment
I'd suspect a driver bug (maybe an off by one somewhere?) causing
a bad errno to be returned from the kernel.

cheers.

<Prev in Thread] Current Thread [Next in Thread>