xfs
[Top] [All Lists]

Re: 2.4.18-rc4-aa1 XFS oopses caused by cpio

To: svetljo <galia@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: 2.4.18-rc4-aa1 XFS oopses caused by cpio
From: Stephen Lord <lord@xxxxxxx>
Date: Fri, 08 Mar 2002 09:59:05 -0600
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-xfs@xxxxxxxxxxx
References: <1015580766.20800.3.camel@svetljo.st-peter.stw.uni-erlangen.de> <3C88B612.1070206@sgi.com> <3C88C9A1.5070502@st-peter.stw.uni-erlangen.de> <3C88CB1C.90203@sgi.com>
Sender: owner-linux-xfs@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011226
Stephen Lord wrote:


Ah, so you ran growfs on the filesystem, thats the key here. It looks like the new code
does not handle growfs correctly, the structure which is null is not allocated in the
expansion case. I should have a fix shortly.


Steve

Hi,

Can you try and repeat with this patch, it should apply reasonably cleanly to the aa tree.

Steve


===========================================================================
Index: linux/fs/xfs/xfs_alloc.c
===========================================================================

2234a2235,2236
>               pag->pagb_list = kmem_zalloc(XFS_PAGB_NUM_SLOTS *
>                                       sizeof(xfs_perag_busy_t), KM_SLEEP);

===========================================================================
Index: linux/fs/xfs/xfs_mount.c
===========================================================================

151,152c151,153
<                       kmem_free(mp->m_perag[agno].pagb_list,
<                         sizeof(xfs_perag_busy_t) * XFS_PAGB_NUM_SLOTS);
---
>                       if (mp->m_perag[agno].pagb_list)
>                               kmem_free(mp->m_perag[agno].pagb_list,
>                                 sizeof(xfs_perag_busy_t) * 
> XFS_PAGB_NUM_SLOTS);
877,881d877
<       for (agno = 0; agno < sbp->sb_agcount; agno++) {
<               mp->m_perag[agno].pagb_count = 0;
<               mp->m_perag[agno].pagb_list = kmem_zalloc(XFS_PAGB_NUM_SLOTS *
<                                       sizeof(xfs_perag_busy_t), KM_SLEEP);
<       }
1066,1067c1062,1064
<               kmem_free(mp->m_perag[agno].pagb_list,
<                 sizeof(xfs_perag_busy_t) * XFS_PAGB_NUM_SLOTS);
---
>               if (mp->m_perag[agno].pagb_list)
>                       kmem_free(mp->m_perag[agno].pagb_list,
>                         sizeof(xfs_perag_busy_t) * XFS_PAGB_NUM_SLOTS);
<Prev in Thread] Current Thread [Next in Thread>