From: Eric Van Hensbergen <ericvh@gmail.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: v9fs-developer@lists.sourceforge.net,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [V9fs-developer] [PATCH 3/3] 9p: add 9P2000.L unlinkat operation
Date: Tue, 14 Jun 2011 10:14:55 -0500 [thread overview]
Message-ID: <BANLkTikn+O0P6SOhR0r7hCNP_U45iQ6-dQ@mail.gmail.com> (raw)
In-Reply-To: <87oc20ew5b.fsf@linux.vnet.ibm.com>
On Tue, Jun 14, 2011 at 1:59 AM, Aneesh Kumar K.V
<aneesh.kumar@linux.vnet.ibm.com> wrote:
> On Mon, 13 Jun 2011 16:12:52 -0500, Eric Van Hensbergen <ericvh@gmail.com> wrote:
>> Could be wrong, but a quick regression check of your patches fails
>> against a legacy server. Are you making sure the new operations are
>> properly protected by a .L flag?
>
> How about below diff
>
> [3.0-pending@v9fs]$ git diff
> diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
> index f40fdc3..436699e 100644
> --- a/fs/9p/vfs_inode.c
> +++ b/fs/9p/vfs_inode.c
> @@ -499,13 +499,15 @@ v9fs_inode_from_fid(struct v9fs_session_info *v9ses, struct p9_fid *fid,
>
> static int v9fs_remove(struct inode *dir, struct dentry *dentry, int flags)
> {
> - int retval;
> struct inode *inode;
> + int retval = -EOPNOTSUPP;
> struct p9_fid *v9fid, *dfid;
> + struct v9fs_session_info *v9ses;
>
> P9_DPRINTK(P9_DEBUG_VFS, "inode: %p dentry: %p rmdir: %x\n",
> dir, dentry, flags);
>
> + v9ses = v9fs_inode2v9ses(dir);
> inode = dentry->d_inode;
> dfid = v9fs_fid_lookup(dentry->d_parent);
> if (IS_ERR(dfid)) {
> @@ -513,7 +515,8 @@ static int v9fs_remove(struct inode *dir, struct dentry *dentry, int flags)
> P9_DPRINTK(P9_DEBUG_VFS, "fid lookup failed %d\n", retval);
> return retval;
> }
> - retval = p9_client_unlinkat(dfid, dentry->d_name.name, flags);
> + if (v9fs_proto_dotl(v9ses))
> + retval = p9_client_unlinkat(dfid, dentry->d_name.name, flags);
> if (retval == -EOPNOTSUPP) {
> /* Try the one based on path */
> v9fid = v9fs_fid_clone(dentry);
>
Looks right.
>
> related to renameat i have updated to check for -EOPNOTSUPP instead of
> -ENOSYS. I am not sure any other dotl server out there is returning
> -ENOSYS. We haven't documented what the server should return in case it
> doesn't support any specific operation.
>
Yeah, the real tricky thing is I'm not sure what the other 9p servers
will send back since there are so many of them. I guess for dotl all
we need to do is look at diod and see what they are returning
(however, I'm sure they'll change if we want to make EOPNOTSUPP
standard).
-eric
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2011-06-14 15:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-06 18:01 [PATCH 1/3] 9p: add 9P2000.L renameat operation Aneesh Kumar K.V
2011-06-06 18:01 ` [PATCH 2/3] fs/9p: remove rename work around in 9p Aneesh Kumar K.V
2011-06-06 18:01 ` [PATCH 3/3] 9p: add 9P2000.L unlinkat operation Aneesh Kumar K.V
2011-06-13 21:12 ` [V9fs-developer] " Eric Van Hensbergen
2011-06-14 6:59 ` Aneesh Kumar K.V
2011-06-14 15:14 ` Eric Van Hensbergen [this message]
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=BANLkTikn+O0P6SOhR0r7hCNP_U45iQ6-dQ@mail.gmail.com \
--to=ericvh@gmail.com \
--cc=aneesh.kumar@linux.vnet.ibm.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).