summaryrefslogtreecommitdiffstats
path: root/fs/ext3/xattr_trusted.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2012-04-23 15:58:57 +1000
committerBen Myers <bpm@sgi.com>2012-05-14 16:20:53 -0500
commitbc4010ecb8f4d4316e1a63a879a2715e49d113ad (patch)
tree82d3f15ae571a2c46a9e2a2a44511db71a4fb732 /fs/ext3/xattr_trusted.c
parentaa5c158ec97bd4014f47a2bc0150fb6b20e6c48b (diff)
xfs: use iolock on XFS_IOC_ALLOCSP calls
fsstress has a particular effective way of stopping debug XFS kernels. We keep seeing assert failures due finding delayed allocation extents where there should be none. This shows up when extracting extent maps and we are holding all the locks we should be to prevent races, so this really makes no sense to see these errors. After checking that fsstress does not use mmap, it occurred to me that fsstress uses something that no sane application uses - the XFS_IOC_ALLOCSP ioctl interfaces for preallocation. These interfaces do allocation of blocks beyond EOF without using preallocation, and then call setattr to extend and zero the allocated blocks. THe problem here is this is a buffered write, and hence the allocation is a delayed allocation. Unlike the buffered IO path, the allocation and zeroing are not serialised using the IOLOCK. Hence the ALLOCSP operation can race with operations holding the iolock to prevent buffered IO operations from occurring. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mark Tinguely <tinguely@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/ext3/xattr_trusted.c')
0 files changed, 0 insertions, 0 deletions