diff options
author | Tao Ma <[email protected]> | 2012-01-12 17:20:33 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2012-01-12 20:13:12 -0800 |
commit | ae55e1aaa7e2e57e538cb98cf617f511c5dc4f73 (patch) | |
tree | 3f3981dd7617c656e7a6ba2f3a83a14637c63221 /tools/perf/scripts/python/check-perf-trace.py | |
parent | 45dac90f0ca7d9efeda8f3d416c808c71207bf20 (diff) |
fs/direct-io.c: calculate fs_count correctly in get_more_blocks()
In get_more_blocks(), we use dio_count to calcuate fs_count and do some
tricky things to increase fs_count if dio_count isn't aligned. But
actually it still has some corner cases that can't be coverd. See the
following example:
dio_write foo -s 1024 -w 4096
(direct write 4096 bytes at offset 1024). The same goes if the offset
isn't aligned to fs_blocksize.
In this case, the old calculation counts fs_count to be 1, but actually we
will write into 2 different blocks (if fs_blocksize=4096). The old code
just works, since it will call get_block twice (and may have to allocate
and create extents twice for filesystems like ext4). So we'd better call
get_block just once with the proper fs_count.
Signed-off-by: Tao Ma <[email protected]>
Cc: "Theodore Ts'o" <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Al Viro <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/check-perf-trace.py')
0 files changed, 0 insertions, 0 deletions