aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorLiu Bo <bo.li.liu@oracle.com>2016-12-01 16:01:02 -0500
committerDavid Sterba <dsterba@suse.com>2017-02-14 09:50:57 -0500
commit19fd2df5b1167eeb6ae8912cdfe9532e3b2c8bbe (patch)
tree10c1a429ce6b3c8d4ca97c54bcf11856db51cc86 /tools/perf/scripts/python/stackcollapse.py
parentf85b7379cd76ad25590c4059299b018eac6fbc50 (diff)
Btrfs: fix btrfs_ordered_update_i_size to update disk_i_size properly
btrfs_ordered_update_i_size can be called by truncate and endio, but only endio takes ordered_extent which contains the completed IO. while truncating down a file, if there are some in-flight IOs, btrfs_ordered_update_i_size in endio will set disk_i_size to @orig_offset that is zero. If truncating-down fails somehow, we try to recover in memory isize with this zero'd disk_i_size. Fix it by only updating disk_i_size with @orig_offset when btrfs_ordered_update_i_size is not called from endio while truncating down and waiting for in-flight IOs completing their work before recover in-memory size. Besides fixing the above issue, add an assertion for last_size to double check we truncate down to the desired size. Signed-off-by: Liu Bo <bo.li.liu@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions