summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2019-10-15 18:42:17 +0300
committerDavid Sterba <dsterba@suse.com>2019-11-18 17:51:46 +0100
commit01f0f9da9dc8b4d60921af92bc9329a1eb2fa8e0 (patch)
treead87c2ac27d704b03e9c2bb92ae01a1ce798b87d /tools/perf/scripts/python
parent16ad3be1752a7b8ea18f0f97e8383fec0e470e7c (diff)
btrfs: Cleanup and simplify find_newest_super_backup
Backup roots are always written in a circular manner. By definition we can only ever have 1 backup root whose generation equals to that of the superblock. Hence, the 'if' in the for loop will trigger at most once. This is sufficient to return the newest backup root. Furthermore the newest_gen parameter is always set to the generation of the superblock. This value can be obtained from the fs_info. This patch removes the unnecessary code dealing with the wraparound case and makes 'newest_gen' a local variable. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions