🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #2409

Re: [PATCH] fsmonitor: invalidate untracked cache after losing history

#2409
From: Derrick Stolee
Date: Thu, 05 Nov 2026 14:08
30 lines
12025 bytes
On 11/4/2026 5:52 PM, Junio C Hamano wrote:
> "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes:

>>     A user of an internal monorepo reported this behavior, including an
>>     AI-assisted powershell script to prove how it worked. I used an agent to
>>     assist in porting that to a Git test script and a code fix, but then
>>     applied significant human editing and validation on top to get it up to
>>     my standards.
>>     
>>     Thanks, -Stolee
> 
> Would this be a viable replacement for ik/fsmonitor-untracked-cache-trivial-response
> 
>   https://lore.kernel.org/git/pull.2247.git.1791127155614.gitgitgadget@gmail.com/
> 
> that has been left unreviewed for a month?

Thank you for pointing me at this. I didn't realize there was already a
patch working on a fix for this issue.

Ilia's patch has the stronger approach of trying to preserve as much of
the untracked cache as possible, which has some performance improvements
over my change (in the "rare" case of the fsmonitor failing).

Let me first see if we can take that patch instead of mine. I'll start
some review over there.

Thanks,
-Stolee
Technical Details
Message-ID: <3d62a579-5bf1-4431-8bfc-757c3c873d80@gmail.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-74536-linux-kernel-git=dewy.ru
References: <pull.2295.git.1793806679163.gitgitgadget@gmail.com> <xmqqmrroyztr.fsf@gitster.g>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-74536-linux-kernel-git=dewy.ru
From: stolee@gmail.com (Derrick Stolee)
Newsgroups: linux.kernel.git
Subject: Re: [PATCH] fsmonitor: invalidate untracked cache after losing
 history
Date: Thu, 5 Nov 2026 09:08:30 -0500
Organization: Usenet Network
Message-ID: <3d62a579-5bf1-4431-8bfc-757c3c873d80@gmail.com>
References: <pull.2295.git.1793806679163.gitgitgadget@gmail.com>
 <xmqqmrroyztr.fsf@gitster.g>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="3651444"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:2ztFN1Y1nJwCo8dzfJ9YXdZV5e8= sha256:NQEmkXXUELI2rdkxq4AmY1q0fo8GsChSB5Drw+I/MWU=
	sha1:jDaEtVFmKlvqBNvZ/hw7TV1NJXk= sha256:x/UXrFGk75/WwNb45r9zvuvhJoCjaXoaN0UZHDo+78o=
Content-Language: en-US
List-ID: <git.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 15D56112FC4; Thu,  5 Nov 2026 17:11:37 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.149
X-Spam-Status: No, score=-3.149 tagged_above=-9999 required=6.31
	tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
	FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001,
	HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
	autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id xDwJ5oT3fVYr;
	Thu,  5 Nov 2026 17:11:33 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=git+bounces-74536-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id 07BD8112FBD; Thu,  5 Nov 2026 17:11:24 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sto.lore.kernel.org (Postfix) with ESMTP id 49C7F60606D; Thu,  5 Nov 2026 14:08:37 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793887714;
	b=TQwozF+P32Wmry1+tNAstdM46xiVF4CPbGWlwnWR/EZUb8lFPor0cz9tL/YNW7e/nXTK
	 2qhHZY2MeuF8hlLYQal75Iovf/AkxHO8HEOvp7U8JatmZJRMuzKP1xmeXsgt33OdJgYy4
	 Zw2q+0jLc6iWTuDmga6BfLC1O8MwjP9Kbc/ZMI1nvdlPn5MYe04AFNFJeJmbfkJL7Q5tx
	 Z7HQEdL9VufcknbOcDVcXm++lyiwaZHnUSSKaCK3TczqZJ9wP32TkxYHxQiwS0AT4E2CD
	 PVcFUcM/6NqHlsy2cB+8kDsVPCzEubmiwH3BmF/Xyu47Yz0qQKjdSfDCz5vdfDrV8IA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793887714;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
	 Received:Message-ID:Date:X-Mailing-List:List-Id:List-Post:List-Help:
	 List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 User-Agent:Subject:To:Cc:References:Content-Language:From:In-Reply-To:
	 Content-Type:Content-Transfer-Encoding;
	bh=zXqHaiuScfRJ4vwvXqPtaE3e0t/YUFjd804gG14vF9s=;
	b=LYxZIBWcFz0QCERP1lrMZbG/+9KBCsX8jC/4II1JJb/pmOjbkKmIpX37nwoYs2L5oOsf
	 y6bOaVQ/PN+ctqxrl8x+cMsGNrP4WerzNR+o0R8XrmKXUsIwgvhBjBUpBegEvnQaaskc5
	 aRnwiVtm/Z7K5iCUzVhUSJ2zk16Q4y1bs2zOrXvqjzUzUabk8TFzU6QSKGEXeyeaB5zAs
	 8da15UtXtdNDBOV77U0y8Xi7GEMNpNr5YougwhvlgOwsUi6q9IHqbzm+GwTb2hi3L9hXI
	 sJlseTYd/i/dpbfDlyU1szreER9rqBxLqz6jRfbFDzlVm5VBpnAo7gwMVBFcm4y1N2Q==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=qqHBoQ3E;
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id B6115606A32C;
	Thu,  5 Nov 2026 14:08:34 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=qqHBoQ3E
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.217.41
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793887713;
	b=VKBKMCKOR4E3DeykwIgm8Si9dnu4rxydMud87/vdOELuiu0tqgznCgV97pheCwuolq1f
	 ft911x319lTX/obDilXwZUTW3bLqEr7u29uH6QQ8QGE+pFpAged1UFO0M4gOuDp7c5l2H
	 lGTOnJoSCZCAseDuvzBP8dK5EmHgDkdK6W2DRZGHBqhJxvT4KJ0jXwTaa4XgsyyCwF0cJ
	 ZTLWuUMYmyOZ7j79s9Dg9yTyPDZ1ZbI+SilTZrQEqvLiVUcnb9aORykKb1evsMeg/pC9L
	 xY4cvISOKnTAduobjY2zpZicViePoi4EmYrfK/lvGwIxaR9Lkf9SvRDiOLHXyFvU/Zw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793887713;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Gm-Message-State:X-Gm-Gg:X-Received:Received:Message-ID:Date:
	 MIME-Version:User-Agent:Subject:To:Cc:References:Content-Language:
	 From:In-Reply-To:Content-Type:Content-Transfer-Encoding;
	bh=zXqHaiuScfRJ4vwvXqPtaE3e0t/YUFjd804gG14vF9s=;
	b=w9pmbDXDQTlzOiFG+bvJFK7ZveVPTBXM3no7L+kBWmnUH/kOGOIUxL1q8o9N6pHptP1b
	 hPenclphhfsawesyOWIe8GpIdLk16epnf387Gw8LJNtDwLDu2Lfyk03GclNQ0Kl3kolfm
	 Cp6HJc5Kw7UoDp1IgVavMh9yhZLqLQymgxyllfv9XcJrnPfLOXQKERw6WlDmvRRDzdpeF
	 zpY4SJflR+9q4jXZOiD32LaWZMKu1NU4tgoq+fP3ULLkKSDBmC0X481VsHyVhU6M5OyhI
	 fSWy10jHHSEdZ0I/XatRYzGjy1m0qmKqeWrf6basp5dr7HMtboVNUrFFn8WJJmAwOkg==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=qqHBoQ3E;
	arc=none smtp.remote-ip=209.85.217.41
X-Received: from mail-vs1-f41.google.com (mail-vs1-f41.google.com [209.85.217.41])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 85CD6606A328
	for <git@vger.kernel.org>; Thu,  5 Nov 2026 14:08:33 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 85CD6606A328
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-vs1-f41.google.com with SMTP id ada2fe7eead31-7d06ecaf709so1013898137.1
        for <git@vger.kernel.org>; Thu, 05 Nov 2026 06:08:33 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20260707; t=1793887712; x=1794492512; darn=vger.kernel.org;
        h=content-transfer-encoding:content-type:in-reply-to:from
         :content-language:references:cc:to:subject:user-agent:mime-version
         :date:message-id:from:to:cc:subject:date:message-id:reply-to
         :content-type;
        bh=zXqHaiuScfRJ4vwvXqPtaE3e0t/YUFjd804gG14vF9s=;
        b=qqHBoQ3Esba8PonREwNpOTeCeY/gPfpvmVMtbR5FIVKmn3KiDAtX/KGEhPiKJYE5to
         XWnbe2mhb5BQd45jMjlkQFJ60Q3tVrt7vVNv194mP0abhbgxOyysDwvIOR7ntnWxr8Qu
         ZSDa+b8VtE7XMawZ0ME6dtIIoYW/H1F5BUr86YLxEvoyF2BByCdyFxtpTXcphrP+IDtz
         SuA4slaztBJzJMuTM9w+zeh94CTAU3YxFhHhiOlnv4JRgh35O6qDoQ+LaB9+wWIAucZs
         S7MOoIHAzP89EQ8C+49fquNiVtJb/DZ8FxGmGa8kaiwcmxPDFwVm2DoA454dQrwO1Mf/
         gMgg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1793887712; x=1794492512;
        h=content-transfer-encoding:content-type:in-reply-to:from
         :content-language:references:cc:to:subject:user-agent:mime-version
         :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
         :message-id:reply-to:content-type;
        bh=zXqHaiuScfRJ4vwvXqPtaE3e0t/YUFjd804gG14vF9s=;
        b=l2G0x0jJ2FOUfe6pGV9636gDwf+ltYHkwZ6F5E+4JF3Qs0UmuiCXs5HkpDN4N4jT5W
         5jGINc1vqh/Lkf/EnapAUF/rhi7+yTIMOEdOgApvPVE1CQs4AOCMo3LCFnp8EiXc1GI8
         PI/fdfc7WNnzZ8tTGiLfuB8TB0hK7UQnJ0g5zaXpctQZpG4lqmLfEM+yUf8oFDxAqrP7
         GCf+voMmfgM/mUooGdRVOj+0985DLluYPtLC/y2iKgTJ0j4nh5LZVwt4MVheCP48IMNc
         TRjoT2ioC6oWN4Ndm1JDF17t7J/nTptoMIEggPT4TxuDlBW4v08I6Npfo44xQYQy2/YT
         8J2A==
