linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Rework the worst case calculations for space reservation
@ 2019-08-16 15:05 Josef Bacik
  2019-08-16 15:05 ` [PATCH 1/3] btrfs: rename the btrfs_calc_*_metadata_size helpers Josef Bacik
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Josef Bacik @ 2019-08-16 15:05 UTC (permalink / raw)
  To: linux-btrfs, kernel-team

We have two worst case calculations for space reservation, one that takes into
account splitting at every level when cow'ing down the btree, and another that
doesn't account for splitting at all.  The first is used everywhere, and the
second is used mostly for truncate.

However we also do not split when we're only changing an item, so for example
updating the inode item.  So the name for this helper is wrong, because it can
be used for in-place updates as well as for truncates.  Rename the helpers and
then use the smaller worst-case reservation for inode updates in a few places.

As a rule we still want to use the insert calculation when we can't be sure what
kind of operation is going to end up happening.  But for things like delayed
inode updates and file writes where we know there is going to be an existing
inode item we can use the smaller reservation.  Thanks,

Josef


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-08-20 17:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-16 15:05 [PATCH 0/3] Rework the worst case calculations for space reservation Josef Bacik
2019-08-16 15:05 ` [PATCH 1/3] btrfs: rename the btrfs_calc_*_metadata_size helpers Josef Bacik
2019-08-19  8:30   ` Nikolay Borisov
2019-08-19 12:47     ` Josef Bacik
2019-08-20 17:40       ` David Sterba
2019-08-16 15:05 ` [PATCH 2/3] btrfs: only reserve metadata_size for inodes Josef Bacik
2019-08-19  9:17   ` Nikolay Borisov
2019-08-19 12:49     ` Josef Bacik
2019-08-16 15:06 ` [PATCH 3/3] btrfs: global reserve fallback should use metadata_size Josef Bacik
2019-08-16 15:35   ` Filipe Manana
2019-08-16 16:51     ` Josef Bacik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).