diff options
author | Qu Wenruo <wqu@suse.com> | 2024-10-02 08:47:48 +0930 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2024-11-11 14:34:14 +0100 |
commit | 00c5135dceaf57b212a808444d719d321444c819 (patch) | |
tree | 975aaf107bf395ac4bb8fd2f45f0f6daf2f3c290 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | b628c139519ae0e5453e5327161a41bae966201d (diff) |
btrfs: remove the dirty_page local variable
Inside btrfs_buffered_write(), we have a local variable @dirty_pages,
recording the number of pages we dirtied in the current iteration.
However we do not really need that variable, since it can be calculated
from @pos and @copied.
In fact there is already a problem inside the short copy path, where we
use @dirty_pages to calculate the range we need to release.
But that usage assumes sectorsize == PAGE_SIZE, which is no longer true.
Instead of keeping @dirty_pages and cause incorrect usage, just
calculate the number of dirtied pages inside btrfs_dirty_pages().
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions