xfs
[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
transaction.

xfstests/118 reproduces the bug and tests the fix.

--Tim

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:
  longdrop.melbourne.sgi.com:/isms/xfs-kern/xfs-linux-melb


Modid:  xfs-linux-melb:xfs-kern:23594a
xfs_trans.h - 1.131 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_trans.h.diff?r1=text&tr1=1.131&r2=text&tr2=1.130&f=h
        - create xfs_trans_bhold_release prototype.

xfs_trans_buf.c - 1.121 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_trans_buf.c.diff?r1=text&tr1=1.121&r2=text&tr2=1.120&f=h
        - create xfs_trans_bhold_release.

quota/xfs_dquot.c - 1.18 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/quota/xfs_dquot.c.diff?r1=text&tr1=1.18&r2=text&tr2=1.17&f=h
        - 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
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_ksyms.c.diff?r1=text&tr1=1.26&r2=text&tr2=1.25&f=h
linux-2.4/xfs_ksyms.c - 1.22 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.4/xfs_ksyms.c.diff?r1=text&tr1=1.22&r2=text&tr2=1.21&f=h
        - 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 <=