X-Gm-Message-State: APuU4Z84RTgRI/1mDdux03JkwQKQM5ugxLoppb1LEhLVavN4gkOdeVbN
	bFUDUUj4NMbVop3jOPil3z/1w3A3wvaQeEe1IsCyG/2yA8ZaSBQwb9x65NUsmg==
X-Gm-Gg: AYBFou1PyzE9aIK/L85+kOYGgnfpFj18GUI0d2pikPNzXriHlnrALgmtSyATw3DXS2c
	rpUgfo9yoXPgbmVn6VE94zE/3cz0azZSp+PdItep6qGovmWR5cvOqGuoK4CK39r3b/vUAZdkxFl
	1DBnI42spbp8PfcSuEC2kJ2Ja95oavecJfTRr6CS2wn911IRMEuloTCKzc0NQ9o4n9BrJXQgbaV
	dBBJmcPMWrm0R7/L4t0ucseR/hf1Ek8bvnutwovsr1ryrI8p6anbeD+CCdSSv/937QW6Obbm7rm
	GpQzG8bjIG0l+0u6156M1yhCknHR2hlyJz/UXtKB1aZHUBCYF69d9P6o007rLz0FMNLvE74R2gV
	F0XQe//jhSRIcV4gHSqZ0qBbK1PmN0K0+jGiCeRVPUQFHYao1icOtRiupdlHzKSAcGPNQEXknny
	0Y084zplV5jYiQ7OhS2XO2Sv6NSCgRB2+q7t1TNuNYF8SWfeD7XD85Xcjb2tdLoS1TRgkj/Bpbw
	qWDfXj9WQIguRQZF/4yWj+JFeA+BA2Ic9F7S1dmakyNCgChLntcaRCLlYAZ5A/c3Zmm0iL1YQ5i
	KANdqNYZVLzpyTCbxETezR9LrcBs7sU3213MWk24cDNJ/qgBECmHPCwfyVUkcJtXegpaRYeLIrC
	961WsM2pDQcInG+gWCw4xUBwK8UnOpr3hlJ6UM4Udgy2pzci4g34yu9TySfZjOGcuWWrDJMpe64
	EW0BhSd45HlQOzdy9aFkdY7p6AOjW8n9R4YFI7aPbcTM73xh0RtkJc
X-Received: by 2002:a05:6102:30c6:10b0:7d2:8dd0:2ed with SMTP id ada2fe7eead31-7d28dd0052dmr1392351137.10.1793887712299;
        Thu, 05 Nov 2026 06:08:32 -0800 (PST)
X-Received: from [192.168.1.109] ([136.61.86.144])
        by smtp.gmail.com with ESMTPSA id ada2fe7eead31-7d296415719sm849998137.8.2026.11.05.06.08.31
        (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
        Thu, 05 Nov 2026 06:08:31 -0800 (PST)
X-Mailing-List: git@vger.kernel.org
X-List-Post: <mailto:git@vger.kernel.org>
X-List-Help: <mailto:git+help@vger.kernel.org>
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:git+owner@vger.kernel.org>
X-Precedence: list
X-User-Agent: Mozilla Thunderbird
X-Cc: git@vger.kernel.org, Johannes.Schindelin@gmx.de, ki.stfu@gmail.com
X-In-Reply-To: <xmqqmrroyztr.fsf@gitster.g>