From: Stanislav Kinsbursky <skinsbursky@parallels.com>
To: "tao.peng@emc.com" <tao.peng@emc.com>
Cc: "Trond.Myklebust@netapp.com" <Trond.Myklebust@netapp.com>,
"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
Pavel Emelianov <xemul@parallels.com>,
"neilb@suse.de" <neilb@suse.de>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
James Bottomley <jbottomley@parallels.com>,
"bfields@fieldses.org" <bfields@fieldses.org>,
"davem@davemloft.net" <davem@davemloft.net>,
"devel@openvz.org" <devel@openvz.org>
Subject: Re: [PATCH 4/5] NFS: remove RPC PipeFS mount point reference from blocklayout routines
Date: Tue, 29 Nov 2011 17:13:36 +0400 [thread overview]
Message-ID: <4ED4DA80.9080303@parallels.com> (raw)
In-Reply-To: <F19688880B763E40B28B2B462677FBF805E3A4AFFD@MX09A.corp.emc.com>
29.11.2011 16:40, tao.peng@emc.com пишет:
>> -----Original Message-----
>> From: Stanislav Kinsbursky [mailto:skinsbursky@parallels.com]
>> Sent: Tuesday, November 29, 2011 8:19 PM
>> To: Peng, Tao
>> Cc: Trond.Myklebust@netapp.com; linux-nfs@vger.kernel.org; Pavel Emelianov; neilb@suse.de;
>> netdev@vger.kernel.org; linux-kernel@vger.kernel.org; James Bottomley; bfields@fieldses.org;
>> davem@davemloft.net; devel@openvz.org
>> Subject: Re: [PATCH 4/5] NFS: remove RPC PipeFS mount point reference from blocklayout routines
>>
>> 29.11.2011 16:00, tao.peng@emc.com пишет:
>>>> -----Original Message-----
>>>> From: linux-nfs-owner@vger.kernel.org [mailto:linux-nfs-owner@vger.kernel.org] On Behalf Of
>> Stanislav
>>>> Kinsbursky
>>>> Sent: Tuesday, November 29, 2011 6:11 PM
>>>> To: Trond.Myklebust@netapp.com
>>>> Cc: linux-nfs@vger.kernel.org; xemul@parallels.com; neilb@suse.de; netdev@vger.kernel.org; linux-
>>>> kernel@vger.kernel.org; jbottomley@parallels.com; bfields@fieldses.org; davem@davemloft.net;
>>>> devel@openvz.org
>>>> Subject: [PATCH 4/5] NFS: remove RPC PipeFS mount point reference from blocklayout routines
>>>>
>>>> This is a cleanup patch. We don't need this reference anymore, because
>>>> blocklayout pipes dentries now creates and destroys in per-net operations and
>>>> on PipeFS mount/umount notification.
>>>> Note that nfs4blocklayout_register_net() now returns 0 instead of -ENOENT in
>>>> case of PipeFS superblock absence. This is ok, because blocklayout pipe dentry
>>>> will be created on PipeFS mount event.
>>> When is the "pipefs mount event" going to happen? When inserting kernel modules or when user issues
>> mount command?
>>>
>>
>> When user issues mount command.
>> Kernel mounts of PipeFS has been removed with all these patch sets I've sent
>> already.
> Then it is going to break blocklayout user space program blkmapd, which is stared before mounting any file system and it tries to open the pipe file when started.
Sorry, but I don't get it. Probably we have misunderstanding here.
You said, that "blkmapd ... tries to open the pipe file when started". This pipe
file is located on PipeFS, isn't it?
If yes, then PipeFS have to be mounted already in user-space. And if it has been
mounted - then pipe dentry is present.
IOW, pipe (without dentry) will be created on module load. Pipe dentry will be
created right after that (like it was before) if PipeFS was mounted from
user-space. If not - then pipe dentry will be created on PipeFS (!) mount (not
NFS or pNFS mount) from user-space.
Or I'm missing something in your reply?
> Not sure if you implement the same logic on nfs pipe as well. But if you do, then nfs client user space program idmapd will fail to start for the same reason.
>
The same logic here.
> Why not just fail to load module if you fail to initialize pipefs? When is rpc_get_sb_net() going to fail?
>
Sorry, but I don't understand, what is your idea. And why do we need to fail at all.
BTW, rpc_get_sb_net() just checks, was PipeFS mounted in passed net, or not. If
not - not a problem. Dentries will be created on mount event. If yes, then it
returns locked PipeFS sb and the next step is dentry creation.
>>
>>
>>> Thanks,
>>> Tao
>>>
>>>>
>>>> Signed-off-by: Stanislav Kinsbursky<skinsbursky@parallels.com>
>>>>
>>>> ---
>>>> fs/nfs/blocklayout/blocklayout.c | 9 +--------
>>>> 1 files changed, 1 insertions(+), 8 deletions(-)
>>>>
>>>> diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c
>>>> index acf7ac9..8211ffd 100644
>>>> --- a/fs/nfs/blocklayout/blocklayout.c
>>>> +++ b/fs/nfs/blocklayout/blocklayout.c
>>>> @@ -1032,7 +1032,7 @@ static struct dentry *nfs4blocklayout_register_net(struct net *net,
>>>>
>>>> pipefs_sb = rpc_get_sb_net(net);
>>>> if (!pipefs_sb)
>>>> - return ERR_PTR(-ENOENT);
>>>> + return 0;
>>>> dentry = nfs4blocklayout_register_sb(pipefs_sb, pipe);
>>>> rpc_put_sb_net(net);
>>>> return dentry;
>>>> @@ -1083,7 +1083,6 @@ static struct pernet_operations nfs4blocklayout_net_ops = {
>>>>
>>>> static int __init nfs4blocklayout_init(void)
>>>> {
>>>> - struct vfsmount *mnt;
>>>> int ret;
>>>>
>>>> dprintk("%s: NFSv4 Block Layout Driver Registering...\n", __func__);
>>>> @@ -1093,12 +1092,6 @@ static int __init nfs4blocklayout_init(void)
>>>> goto out;
>>>>
>>>> init_waitqueue_head(&bl_wq);
>>>> -
>>>> - mnt = rpc_get_mount();
>>>> - if (IS_ERR(mnt)) {
>>>> - ret = PTR_ERR(mnt);
>>>> - goto out_remove;
>>>> - }
>>>> ret = rpc_pipefs_notifier_register(&nfs4blocklayout_block);
>>>> if (ret)
>>>> goto out_remove;
>>>>
>>>> --
>>>> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
>>>> the body of a message to majordomo@vger.kernel.org
>>>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>>
>>
>>
>> --
>> Best regards,
>> Stanislav Kinsbursky
>
--
Best regards,
Stanislav Kinsbursky
next prev parent reply other threads:[~2011-11-29 13:16 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-29 10:10 [PATCH 0/5] NFS: create blocklayout pipe per network namesapce context Stanislav Kinsbursky
2011-11-29 9:17 ` Stanislav Kinsbursky
2011-11-29 10:10 ` [PATCH 1/5] NFS: handle blocklayout pipe PipeFS dentry by network namespace aware routines Stanislav Kinsbursky
2011-11-29 10:10 ` [PATCH 2/5] NFS: blocklayout pipe creation per network namespace context introduced Stanislav Kinsbursky
2011-11-29 10:10 ` [PATCH 3/5] NFS: blocklayout PipeFS notifier introduced Stanislav Kinsbursky
2011-11-29 10:10 ` [PATCH 4/5] NFS: remove RPC PipeFS mount point reference from blocklayout routines Stanislav Kinsbursky
2011-11-29 12:00 ` tao.peng
2011-11-29 12:19 ` Stanislav Kinsbursky
2011-11-29 12:40 ` tao.peng
2011-11-29 13:13 ` Stanislav Kinsbursky [this message]
2011-11-29 15:05 ` Peng Tao
2011-11-29 13:35 ` Myklebust, Trond
2011-11-29 15:10 ` Peng Tao
2011-11-29 15:18 ` Trond Myklebust
2011-11-29 15:30 ` Peng Tao
2011-11-29 16:40 ` Trond Myklebust
2011-11-29 16:42 ` J. Bruce Fields
2011-11-29 17:19 ` Trond Myklebust
2011-11-29 17:27 ` J. Bruce Fields
2011-11-29 17:30 ` Peng Tao
2012-05-28 11:43 ` Boaz Harrosh
2011-11-29 10:10 ` [PATCH 5/5] SUNRPC: kernel PipeFS mount point creation routines removed Stanislav Kinsbursky
2011-12-30 22:55 ` [PATCH 0/5] NFS: create blocklayout pipe per network namesapce context Trond Myklebust
2012-01-05 20:58 ` Trond Myklebust
2012-01-10 12:58 ` Stanislav Kinsbursky
2012-01-11 16:23 ` Trond Myklebust
2012-01-11 17:23 ` Stanislav Kinsbursky
2012-01-11 17:46 ` Trond Myklebust
2012-01-11 18:03 ` Stanislav Kinsbursky
2012-01-10 10:50 ` Stanislav Kinsbursky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4ED4DA80.9080303@parallels.com \
--to=skinsbursky@parallels.com \
--cc=Trond.Myklebust@netapp.com \
--cc=bfields@fieldses.org \
--cc=davem@davemloft.net \
--cc=devel@openvz.org \
--cc=jbottomley@parallels.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=netdev@vger.kernel.org \
--cc=tao.peng@emc.com \
--cc=xemul@parallels.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).