All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Aneesh Kumar K. V" <aneesh.kumar@linux.vnet.ibm.com>
To: "Venkateswararao Jujjuri \(JV\)" <jvrao@linux.vnet.ibm.com>,
	v9fs-developer@lists.sourceforge.net
Cc: linux-fsdevel@vger.kernel.org,
	"Venkateswararao Jujjuri \(JV\)" <jvrao@linux.vnet.ibm.com>
Subject: Re: [PATCH] [fs/9p] Make access=client default in 9p2000.L protocol
Date: Thu, 27 Jan 2011 19:58:51 +0530	[thread overview]
Message-ID: <87oc72xvx8.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <1296111339-17414-1-git-send-email-jvrao@linux.vnet.ibm.com>

On Wed, 26 Jan 2011 22:55:39 -0800, "Venkateswararao Jujjuri (JV)" <jvrao@linux.vnet.ibm.com> wrote:
> Current code sets access=user as default for all protocol versions.
> This patch chagnes it to "client" only for dotl.
> 
> User can always specify particular access mode with -o access= option.
> No change there.
> 
> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
> ---
>  fs/9p/v9fs.c |   21 ++++++++++++---------
>  1 files changed, 12 insertions(+), 9 deletions(-)
> 
> diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
> index 7823a7c..b9f6c34 100644
> --- a/fs/9p/v9fs.c
> +++ b/fs/9p/v9fs.c
> @@ -263,19 +263,12 @@ struct p9_fid *v9fs_session_init(struct v9fs_session_info *v9ses,
>  	list_add(&v9ses->slist, &v9fs_sessionlist);
>  	spin_unlock(&v9fs_sessionlist_lock);
> 
> -	v9ses->flags = V9FS_ACCESS_USER;
>  	strcpy(v9ses->uname, V9FS_DEFUSER);
>  	strcpy(v9ses->aname, V9FS_DEFANAME);
>  	v9ses->uid = ~0;
>  	v9ses->dfltuid = V9FS_DEFUID;
>  	v9ses->dfltgid = V9FS_DEFGID;
> 
> -	rc = v9fs_parse_options(v9ses, data);
> -	if (rc < 0) {
> -		retval = rc;
> -		goto error;
> -	}
> -

Now we do v9fs option parsing after client_create ? is that ok ?

>  	v9ses->clnt = p9_client_create(dev_name, data);
>  	if (IS_ERR(v9ses->clnt)) {
>  		retval = PTR_ERR(v9ses->clnt);
> @@ -284,10 +277,20 @@ struct p9_fid *v9fs_session_init(struct v9fs_session_info *v9ses,
>  		goto error;
>  	}
> 
> -	if (p9_is_proto_dotl(v9ses->clnt))
> +	v9ses->flags = V9FS_ACCESS_USER;
> +
> +	if (p9_is_proto_dotl(v9ses->clnt)) {
> +		v9ses->flags = V9FS_ACCESS_CLIENT;
>  		v9ses->flags |= V9FS_PROTO_2000L;
> -	else if (p9_is_proto_dotu(v9ses->clnt))
> +	} else if (p9_is_proto_dotu(v9ses->clnt)) {
>  		v9ses->flags |= V9FS_PROTO_2000U;
> +	}
> +
> +	rc = v9fs_parse_options(v9ses, data);
> +	if (rc < 0) {
> +		retval = rc;
> +		goto error;

Don't we need a p9_client_destroy there ?

> +	}
> 
>  	v9ses->maxdata = v9ses->clnt->msize - P9_IOHDRSZ;
> 

-aneesh

  reply	other threads:[~2011-01-27 14:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-27  6:55 [PATCH] [fs/9p] Make access=client default in 9p2000.L protocol Venkateswararao Jujjuri (JV)
2011-01-27 14:28 ` Aneesh Kumar K. V [this message]
2011-01-27 17:38   ` Venkateswararao Jujjuri (JV)

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=87oc72xvx8.fsf@linux.vnet.ibm.com \
    --to=aneesh.kumar@linux.vnet.ibm.com \
    --cc=jvrao@linux.vnet.ibm.com \
    --cc=linux-fsdevel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.