lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 12 Jan 2022 10:54:32 +0800
From:   Muchun Song <songmuchun@...edance.com>
To:     Roman Gushchin <guro@...com>
Cc:     Matthew Wilcox <willy@...radead.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Johannes Weiner <hannes@...xchg.org>,
        Michal Hocko <mhocko@...nel.org>,
        Vladimir Davydov <vdavydov.dev@...il.com>,
        Shakeel Butt <shakeelb@...gle.com>,
        Yang Shi <shy828301@...il.com>, Alex Shi <alexs@...nel.org>,
        Wei Yang <richard.weiyang@...il.com>,
        Dave Chinner <david@...morbit.com>,
        trond.myklebust@...merspace.com, anna.schumaker@...app.com,
        jaegeuk@...nel.org, chao@...nel.org,
        Kari Argillander <kari.argillander@...il.com>,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Linux Memory Management List <linux-mm@...ck.org>,
        linux-nfs@...r.kernel.org, Qi Zheng <zhengqi.arch@...edance.com>,
        Xiongchun duan <duanxiongchun@...edance.com>,
        Fam Zheng <fam.zheng@...edance.com>,
        Muchun Song <smuchun@...il.com>
Subject: Re: [PATCH v5 03/16] fs: introduce alloc_inode_sb() to allocate
 filesystems specific inode

On Wed, Jan 12, 2022 at 2:55 AM Roman Gushchin <guro@...com> wrote:
>
> On Mon, Dec 20, 2021 at 04:56:36PM +0800, Muchun Song wrote:
> > The allocated inode cache is supposed to be added to its memcg list_lru
> > which should be allocated as well in advance. That can be done by
> > kmem_cache_alloc_lru() which allocates object and list_lru. The file
> > systems is main user of it. So introduce alloc_inode_sb() to allocate
> > file system specific inodes and set up the inode reclaim context
> > properly. The file system is supposed to use alloc_inode_sb() to
> > allocate inodes. In the later patches, we will convert all users to the
> > new API.
> >
> > Signed-off-by: Muchun Song <songmuchun@...edance.com>
> > ---
> >  Documentation/filesystems/porting.rst |  5 +++++
> >  fs/inode.c                            |  2 +-
> >  include/linux/fs.h                    | 11 +++++++++++
> >  3 files changed, 17 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/filesystems/porting.rst b/Documentation/filesystems/porting.rst
> > index bf19fd6b86e7..c9c157d7b7bb 100644
> > --- a/Documentation/filesystems/porting.rst
> > +++ b/Documentation/filesystems/porting.rst
> > @@ -45,6 +45,11 @@ typically between calling iget_locked() and unlocking the inode.
> >
> >  At some point that will become mandatory.
> >
> > +**mandatory**
> > +
> > +The foo_inode_info should always be allocated through alloc_inode_sb() rather
> > +than kmem_cache_alloc() or kmalloc() related.
>
> I'd add a couple of words on why it has to be allocated this way.

Will do.

> > +
> >  ---
>
> Reviewed-by: Roman Gushchin <guro@...com>

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