tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Vnode API change: add global vnode cache



On 06 Apr 2014, at 21:12, David Holland <dholland-tech%netbsd.org@localhost> 
wrote:

> On Sun, Apr 06, 2014 at 12:14:24PM +0200, J. Hannken-Illjes wrote:
>> Currently all file systems have to implement their own cache of
>> vnode / fs node pairs.  Most file systems use a copy and pasted
>> version of ufs_ihash.
>> 
>> So add a global vnode cache with lookup and remove:
> 
> Heh, would you like the rest of my todo list? :-)
> 
> one surface comment:
> 
>> /*
>> * Read an inode from disk and initialize this vnode / inode pair.
>> * Caller assures no other thread will try to load this inode.
>> */
>> int
>> vfs_load_node(struct mount *mp, struct vnode *vp,
>>    const void *key, size_t key_len, void **new_key)
> 
> Can we call this vn_load, or vncache_load, or vncache_enter, or
> something of the sort that's more consistent with the rest of the
> extant naming?

May be not so clear without reading the diff, this is a vfs operation:

@@ -221,4 +221,6 @@ struct vfsops {
        int     (*vfs_sync)     (struct mount *, int, struct kauth_cred *);
        int     (*vfs_vget)     (struct mount *, ino_t, struct vnode **);
+       int     (*vfs_load_node) (struct mount *, struct vnode *,
+                                   const void *, size_t, void **);
        int     (*vfs_fhtovp)   (struct mount *, struct fid *,
                                    struct vnode **);

> I will try to look at the diff later...

Please don't wait too long ...

--
J. Hannken-Illjes - hannken%eis.cs.tu-bs.de@localhost - TU Braunschweig 
(Germany)



Home | Main Index | Thread Index | Old Index