summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/exported-sql-viewer.py
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2022-03-15 18:22:36 +0300
committerDavid Sterba <dsterba@suse.com>2022-05-16 18:03:09 +0300
commit831e1ee60216534c54f2e240f9586d6cfe29b1c2 (patch)
treeb09d3c34a9c16abde410cf6b5da7eb2f638be6a1 /tools/perf/scripts/python/exported-sql-viewer.py
parent47e1d1c7bb35ccf1d327ddcfaf59b268c8770159 (diff)
downloadlinux-831e1ee60216534c54f2e240f9586d6cfe29b1c2.tar.xz
btrfs: remove useless dio wait call when doing fallocate zero range
When starting a fallocate zero range operation, before getting the first extent map for the range, we make a call to inode_dio_wait(). This logic was needed in the past because direct IO writes within the i_size boundary did not take the inode's VFS lock. This was because that lock used to be a mutex, then some years ago it was switched to a rw semaphore (by commit 9902af79c01a8e ("parallel lookups: actual switch to rwsem")), and then btrfs was changed to take the VFS inode's lock in shared mode for writes that don't cross the i_size boundary (done in commit e9adabb9712ef9 ("btrfs: use shared lock for direct writes within EOF")). The lockless direct IO writes could result in a race with the zero range operation, resulting in the later getting a stale extent map for the range. So remove this no longer needed call to inode_dio_wait(), as fallocate takes the inode's VFS lock in exclusive mode and direct IO writes within i_size take that same lock in shared mode. Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions