* Flush all entries referencing a particular filesystem. */
| 2815 | * Flush all entries referencing a particular filesystem. |
| 2816 | */ |
| 2817 | void |
| 2818 | cache_purgevfs(struct mount *mp) |
| 2819 | { |
| 2820 | struct vnode *vp, *mvp; |
| 2821 | |
| 2822 | SDT_PROBE1(vfs, namecache, purgevfs, done, mp); |
| 2823 | /* |
| 2824 | * Somewhat wasteful iteration over all vnodes. Would be better to |
| 2825 | * support filtering and avoid the interlock to begin with. |
| 2826 | */ |
| 2827 | MNT_VNODE_FOREACH_ALL(vp, mp, mvp) { |
| 2828 | if (!cache_has_entries(vp)) { |
| 2829 | VI_UNLOCK(vp); |
| 2830 | continue; |
| 2831 | } |
| 2832 | vholdl(vp); |
| 2833 | VI_UNLOCK(vp); |
| 2834 | cache_purge(vp); |
| 2835 | vdrop(vp); |
| 2836 | } |
| 2837 | } |
| 2838 | |
| 2839 | /* |
| 2840 | * Perform canonical checks and cache lookup and pass on to filesystem |
no test coverage detected