[Top] [All Lists]

TAKE 940366 - panic in xfs_trans_brelse in quota code

To: linux-xfs@xxxxxxxxxxx, sgi.bugs.xfs@xxxxxxxxxxxx
Subject: TAKE 940366 - panic in xfs_trans_brelse in quota code
From: Timothy Shimmin <tes@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 23 Aug 2005 15:57:48 +1000 (EST)
Sender: linux-xfs-bounce@xxxxxxxxxxx
Please apply if you mount with quotas on XFS.

This has been seen as a panic in xfs_trans_brelse() being called
from xfs quota code. On a debug kernel, an assertion will fire off.
It typically happens during a chown on a file - presumably to a userid
which quotas have not seen before and causes a gap in the quota
file to be filled.


Fixes a bug in the quota code when allocating a new dquot record which
can cause an extent hole to be filled and a free extent to be processed.
In this case, we make a few mistakes: forget to pass back the transaction,
forget to put a hold on the buffer and forget to add the buf to the new

xfstests/118 reproduces the bug and tests the fix.


Date:  Tue Aug 23 15:47:26 AEST 2005
Workarea:  snort.melbourne.sgi.com:/home/tes/isms/xfs-linux-test2
Inspected by:  dgc@xxxxxxx

The following file(s) were checked into:

Modid:  xfs-linux-melb:xfs-kern:23594a
xfs_trans.h - 1.131 - changed
        - create xfs_trans_bhold_release prototype.

xfs_trans_buf.c - 1.121 - changed
        - create xfs_trans_bhold_release.

quota/xfs_dquot.c - 1.18 - changed
        - In allocation of quota records, if the bmap returns free extents then
          xfs_bmap_finish will create a new transaction to process them.
          We need to pass this transaction back, put a hold on the buffer
          and join the buffer to the new transaction.

linux-2.6/xfs_ksyms.c - 1.26 - changed
linux-2.4/xfs_ksyms.c - 1.22 - changed
        - Export 3 trans buffer functions needed by the quota code.

<Prev in Thread] Current Thread [Next in Thread>
  • TAKE 940366 - panic in xfs_trans_brelse in quota code, Timothy Shimmin <=