aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_trans.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2011-01-27 12:18:18 +1100
committerAlex Elder <aelder@sgi.com>2011-01-28 09:05:36 -0600
commit5315837daee7ed76c31ef643915f7d76ef8c1aa3 (patch)
treede92499a896cc5d6702be364c9c3339641d3ed93 /fs/xfs/xfs_trans.c
parentxfs: prevent extsize alignment from exceeding maximum extent size (diff)
downloadlinux-dev-5315837daee7ed76c31ef643915f7d76ef8c1aa3.tar.xz
linux-dev-5315837daee7ed76c31ef643915f7d76ef8c1aa3.zip
xfs: limit extsize to size of AGs and/or MAXEXTLEN
The extent size hint can be set to larger than an AG. This means that the alignment process can push the range to be allocated outside the bounds of the AG, resulting in assert failures or corrupted bmbt records. Similarly, if the extsize is larger than the maximum extent size supported, the alignment process will produce extents that are too large to fit into the bmbt records, resulting in a different type of assert/corruption failure. Fix this by limiting extsize at the time іt is set firstly to be less than MAXEXTLEN, then to be a maximum of half the size of the AGs in the filesystem for non-realtime inodes. Realtime inodes do not allocate out of AGs, so don't have to be restricted by the size of AGs. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_trans.c')
0 files changed, 0 insertions, 0 deletions