From: "Venkateswararao Jujjuri (JV)" <jvrao@linux.vnet.ibm.com>
To: "Aneesh Kumar K. V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: Eric Van Hensbergen <ericvh@gmail.com>,
linux-fsdevel@vger.kernel.org,
v9fs-developer@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: [V9fs-developer] [PATCH 1/3] fs/9p: Update TLCREATE to allow create without open
Date: Wed, 06 Oct 2010 07:18:58 -0700 [thread overview]
Message-ID: <4CAC8552.6090304@linux.vnet.ibm.com> (raw)
In-Reply-To: <m3wrpvinvv.fsf@linux.vnet.ibm.com>
On 10/6/2010 4:03 AM, Aneesh Kumar K. V wrote:
> On Wed, 06 Oct 2010 11:48:15 +0530, "Aneesh Kumar K. V"<aneesh.kumar@linux.vnet.ibm.com> wrote:
>> On Tue, 5 Oct 2010 13:15:42 -0400, Eric Van Hensbergen<ericvh@gmail.com> wrote:
>>> Ouch. Protocol change.
>>>
>>> Also - not sure I understand what's going on here. Why does mknod go
>>> through TLCREATE, shouldn't we have our
>>> own protocol messages for mknod?//
>>
>> This is needed for the below mknod usage
>>
>> mknod("k2", S_IFREG) ;
>>
>>
>
> May be a better fix is to make sure we use TLMKNOD instead of TLCREATE
> in case we get a create without LOOKUP_OPEN flags set. So how about
Yep. This sounds much better. :)
- JV
>
> diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
> index 2f904a8..e89754f 100644
> --- a/fs/9p/vfs_inode.c
> +++ b/fs/9p/vfs_inode.c
> @@ -55,6 +55,10 @@ static const struct inode_operations v9fs_file_inode_operations_dotl;
> static const struct inode_operations v9fs_symlink_inode_operations;
> static const struct inode_operations v9fs_symlink_inode_operations_dotl;
>
> +static int
> +v9fs_vfs_mknod_dotl(struct inode *dir, struct dentry *dentry, int omode,
> + dev_t rdev);
> +
> /**
> * unixmode2p9mode - convert unix mode bits to plan 9
> * @v9ses: v9fs session information
> @@ -681,8 +685,14 @@ v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, int omode,
> v9ses = v9fs_inode2v9ses(dir);
> if (nd&& nd->flags& LOOKUP_OPEN)
> flags = nd->intent.open.flags - 1;
> - else
> - flags = O_RDWR;
> + else {
> + /*
> + * create call without LOOKUP_OPEN is due
> + * to mknod of regular files. So use mknod
> + * operation.
> + */
> + return v9fs_vfs_mknod_dotl(dir, dentry, omode, 0);
> + }
>
> name = (char *) dentry->d_name.name;
> P9_DPRINTK(P9_DEBUG_VFS, "v9fs_vfs_create_dotl: name:%s flags:0x%x "
>
> ------------------------------------------------------------------------------
> Beautiful is writing same markup. Internet Explorer 9 supports
> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2& L3.
> Spend less time writing and rewriting code and more time creating great
> experiences on the web. Be a part of the beta today.
> http://p.sf.net/sfu/beautyoftheweb
> _______________________________________________
> V9fs-developer mailing list
> V9fs-developer@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/v9fs-developer
next prev parent reply other threads:[~2010-10-06 14:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-05 17:01 [PATCH 1/3] fs/9p: Update TLCREATE to allow create without open Aneesh Kumar K.V
2010-10-05 17:01 ` [PATCH 2/3] fs/9p: Add missing iput in v9fs_vfs_lookup Aneesh Kumar K.V
2010-10-05 23:29 ` [V9fs-developer] " Venkateswararao Jujjuri (JV)
2010-10-05 17:01 ` [PATCH 3/3] fs/9p: Use generic_file_open with lookup_instantiate_filp Aneesh Kumar K.V
2010-10-05 23:30 ` [V9fs-developer] " Venkateswararao Jujjuri (JV)
2010-10-05 17:15 ` [V9fs-developer] [PATCH 1/3] fs/9p: Update TLCREATE to allow create without open Eric Van Hensbergen
2010-10-05 18:19 ` Venkateswararao Jujjuri (JV)
2010-10-06 6:18 ` Aneesh Kumar K. V
2010-10-06 11:03 ` Aneesh Kumar K. V
2010-10-06 14:18 ` Venkateswararao Jujjuri (JV) [this message]
2010-10-06 14:59 ` Eric Van Hensbergen
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=4CAC8552.6090304@linux.vnet.ibm.com \
--to=jvrao@linux.vnet.ibm.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=ericvh@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=v9fs-developer@lists.sourceforge.net \
/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).