[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201111230908.GC3576660@ZenIV.linux.org.uk>
Date: Wed, 11 Nov 2020 23:09:08 +0000
From: Al Viro <viro@...iv.linux.org.uk>
To: yulei zhang <yulei.kernel@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Naoya Horiguchi <naoya.horiguchi@....com>,
Paolo Bonzini <pbonzini@...hat.com>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
kvm <kvm@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org>,
Xiao Guangrong <xiaoguangrong.eric@...il.com>,
Wanpeng Li <kernellwp@...il.com>,
Haiwei Li <lihaiwei.kernel@...il.com>,
Yulei Zhang <yuleixzhang@...cent.com>,
Xiao Guangrong <gloryxiao@...cent.com>
Subject: Re: [PATCH 01/35] fs: introduce dmemfs module
On Wed, Nov 11, 2020 at 04:53:00PM +0800, yulei zhang wrote:
> > ... same here, seeing that you only call that thing from the next two functions
> > and you do *not* provide ->mknod() as a method (unsurprisingly - what would
> > device nodes do there?)
> >
>
> Thanks for pointing this out. we may need support the mknod method, otherwise
> the dev is redundant and need to be removed.
I'd suggest turning that into (static) __create_file(....) with
static int dmemfs_create(struct inode *dir, struct dentry *dentry,
umode_t mode, bool excl)
{
return __create_file(dir, dentry, mode | S_IFREG);
}
static int dmemfs_mkdir(struct inode *dir, struct dentry *dentry,
umode_t mode)
{
return __create_file(dir, dentry, mode | S_IFDIR);
}
(i.e. even inc_nlink() of parent folded into that).
[snip]
> Yes, we seperate the full implementation for dmemfs_file_mmap into
> patch 05/35, it
> will assign the interfaces to handle the page fault.
It would be less confusing to move the introduction of ->mmap() to that patch,
then.
Powered by blists - more mailing lists