summaryrefslogtreecommitdiffstats
path: root/fs/nls
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2016-03-15 11:42:46 +1100
committerDave Chinner <david@fromorbit.com>2016-03-15 11:42:46 +1100
commitb2706a05bad36c0a826493c6ba84c8a9caf8a3ae (patch)
treed6efbf12931b4b110a619203741c192e7a7cf4e0 /fs/nls
parent801cc4e17a34c32e1527827292fac9cec5d3393b (diff)
downloadblackbird-obmc-linux-b2706a05bad36c0a826493c6ba84c8a9caf8a3ae.tar.gz
blackbird-obmc-linux-b2706a05bad36c0a826493c6ba84c8a9caf8a3ae.zip
xfs: update freeblocks counter after extent deletion
xfs_bunmapi() currently updates the fdblocks counter, unreserves quota, etc. before the extent is deleted by xfs_bmap_del_extent(). The function has problems dividing up the indirect reserved blocks for scenarios where a single delalloc extent is split in two. Particularly, there aren't always enough blocks reserved for multiple extents in a single extent reservation. The solution to this problem is to allow the extent removal code to steal from the deleted extent to meet indirect reservation requirements. Move the block of code in xfs_bmapi() that updates the fdblocks counter to after the call to xfs_bmap_del_extent() to allow the codepath to update the extent record before the free blocks are accounted. Also, reshuffle the code slightly so the delalloc accounting occurs near the xfs_bmap_del_extent() call to provide context for the comments. Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/nls')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud