linux/fs/gfs2
Andreas Gruenbacher 49edd5bf42 gfs2: Fixes to "Implement iomap for block_map"
It turns out that commit 3974320ca6 "Implement iomap for block_map"
introduced a few bugs that trigger occasional failures with xfstest
generic/476:

In gfs2_iomap_begin, we jump to do_alloc when we determine that we are
beyond the end of the allocated metadata (height > ip->i_height).
There, we can end up calling hole_size with a metapath that doesn't
match the current metadata tree, which doesn't make sense.  After
untangling the code at do_alloc, fix this by checking if the block we
are looking for is within the range of allocated metadata.

In addition, add a BUG() in case gfs2_iomap_begin is accidentally called
for reading stuffed files: this is handled separately.  Make sure we
don't truncate iomap->length for reads beyond the end of the file; in
that case, the entire range counts as a hole.

Finally, revert to taking a bitmap write lock when doing allocations.
It's unclear why that change didn't lead to any failures during testing.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
2018-02-13 13:38:10 -07:00
..
Kconfig gfs2: Fix the crc32c dependency 2018-02-01 11:25:31 -07:00
Makefile
acl.c
acl.h
aops.c GFS2: Log the reason for log flushes in every log header 2018-01-23 07:39:20 -07:00
bmap.c gfs2: Fixes to "Implement iomap for block_map" 2018-02-13 13:38:10 -07:00
bmap.h gfs2: Implement fallocate(FALLOC_FL_PUNCH_HOLE) 2018-01-18 21:15:58 +01:00
dentry.c
dir.c gfs2: Add gfs2_max_stuffed_size 2018-01-18 14:18:53 -07:00
dir.h
export.c
file.c GFS2: Log the reason for log flushes in every log header 2018-01-23 07:39:20 -07:00
gfs2.h
glock.c gfs2: Glock dump performance regression fix 2018-02-01 11:27:11 -07:00
glock.h
glops.c GFS2: Log the reason for log flushes in every log header 2018-01-23 07:39:20 -07:00
glops.h
incore.h gfs2: Get rid of gfs2_log_header_in 2018-01-22 07:06:15 -07:00
inode.c GFS2: Don't try to end a non-existent transaction in unlink 2018-01-29 10:00:23 -07:00
inode.h
lock_dlm.c gfs2: Add a few missing newlines in messages 2018-01-30 10:32:30 -07:00
log.c GFS2: Log the reason for log flushes in every log header 2018-01-23 07:39:20 -07:00
log.h GFS2: Introduce new gfs2_log_header_v2 2018-01-23 07:38:53 -07:00
lops.c GFS2: Fix minor comment typo 2018-01-25 10:18:06 -07:00
lops.h GFS2: Introduce new gfs2_log_header_v2 2018-01-23 07:38:53 -07:00
main.c
meta_io.c
meta_io.h
ops_fstype.c GFS2: Log the reason for log flushes in every log header 2018-01-23 07:39:20 -07:00
quota.c GFS2: Log the reason for log flushes in every log header 2018-01-23 07:39:20 -07:00
quota.h
recovery.c GFS2: Introduce new gfs2_log_header_v2 2018-01-23 07:38:53 -07:00
recovery.h
rgrp.c gfs2: Add a few missing newlines in messages 2018-01-30 10:32:30 -07:00
rgrp.h
super.c gfs2: Remove inode from ordered write list in gfs2_write_inode() 2018-01-30 10:00:27 -07:00
super.h
sys.c gfs2: Add a few missing newlines in messages 2018-01-30 10:32:30 -07:00
sys.h
trace_gfs2.h GFS2: Log the reason for log flushes in every log header 2018-01-23 07:39:20 -07:00
trans.c GFS2: Log the reason for log flushes in every log header 2018-01-23 07:39:20 -07:00
trans.h
util.c
util.h
xattr.c
xattr.h