On Wed, 2 Sept 2026 at 21:35, Khazhy Kumykov <[email protected]> wrote:
>
> On Wed, Sep 2, 2026 at 12:46 AM Miklos Szeredi <[email protected]> wrote:
> >
> > On Tue, 1 Sept 2026 at 23:34, Changyuan Lyu <[email protected]> wrote:
> >
> > > 1. For virtiofsd: Does the automatic detection of pseudo-filesystems via
> > >    fstatfs magic match upstream expectations, or would upstream prefer an
> > >    explicit configuration option (such as per-path cache policies)?
> >
> > Why not just set "--cache never" for the pseudo fs export?
>
> Enabling caching does give a pretty noticeable performance improvement
> for those files that can be cached, and we'd like to have just a
> single export instead of setting up multiple and assembling it
> piecemeal. (To this end we do have an out-of-tree extension to the
> virtiofsd-rs passthrough module to allow changing caching duration on
> a per file basis as the protocol allows..., been meaning to start a
> thread if folks are interested in this since it has proven somewhat
> useful for us now).
>
> But I felt having first class support for this felt more "right" -
> enabling caching shouldn't break reading of certain files, and the
> server is in a position to know if a file would support this or not.

I'm fine with this.  But virtiofsd maintainers will have to make a
decision about merging or not merging this feature.

One idea that occurs to me is that the kernel is in a much better
position to give a hint:

 - file is normal: POSIX semantics apply
 - file is pseudo; POSIX semantics don't apply

The "normal" category could also be split into:

 - file is local: changes always generate fanotify events
 - file is remote: changes do not always generate fanotify events

Thanks,
Miklos

Reply via email to