Git development
 help / color / mirror / Atom feed
* [PATCH 0/3] fsmonitor: fix rename handling in the Linux listener
@ 2026-12-06  7:00 Abhishek Agarwal
  2026-12-06  7:00 ` [PATCH 1/3] fsmonitor: remove the right reverse entry of a watch on Linux Abhishek Agarwal
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Abhishek Agarwal @ 2026-12-06  7:00 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Patrick Steinhardt, Paul Tarjan, Erik Cervin-Edin,
	John Mellor, Nicolas Riebesel

The Linux fsmonitor listener loses track of directories in three ways.
Two of them were reported here and have not been answered yet:

 1/3 Two watches can be known under the same path for a while, and
     remove_watch() can then remove the wrong reverse entry. The daemon
     later dies in BUG("double remove of watch"). I ran into this
     because the "move_directory_up" cases of t7527 fail on my machine,
     which writes core files into the current directory: the failure
     is the daemon's core file showing up as an untracked file.

 2/3 Directories below a renamed directory keep their old paths, so
     changes in them are missed. Erik reported this in October [1].

 3/3 A directory moved into the worktree from outside is not watched
     itself, so changes to files directly in it are missed. John
     reported this in November [2].

None of these are regressions in 2.98: the listener has behaved like
this since it was added in 2.55. I could only run the tests on Linux.

[1] https://lore.kernel.org/git/as4z1SskiPyrSKIa@vader/
[2] https://lore.kernel.org/git/CAG_kaUYEjQhiPMatcPXr00q3oO77BM2Mu7KUZyP0aSGGwKTsJA@mail.gmail.com/

Abhishek Agarwal (3):
  fsmonitor: remove the right reverse entry of a watch on Linux
  fsmonitor: keep watch paths below a renamed directory up to date
  fsmonitor: watch directories moved into the worktree on Linux

 compat/fsmonitor/fsm-listen-linux.c | 119 ++++++++++++++++++++++------
 t/t7527-builtin-fsmonitor.sh        |  94 ++++++++++++++++++++++
 2 files changed, 188 insertions(+), 25 deletions(-)


base-commit: 566b6997dd4710b625c0882cf10a7443bf52d183
-- 
2.56.0


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

end of thread, other threads:[~2026-12-06  7:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-06  7:00 [PATCH 0/3] fsmonitor: fix rename handling in the Linux listener Abhishek Agarwal
2026-12-06  7:00 ` [PATCH 1/3] fsmonitor: remove the right reverse entry of a watch on Linux Abhishek Agarwal
2026-12-06  7:00 ` [PATCH 2/3] fsmonitor: keep watch paths below a renamed directory up to date Abhishek Agarwal
2026-12-06  7:00 ` [PATCH 3/3] fsmonitor: watch directories moved into the worktree on Linux Abhishek Agarwal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox