summaryrefslogtreecommitdiff
path: root/scripts/lib/kdoc/kdoc_files.py
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-12-07 07:15:05 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2024-12-21 09:36:22 +0300
commit9e779f3f24fbca1594bcd70996426f3b84873bc8 (patch)
tree76f6be85829a53df0cd1bec3411b34330d416604 /scripts/lib/kdoc/kdoc_files.py
parent89e74eccab9248d37bf329c66af0b7d4e23eac12 (diff)
downloadlinux-9e779f3f24fbca1594bcd70996426f3b84873bc8.tar.xz
bcachefs: Fix reuse of bucket before journal flush on multiple empty -> nonempty transition
For each bucket we track when the bucket became nonempty and when it became empty again: if we can ensure that there will be no journal flushes in the range [nonempty, empty) (possibly because they occured at the same journal sequence number), then it's safe to reuse the bucket without waiting for a journal commit. This is a major performance optimization for erasure coding, where writes are initially replicated, but the extra replicas are quickly dropped: if those buckets are reused and overwritten without issuing a cache flush to the underlying device, then they only cost bus bandwidth. But there's a tricky corner case when there's multiple empty -> nonempty -> empty transitions in quick succession, i.e. when data is getting overwritten immediately as it's being written. If this happens and the previous empty transition hasn't been flushed, we need to continue tracking the previous nonempty transition - not start a new one. Fixing this means we now need to track both the nonempty and empty transitions in bch_alloc_v4. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions