How to VOP_RECLAIM on demand?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

How to VOP_RECLAIM on demand?

Alan Somers-2
It would be useful if I could trigger VOP_RECLAIM on demand for a
certain file or pathname.  There are some edge cases in fusefs that I
can't test otherwise.  But I don't see any way to do it.  Is such a
thing possible?  Would it be worth adding a special syscall for this
purpose?  It could be guarded with INVARIANTS so it wouldn't affect
production builds.
-Alan
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: How to VOP_RECLAIM on demand?

Conrad Meyer-2
It could be done with a sysctl, or even an ioctl on /dev/fuse
(although, there is nothing FUSE-specific about the idea for a test
utility).  So I'd just add a sysctl for that functionality.

Best,
Conrad

On Mon, Jun 3, 2019 at 1:39 PM Alan Somers <[hidden email]> wrote:

>
> It would be useful if I could trigger VOP_RECLAIM on demand for a
> certain file or pathname.  There are some edge cases in fusefs that I
> can't test otherwise.  But I don't see any way to do it.  Is such a
> thing possible?  Would it be worth adding a special syscall for this
> purpose?  It could be guarded with INVARIANTS so it wouldn't affect
> production builds.
> -Alan
> _______________________________________________
> [hidden email] mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "[hidden email]"
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: How to VOP_RECLAIM on demand?

Konstantin Belousov
In reply to this post by Alan Somers-2
On Mon, Jun 03, 2019 at 02:38:11PM -0600, Alan Somers wrote:
> It would be useful if I could trigger VOP_RECLAIM on demand for a
> certain file or pathname.  There are some edge cases in fusefs that I
> can't test otherwise.  But I don't see any way to do it.  Is such a
> thing possible?  Would it be worth adding a special syscall for this
> purpose?  It could be guarded with INVARIANTS so it wouldn't affect
> production builds.

Look at revoke(2) and VOP_REVOKE().  It is only implemented and used
for devfs tty nodes.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: How to VOP_RECLAIM on demand?

Alan Somers-2
On Mon, Jun 3, 2019 at 3:15 PM Konstantin Belousov <[hidden email]> wrote:

>
> On Mon, Jun 03, 2019 at 02:38:11PM -0600, Alan Somers wrote:
> > It would be useful if I could trigger VOP_RECLAIM on demand for a
> > certain file or pathname.  There are some edge cases in fusefs that I
> > can't test otherwise.  But I don't see any way to do it.  Is such a
> > thing possible?  Would it be worth adding a special syscall for this
> > purpose?  It could be guarded with INVARIANTS so it wouldn't affect
> > production builds.
>
> Look at revoke(2) and VOP_REVOKE().  It is only implemented and used
> for devfs tty nodes.

I don't understand how that would help.  What does VOP_REVOKE have in
common with VOP_RECLAIM?
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: How to VOP_RECLAIM on demand?

Konstantin Belousov
On Mon, Jun 03, 2019 at 04:27:26PM -0600, Alan Somers wrote:

> On Mon, Jun 3, 2019 at 3:15 PM Konstantin Belousov <[hidden email]> wrote:
> >
> > On Mon, Jun 03, 2019 at 02:38:11PM -0600, Alan Somers wrote:
> > > It would be useful if I could trigger VOP_RECLAIM on demand for a
> > > certain file or pathname.  There are some edge cases in fusefs that I
> > > can't test otherwise.  But I don't see any way to do it.  Is such a
> > > thing possible?  Would it be worth adding a special syscall for this
> > > purpose?  It could be guarded with INVARIANTS so it wouldn't affect
> > > production builds.
> >
> > Look at revoke(2) and VOP_REVOKE().  It is only implemented and used
> > for devfs tty nodes.
>
> I don't understand how that would help.  What does VOP_REVOKE have in
> common with VOP_RECLAIM?
Sane implementation of VOP_REVOKE for a filesystem that does not do tricks
at files level (think devfs) is mostly {vgone(vp);}.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"