summaryrefslogtreecommitdiff
path: root/fs/btrfs/tests
diff options
context:
space:
mode:
authorChris Mason <clm@fb.com>2015-09-19 18:28:25 (GMT)
committerChris Mason <clm@fb.com>2016-06-03 19:32:34 (GMT)
commit8dff9c85341032767d7b519217a79ea04cd676b0 (patch)
treefb6fada259a38e9eb68660b4f0e3376714b890d4 /fs/btrfs/tests
parentf881dd29bf31fb9e8072a3a47c834fa804f7d249 (diff)
downloadlinux-8dff9c85341032767d7b519217a79ea04cd676b0.tar.xz
Btrfs: deal with duplciates during extent_map insertion in btrfs_get_extent
When dealing with inline extents, btrfs_get_extent will incorrectly try to insert a duplicate extent_map. The dup hits -EEXIST from add_extent_map, but then we try to merge with the existing one and end up trying to insert a zero length extent_map. This actually works most of the time, except when there are extent maps past the end of the inline extent. rocksdb will trigger this sometimes because it preallocates an extent and then truncates down. Josef made a script to trigger with xfs_io: #!/bin/bash xfs_io -f -c "pwrite 0 1000" inline xfs_io -c "falloc -k 4k 1M" inline xfs_io -c "pread 0 1000" -c "fadvise -d 0 1000" -c "pread 0 1000" inline xfs_io -c "fadvise -d 0 1000" inline cat inline You'll get EIOs trying to read inline after this because add_extent_map is returning EEXIST Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/tests')
0 files changed, 0 insertions, 0 deletions