xfs
[Top] [All Lists]

Re: SGI XFS on ppc

To: Thomas Graichen <graichen@xxxxxxxxxxxxx>, thomas.graichen@xxxxxxxxxxxxx
Subject: Re: SGI XFS on ppc
From: Steve Lord <lord@xxxxxxx>
Date: Mon, 07 Aug 2000 11:10:02 -0500
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: Message from Thomas Graichen <news-innominate.list.sgi.xfs@xxxxxxxxxxxxx> of "05 Aug 2000 14:00:09 GMT." <news2mail-8mh6l9$8ni$1@xxxxxxxxxxxxxxxxxxxxxx>
Sender: owner-linux-xfs-announce@xxxxxxxxxxx
> Thomas Graichen <graichen@xxxxxxxxxxxxx> wrote:
> 
> > ok - due to some response from the ppc-dev list it's a bug in the
> > ppc kernel implementation of the shifts and i have a patch for it
> > now which i'll try this evening and i expect xfs to run then fine
> > on the ppc ... lets see :-)
> 
> [one question before i begin: do you have interchanging filesystems
> on disk between irix/mips and linux/i386 working completely and
> without errors so far - so that one can expect the on disk layout
> to be completely portable and tested and use an i386 generated
> diskimage for other arches to test - what i do here ? - i think
> and hope so ...]

In theory this should be true - it is always possible there is a glitch
lurking out there somewhere. One issue might be how a specific architecture
lays out a structure in memory. We reply on the compiler to generate the
correct layout for on disk structures. For example, if you run

# gdb modules/xfs.o

you can do things like

(gdb) print sizeof(xfs_sb_t)
$1 = 200

This and other on disk structures need to come out the same size on
the ppc for things to work.

> 
> ok - now tried the fix for the ppc >32 shift bug and it now shifts
> correctly and thus it now also mounts fine with the original xlatesb
> with the shifts > 32 in it - so this problem is fixed now ... but
> if i try to write to the filesystem it crashes with
> 
>   XFS assertion failed: indlen > 0, file: xfs_bmap.c, line:4904

I do not think pagebuf tracing is going to help here (but thanks for
capturing them).

This assert is coming out of a very specific function.

                                indlen = (xfs_extlen_t)
                                        xfs_bmap_worst_indlen(ip, alen);
                                ASSERT(indlen > 0);

Instead of just calling ASSERT here, put in an explicit check for
indlen being less than zero, if it is then print out indlen and
alen, they are both unsigned 32 bit quantities (which makes the
assert somewhat bogus). However, indlen should not be huge, it is
supposed to be the worst case calculation of the amount of disk
space to hold alen of data (worst case metadata overhead).

Adding printk calls to xfs_bmap_worst_indlen would be the next step - it
is in xfs_bmap.c. Something in this function is probably the cause,
maybe mp->m_bmap_dmxr[0] or [1] is incorrectly initialized. Printing
out XFS_BM_MAXLEVELS(mp, XFS_DATA_FORK) would be useful too.

Steve

> 
> so - lets do this step by step:
> 
> what do i do: mount the xfs fs, cd into it and copy the one file (XFS)
> there to "test" - somewhere there it crashes
> 
> what i tried: i tried to get a full page_buf trace for this but ran
> into another problem - there seems to be so far no way to capture
> the traceoutput - klogd/syslog seems to loose some of the printk's
> (the XFS assertion failed does not even appear in it *) and also
> delays do not help here - because i don't have a serial port on an
> imac i can't capture it on a remote serial console - so the only
> way so far is to write it down from screen :-( (but i did it :-)
> 
> *) although it appears on the console screen ...
> 
> does anyone have an idea how to get all the kernel printk's definitely
> to somewhere (file or somehow remote or maybe redirecting the console
> or something like ...) ?
> 
> ok - lets go on: so that the kernel crash output does not trash
> the trace i removed the BUG() in assertfail and replaced it by
> an infinite loop so that i have time to type the trace from the
> screen - i did it in two ways: first reduced - only the events
> (this way a lot of them fit on screen) and later the last few
> trace entries complete - ok - here they are - i hope that is
> a good start (together with the used 32mb diskimage from
> 
>   http://innominate.org/~graichen/projects/xfs-pp/xfs.dd.gz
> 
> which is used here too) to reproduce the sequence for you and
> maybe get an idea by comparing the trace outputs - so now first
> the reduced output and then the full for the last entries
> 
> avl_ins
> look_pg
> get_obj
> TRANS_READ
> XFS_RELSE
> unlock
> rele
> free_obj
> free_lk
> freed_l
> lock
> locked
> XFS_PIN
> pin
> XFS_PIN
> pin
> XFS_PIN
> pin
> XFS_UNLOCK
> unlock
> rele
> delwri_q
> XFS_UNLOCK
> rele
> unlock
> delwri_q
> walkq1
> walkq1
> walkq1
> get
> look_pg
> iostart
> ioreq
> hold
> rele
> iowait
> done
> iowaited
> hold
> rele
> rele
> free_obj
> XFS assertion failed: indlen > 0, file: xfs_bmap.c, line:4904
> 
> ok and now the detailed one:
> 
> pb 0xc1d0d500 [iostart] (hold 1 lock 0) misc 0x00000001
>     address 0xc5871f04
>     offset 0x0 size 0x1000 task 0xc1840000
>     flags: READ MAPPED NONE ALL_PAGES_MAPPED MEM_ALLOCATED
> pb 0xc1d0d500 [ioreq] (hold 1 lock 0) misc 0x00000000
>     address 0xc586f958
>     offset 0x0 size 0x1000 task 0xc1840000
>     flags: READ MAPPED NONE ALL_PAGES_MAPPED MEM_ALLOCATED
> pb 0xc1d0d500 [hold] (hold 2 lock 0) misc 0x00000000
>     address 0xc5870908
>     offset 0x0 size 0x1000 task 0xc1840000
>     flags: READ MAPPED NONE ALL_PAGES_MAPPED MEM_ALLOCATED
> pb 0xc1d0d500 [rele] (hold 2 lock 0) misc 0x00000000
>     address 0xc5870a2c
>     offset 0x0 size 0x1000 task 0xc1840000
>     flags: READ MAPPED NONE ALL_PAGES_MAPPED MEM_ALLOCATED
> pb 0xc1d0d500 [iowait] (hold 1 lock 0) misc 0x00000000
>     address 0xc586f9ac
>     offset 0x0 size 0x1000 task 0xc1840000
>     flags: READ MAPPED NONE ALL_PAGES_MAPPED MEM_ALLOCATED
> pb 0xc1d0d500 [done] (hold 1 lock 0) misc 0x00000000
>     address 0xc586fc74
>     offset 0x0 size 0x1000 task 0xc01cfff0
>     flags: MAPPED ALL_PAGES_MAPPED MEM_ALLOCATED
> pb 0xc1d0d500 [iowaited] (hold 1 lock 0) misc 0x00000000
>     address 0xc586f9ac
>     offset 0x0 size 0x1000 task 0xc1840000
>     flags: MAPPED ALL_PAGES_MAPPED MEM_ALLOCATED
> pb 0xc1d0d500 [hold] (hold 2 lock 0) misc 0x00000000
>     address 0xc5870908
>     offset 0x0 size 0x1000 task 0xc1840000
>     flags: MAPPED ALL_PAGES_MAPPED MEM_ALLOCATED
> pb 0xc1d0d500 [rele] (hold 2 lock 0) misc 0x00000000
>     address 0xc5870a2c
>     offset 0x0 size 0x1000 task 0xc1840000
>     flags: MAPPED ALL_PAGES_MAPPED MEM_ALLOCATED
> pb 0xc1d0d500 [rele] (hold 1 lock 0) misc 0x00000000
>     address 0xc5871f24
>     offset 0x0 size 0x1000 task 0xc1840000
>     flags: MAPPED ALL_PAGES_MAPPED MEM_ALLOCATED
> pb 0xc1d0d500 [free_obj] (hold 1 lock 0) misc 0x00000000
>     address 0xc586f4b4
>     offset 0x0 size 0x1000 task 0xc1840000
>     flags: MAPPED ALL_PAGES_MAPPED MEM_ALLOCATED
> XFS assertion failed: indlen > 0, file: xfs_bmap.c, line:4904
> 
> ok - that is all for now - i hope this gets you to the right
> track somehow
> 
> a lot of thanks in advance
> 
> t
> -- 
> thomas.graichen@xxxxxxxxxxxxx
> Technical Director                                       innominate AG
> Clustering & Security                                networking people
> tel: +49.30.308806-13  fax: -77                   http://innominate.de



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