xfs
[Top] [All Lists]

PARTIAL TAKE 979606 - xfs bug in going from attr2 back to attr1

To: sgi.bugs.xfs@xxxxxxxxxxxx, xfs@xxxxxxxxxxx
Subject: PARTIAL TAKE 979606 - xfs bug in going from attr2 back to attr1
From: tes@xxxxxxx (Tim Shimmin)
Date: Mon, 14 Apr 2008 15:03:21 +1000 (EST)
Sender: xfs-bounce@xxxxxxxxxxx
Always use di_forkoff when checking for attr space.

In the case where we mount a filesystem which was previously
using the attr2 format as attr1, returning the default
mp->m_attroffset instead of the per-inode di_forkoff for
inline attribute fit calculations, may result in corruption.
For example, if the data fork is already taking more space
than the default fork offset and we try to add an extended attribute.
An example of this is tested by xfstests/186.

Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxxx>

Date:  Mon Apr 14 14:59:41 AEST 2008
Workarea:  chook.melbourne.sgi.com:/build/tes/2.6.x-xfs
Inspected by:  sandeen@xxxxxxxxxxx

The following file(s) were checked into:
  longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb


Modid:  xfs-linux-melb:xfs-kern:30861a
fs/xfs/xfs_attr_leaf.c - 1.110 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_attr_leaf.c.diff?r1=text&tr1=1.110&r2=text&tr2=1.109&f=h
        - Fix up xfs_attr_shortform_bytesfit() to return di_forkoff for attr1 
instead
          of m_attroffset, when we have a fit in the inode.
          Fix tested by xfstests/186.


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