[PATCH 4 of 5 V2] util: add a getfstype method

Yuya Nishihara yuya at tcha.org
Sun Mar 12 15:26:57 EDT 2017


On Sun, 12 Mar 2017 12:06:32 -0700, Jun Wu wrote:
> Excerpts from Yuya Nishihara's message of 2017-03-12 11:58:40 -0700:
> > > That's good to know. I actually had 3 patches to move it to vfs, but was
> > > concerned about the future "repostorage" layer holding vfs objects that
> > > won't get invalidated across chg workers.
> > 
> > If the filesystem at the cached repository location changed, cache should be
> > invalidated and repostorage would be recreated anyway.
> 
> Even if location does not change, the user can run "mount" to change the
> "mtab" that affects us.

My point is that the repository should be considered changed if he mounted
another filesystem onto that location. vfs caches cansymlink, execflag, etc.,
which are all invalid.

> Querying "mtab" confidently is expensive. And "mtab" can answer all vfs
> queries. So I think it's better to cache "mtab" per process, instead of
> caching "fstype" per vfs.

I won't object to it if it can be implemented cleanly.


More information about the Mercurial-devel mailing list