]> git.baikalelectronics.ru Git - kernel.git/commit
[XFS] Fix transaction overrun during writeback.
authorDavid Chinner <dgc@sgi.com>
Fri, 23 Nov 2007 05:29:11 +0000 (16:29 +1100)
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Thu, 7 Feb 2008 07:15:55 +0000 (18:15 +1100)
commit445f650e802096d9e1fbe1e3dc5584b5bf86b6d7
tree320e3fcd98e8a17e250272c01c4518524ce255b0
parentf7f227d7dee4a3f10bfefd0cb3a181e7d35a612e
[XFS] Fix transaction overrun during writeback.

Prevent transaction overrun in xfs_iomap_write_allocate() if we race with
a truncate that overlaps the delalloc range we were planning to allocate.

If we race, we may allocate into a hole and that requires block
allocation. At this point in time we don't have a reservation for block
allocation (apart from metadata blocks) and so allocating into a hole
rather than a delalloc region results in overflowing the transaction block
reservation.

Fix it by only allowing a single extent to be allocated at a time.

SGI-PV: 972757
SGI-Modid: xfs-linux-melb:xfs-kern:30005a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
fs/xfs/xfs_iomap.c