summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/exported-sql-viewer.py
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2022-03-30 17:31:06 +0300
committerDavid Sterba <dsterba@suse.com>2022-05-16 18:03:11 +0300
commit619104ba453ad0965660d643f64ffbeb721906f5 (patch)
tree5d3a2354640d652579d1510c3e66b574dafeb473 /tools/perf/scripts/python/exported-sql-viewer.py
parent395cb57e85604715110bc28bd51bdf532394b68d (diff)
downloadlinux-619104ba453ad0965660d643f64ffbeb721906f5.tar.xz
btrfs: move common NOCOW checks against a file extent into a helper
Verifying if we can do a NOCOW write against a range fully or partially covered by a file extent item requires verifying several constraints, and these are currently duplicated at two different places: can_nocow_extent() and run_delalloc_nocow(). This change moves those checks into a common helper function to avoid duplication. It adds some comments and also preserves all existing behaviour like for example can_nocow_extent() treating errors from the calls to btrfs_cross_ref_exist() and csum_exist_in_range() as meaning we can not NOCOW, instead of propagating the error back to the caller. That specific behaviour is questionable but also reasonable to some degree. 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