summaryrefslogtreecommitdiff
path: root/usr
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2024-01-31 20:18:04 +0300
committerDavid Sterba <dsterba@suse.com>2024-02-13 20:36:35 +0300
commitfeefe1f49d26bad9d8997096e3a200280fa7b1c5 (patch)
treebeebaee9d360b2b4f399dae22c2f887c071616f0 /usr
parent12c5128f101bfa47a08e4c0e1a75cfa2d0872bcd (diff)
downloadlinux-feefe1f49d26bad9d8997096e3a200280fa7b1c5.tar.xz
btrfs: don't reserve space for checksums when writing to nocow files
Currently when doing a write to a file we always reserve metadata space for inserting data checksums. However we don't need to do it if we have a nodatacow file (-o nodatacow mount option or chattr +C) or if checksums are disabled (-o nodatasum mount option), as in that case we are only adding unnecessary pressure to metadata reservations. For example on x86_64, with the default node size of 16K, a 4K buffered write into a nodatacow file is reserving 655360 bytes of metadata space, as it's accounting for checksums. After this change, which stops reserving space for checksums if we have a nodatacow file or checksums are disabled, we only need to reserve 393216 bytes of metadata. CC: stable@vger.kernel.org # 6.1+ Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'usr')
0 files changed, 0 insertions, 0 deletions