Dave Wysochanski <dwyso...@redhat.com> wrote:

> This saves memory for network filesystems inode that would build
> in netfs support, but like to opt-in to netfs on some mounts while
> opting-out of netfs on other mounts.
> ...
>  static struct inode *afs_alloc_inode(struct super_block *sb)
>  {
>       struct afs_vnode *vnode;
> +     int     ret;
>  
>       vnode = alloc_inode_sb(sb, afs_inode_cachep, GFP_KERNEL);
>       if (!vnode)
>               return NULL;
>  
> +     ret = netfs_inode_init(&vnode->netfs, &afs_req_ops);
> +     if (ret) {
> +             afs_free_inode(AFS_VNODE_TO_I(vnode));
> +             return NULL;
> +     }
>       atomic_inc(&afs_count_active_inodes);
>  
>       /* Reset anything that shouldn't leak from one inode to the next. */

This makes the memory footprint worse for 9p, afs, ceph and cifs - and adds a
time penalty to inode creation and destruction as well (though probably not a
huge amount).

David
--
Linux-cachefs mailing list
Linux-cachefs@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-cachefs

Reply via email to