From patchwork Sun May 8 18:46:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Landley X-Patchwork-Id: 766202 X-Patchwork-Delegate: ericvh@gmail.com Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p48IlD6n025826 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 8 May 2011 18:47:35 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.74) (envelope-from ) id 1QJ90G-000509-QH; Sun, 08 May 2011 18:46:52 +0000 Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.74) (envelope-from ) id 1QJ90F-000503-9Z for v9fs-developer@lists.sourceforge.net; Sun, 08 May 2011 18:46:51 +0000 X-ACL-Warn: Received: from mail-gw0-f47.google.com ([74.125.83.47]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-MD5:128) (Exim 4.74) id 1QJ90E-0002DA-Ax for v9fs-developer@lists.sourceforge.net; Sun, 08 May 2011 18:46:51 +0000 Received: by gwb11 with SMTP id 11so2191899gwb.34 for ; Sun, 08 May 2011 11:46:44 -0700 (PDT) Received: by 10.91.206.3 with SMTP id i3mr3553822agq.153.1304880404662; Sun, 08 May 2011 11:46:44 -0700 (PDT) Received: from [192.168.42.242] (m675636d0.tmodns.net [208.54.86.103]) by mx.google.com with ESMTPS id d36sm5539112and.4.2011.05.08.11.46.41 (version=SSLv3 cipher=OTHER); Sun, 08 May 2011 11:46:43 -0700 (PDT) Message-ID: <4DC6E50E.8010509@landley.net> Date: Sun, 08 May 2011 13:46:38 -0500 From: Rob Landley User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10 MIME-Version: 1.0 To: v9fs-developer@lists.sourceforge.net X-Spam-Score: 0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. X-Headers-End: 1QJ90E-0002DA-Ax Subject: [V9fs-developer] [PATCH] Read, read, read the code... X-BeenThere: v9fs-developer@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: v9fs-developer-bounces@lists.sourceforge.net X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Sun, 08 May 2011 18:47:35 +0000 (UTC) From: Rob Landley Typo fixes and minor cleanups for v9fs Signed-off-by: Rob Landley Reviewed-by: Venkateswararao Jujjuri (JV) --- include/net/9p/9p.h | 10 +++++----- include/net/9p/client.h | 2 +- include/net/9p/transport.h | 3 ++- net/9p/client.c | 10 +++++----- 4 files changed, 13 insertions(+), 12 deletions(-) ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h index d2df55b..104fec3 100644 --- a/include/net/9p/9p.h +++ b/include/net/9p/9p.h @@ -241,10 +241,10 @@ enum p9_open_mode_t { /** * enum p9_perm_t - 9P permissions - * @P9_DMDIR: mode bite for directories + * @P9_DMDIR: mode bit for directories * @P9_DMAPPEND: mode bit for is append-only * @P9_DMEXCL: mode bit for excluse use (only one open handle allowed) - * @P9_DMMOUNT: mode bite for mount points + * @P9_DMMOUNT: mode bit for mount points * @P9_DMAUTH: mode bit for authentication file * @P9_DMTMP: mode bit for non-backed-up files * @P9_DMSYMLINK: mode bit for symbolic links (9P2000.u) @@ -362,7 +362,7 @@ struct p9_qid { }; /** - * struct p9_stat - file system metadata information + * struct p9_wstat - file system metadata information * @size: length prefix for this stat structure instance * @type: the type of the server (equivalent to a major number) * @dev: the sub-type of the server (equivalent to a minor number) @@ -687,10 +687,10 @@ struct p9_rwstat { * @size: prefixed length of the structure * @id: protocol operating identifier of type &p9_msg_t * @tag: transaction id of the request - * @offset: used by marshalling routines to track currentposition in buffer + * @offset: used by marshalling routines to track current position in buffer * @capacity: used by marshalling routines to track total malloc'd capacity * @pubuf: Payload user buffer given by the caller - * @pubuf: Payload kernel buffer given by the caller + * @pkbuf: Payload kernel buffer given by the caller * @pbuf_size: pubuf/pkbuf(only one will be !NULL) size to be read/write. * @private: For transport layer's use. * @sdata: payload diff --git a/include/net/9p/client.h b/include/net/9p/client.h index 051a99f..d1dbca9 100644 --- a/include/net/9p/client.h +++ b/include/net/9p/client.h @@ -60,7 +60,7 @@ enum p9_trans_status { }; /** - * enum p9_req_status_t - virtio request status + * enum p9_req_status_t - status of a request * @REQ_STATUS_IDLE: request slot unused * @REQ_STATUS_ALLOC: request has been allocated but not sent * @REQ_STATUS_UNSENT: request waiting to be sent diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h index 8f08c73..d8549fb 100644 --- a/include/net/9p/transport.h +++ b/include/net/9p/transport.h @@ -41,6 +41,7 @@ * @pref: Preferences of this transport * @def: set if this transport should be considered the default * @create: member function to create a new connection on this transport + * @close: member function to discard a connection on this transport * @request: member function to issue a request to the transport * @cancel: member function to cancel a request (if it hasn't been sent) * @@ -48,7 +49,7 @@ * transport module with the 9P core network module and used by the client * to instantiate a new connection on a transport. * - * BUGS: the transport module list isn't protected. + * The transport module list is protected by v9fs_trans_lock. */ struct p9_trans_module { diff --git a/net/9p/client.c b/net/9p/client.c index 7736774..b551274 100644 --- a/net/9p/client.c +++ b/net/9p/client.c @@ -92,9 +92,6 @@ static int get_protocol_version(const substring_t *name) return version; } -static struct p9_req_t * -p9_client_rpc(struct p9_client *c, int8_t type, const char *fmt, ...); - /** * parse_options - parse mount options into client structure * @opts: options string passed from mount @@ -518,12 +515,15 @@ out_err: return err; } +static struct p9_req_t * +p9_client_rpc(struct p9_client *c, int8_t type, const char *fmt, ...); + /** * p9_client_flush - flush (cancel) a request * @c: client state * @oldreq: request to cancel * - * This sents a flush for a particular requests and links + * This sents a flush for a particular request and links * the flush request to the original request. The current * code only supports a single flush request although the protocol * allows for multiple flush requests to be sent for a single request. @@ -1299,7 +1299,7 @@ p9_client_read(struct p9_fid *fid, char *data, char __user *udata, u64 offset, if (count < rsize) rsize = count; - /* Don't bother zerocopy form small IO (< 1024) */ + /* Don't bother zerocopy for small IO (< 1024) */ if (((clnt->trans_mod->pref & P9_TRANS_PREF_PAYLOAD_MASK) == P9_TRANS_PREF_PAYLOAD_SEP) && (rsize > 1024)) { req = p9_client_rpc(clnt, P9_TREAD, "dqE", fid->fid, offset,