[XFS] In actual allocation of file system blocks and freeing extents, the
commitd210a28cd851082cec9b282443f8cc0e6fc09830
authorYingping Lu <yingping@sgi.com>
Fri, 9 Jun 2006 04:55:18 +0000 (9 14:55 +1000)
committerNathan Scott <nathans@sgi.com>
Fri, 9 Jun 2006 04:55:18 +0000 (9 14:55 +1000)
tree77b8c843d4cb7e6095b607570c5fd16702e50592
parentd3446eac3f50dade2f09ed212b112609ee78fb33
[XFS] In actual allocation of file system blocks and freeing extents, the
transaction within each such operation may involve multiple locking of AGF
buffer. While the freeing extent function has sorted the extents based on
AGF number before entering into transaction, however, when the file system
space is very limited, the allocation of space would try every AGF to get
space allocated, this could potentially cause out-of-order locking, thus
deadlock could happen. This fix mitigates the scarce space for allocation
by setting aside a few blocks without reservation, and avoid deadlock by
maintaining ascending order of AGF locking.

SGI-PV: 947395
SGI-Modid: xfs-linux-melb:xfs-kern:210801a

Signed-off-by: Yingping Lu <yingping@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
fs/xfs/xfs_alloc.c
fs/xfs/xfs_alloc.h
fs/xfs/xfs_bmap.c
fs/xfs/xfs_bmap_btree.c
fs/xfs/xfs_mount.c