summaryrefslogtreecommitdiff
path: root/Documentation/controllers/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorDave Chen <davechen@synology.com>2026-03-30 11:31:48 +0800
committerDavid Sterba <dsterba@suse.com>2026-04-07 19:43:22 +0200
commite0dfaebb8f4a1de59a8b805d600e3b662b235efc (patch)
tree66b667b91fc7fc904d40c4a79f6c205f7588cc76 /Documentation/controllers/git@git.tavy.me:linux.git
parente70e3f858e084aee34a2206e5f4dd49a47673f6a (diff)
btrfs: skip clearing EXTENT_DEFRAG for NOCOW ordered extents
In btrfs_finish_one_ordered(), clear_bits is unconditionally initialized with EXTENT_DEFRAG. For NOCOW ordered extents this is always a no-op because should_nocow() already forces the COW path when EXTENT_DEFRAG is set, so a NOCOW ordered extent can never have EXTENT_DEFRAG on its range. Although harmless, the unconditional btrfs_clear_extent_bit() call still performs a cold rbtree lookup under the io tree spinlock on every NOCOW write completion. Avoid this by only adding EXTENT_DEFRAG to clear_bits for non-NOCOW ordered extents, and skip the call entirely when there are no bits to clear. Signed-off-by: Dave Chen <davechen@synology.com> Signed-off-by: Robbie Ko <robbieko@synology.com> Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'Documentation/controllers/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions