From 1e7dbc6f97163941e5dec36ba28ac999d1c71698 Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Wed, 28 Oct 2020 14:06:11 -0400 Subject: [PATCH] tempfile: remove old comments about fsync and deadlock bugs I was never able to prove a connection between fsync() and deadlock bugs. There were too many deadlock bugs to be able to isolate a bug that is triggered specifically by fsync. Update the comment (which has been unchanged since kernel 4.14). We still may want to do fsync() on temporary files someday, but there's a full internal API rewrite between here and there. Signed-off-by: Zygo Blaxell --- src/bees.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/bees.cc b/src/bees.cc index e570c0f..d936f48 100644 --- a/src/bees.cc +++ b/src/bees.cc @@ -598,13 +598,12 @@ BeesTempFile::make_copy(const BeesFileRange &src) } BEESCOUNTADD(tmp_copy_ms, copy_timer.age() * 1000); - // We seem to get lockups without this! if (did_block_write) { #if 0 - // Is this fixed by "Btrfs: fix deadlock between dedup on same file and starting writeback"? - // No. - // Is this fixed in kernel 4.14.34? - // No. + // There were a lot of kernel bugs leading to lockups. + // Most of them are fixed now. + // Unnecessary sync makes us slow, but maybe it has some robustness utility. + // TODO: make this configurable. bees_sync(m_fd); #endif }