提交 cf481442 编写于 作者: L Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
  9p: update documentation pointers
  9p: remove unnecessary v9fses->options which duplicates the mount string
  net/9p: insulate the client against an invalid error code sent by a 9p server
  9p: Add missing cast for the error return value in v9fs_get_inode
  9p: Remove redundant inode uid/gid assignment
  9p: Fix possible regressions when ->get_sb fails.
  9p: Fix v9fs show_options
  9p: Fix possible memleak in v9fs_inode_from fid.
  9p: minor comment fixes
  9p: Fix possible inode leak in v9fs_get_inode.
  9p: Check for error in return value of v9fs_fid_add
...@@ -123,6 +123,9 @@ available from the same CVS repository. ...@@ -123,6 +123,9 @@ available from the same CVS repository.
There are user and developer mailing lists available through the v9fs project There are user and developer mailing lists available through the v9fs project
on sourceforge (http://sourceforge.net/projects/v9fs). on sourceforge (http://sourceforge.net/projects/v9fs).
A stand-alone version of the module (which should build for any 2.6 kernel)
is available via (http://github.com/ericvh/9p-sac/tree/master)
News and other information is maintained on SWiK (http://swik.net/v9fs). News and other information is maintained on SWiK (http://swik.net/v9fs).
Bug reports may be issued through the kernel.org bugzilla Bug reports may be issued through the kernel.org bugzilla
......
...@@ -76,7 +76,7 @@ static const match_table_t tokens = { ...@@ -76,7 +76,7 @@ static const match_table_t tokens = {
* Return 0 upon success, -ERRNO upon failure. * Return 0 upon success, -ERRNO upon failure.
*/ */
static int v9fs_parse_options(struct v9fs_session_info *v9ses) static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts)
{ {
char *options; char *options;
substring_t args[MAX_OPT_ARGS]; substring_t args[MAX_OPT_ARGS];
...@@ -90,10 +90,10 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses) ...@@ -90,10 +90,10 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses)
v9ses->debug = 0; v9ses->debug = 0;
v9ses->cache = 0; v9ses->cache = 0;
if (!v9ses->options) if (!opts)
return 0; return 0;
options = kstrdup(v9ses->options, GFP_KERNEL); options = kstrdup(opts, GFP_KERNEL);
if (!options) { if (!options) {
P9_DPRINTK(P9_DEBUG_ERROR, P9_DPRINTK(P9_DEBUG_ERROR,
"failed to allocate copy of option string\n"); "failed to allocate copy of option string\n");
...@@ -206,24 +206,14 @@ struct p9_fid *v9fs_session_init(struct v9fs_session_info *v9ses, ...@@ -206,24 +206,14 @@ struct p9_fid *v9fs_session_init(struct v9fs_session_info *v9ses,
v9ses->uid = ~0; v9ses->uid = ~0;
v9ses->dfltuid = V9FS_DEFUID; v9ses->dfltuid = V9FS_DEFUID;
v9ses->dfltgid = V9FS_DEFGID; v9ses->dfltgid = V9FS_DEFGID;
if (data) {
v9ses->options = kstrdup(data, GFP_KERNEL);
if (!v9ses->options) {
P9_DPRINTK(P9_DEBUG_ERROR,
"failed to allocate copy of option string\n");
retval = -ENOMEM;
goto error;
}
}
rc = v9fs_parse_options(v9ses); rc = v9fs_parse_options(v9ses, data);
if (rc < 0) { if (rc < 0) {
retval = rc; retval = rc;
goto error; goto error;
} }
v9ses->clnt = p9_client_create(dev_name, v9ses->options); v9ses->clnt = p9_client_create(dev_name, data);
if (IS_ERR(v9ses->clnt)) { if (IS_ERR(v9ses->clnt)) {
retval = PTR_ERR(v9ses->clnt); retval = PTR_ERR(v9ses->clnt);
v9ses->clnt = NULL; v9ses->clnt = NULL;
...@@ -280,7 +270,6 @@ void v9fs_session_close(struct v9fs_session_info *v9ses) ...@@ -280,7 +270,6 @@ void v9fs_session_close(struct v9fs_session_info *v9ses)
__putname(v9ses->uname); __putname(v9ses->uname);
__putname(v9ses->aname); __putname(v9ses->aname);
kfree(v9ses->options);
} }
/** /**
......
...@@ -85,7 +85,6 @@ struct v9fs_session_info { ...@@ -85,7 +85,6 @@ struct v9fs_session_info {
unsigned int afid; unsigned int afid;
unsigned int cache; unsigned int cache;
char *options; /* copy of mount options */
char *uname; /* user name to mount as */ char *uname; /* user name to mount as */
char *aname; /* name of remote hierarchy being mounted */ char *aname; /* name of remote hierarchy being mounted */
unsigned int maxdata; /* max data for client interface */ unsigned int maxdata; /* max data for client interface */
......
...@@ -171,7 +171,6 @@ int v9fs_uflags2omode(int uflags, int extended) ...@@ -171,7 +171,6 @@ int v9fs_uflags2omode(int uflags, int extended)
/** /**
* v9fs_blank_wstat - helper function to setup a 9P stat structure * v9fs_blank_wstat - helper function to setup a 9P stat structure
* @v9ses: 9P session info (for determining extended mode)
* @wstat: structure to initialize * @wstat: structure to initialize
* *
*/ */
...@@ -207,65 +206,72 @@ v9fs_blank_wstat(struct p9_wstat *wstat) ...@@ -207,65 +206,72 @@ v9fs_blank_wstat(struct p9_wstat *wstat)
struct inode *v9fs_get_inode(struct super_block *sb, int mode) struct inode *v9fs_get_inode(struct super_block *sb, int mode)
{ {
int err;
struct inode *inode; struct inode *inode;
struct v9fs_session_info *v9ses = sb->s_fs_info; struct v9fs_session_info *v9ses = sb->s_fs_info;
P9_DPRINTK(P9_DEBUG_VFS, "super block: %p mode: %o\n", sb, mode); P9_DPRINTK(P9_DEBUG_VFS, "super block: %p mode: %o\n", sb, mode);
inode = new_inode(sb); inode = new_inode(sb);
if (inode) { if (!inode) {
inode->i_mode = mode;
inode->i_uid = current_fsuid();
inode->i_gid = current_fsgid();
inode->i_blocks = 0;
inode->i_rdev = 0;
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
inode->i_mapping->a_ops = &v9fs_addr_operations;
switch (mode & S_IFMT) {
case S_IFIFO:
case S_IFBLK:
case S_IFCHR:
case S_IFSOCK:
if (!v9fs_extended(v9ses)) {
P9_DPRINTK(P9_DEBUG_ERROR,
"special files without extended mode\n");
return ERR_PTR(-EINVAL);
}
init_special_inode(inode, inode->i_mode,
inode->i_rdev);
break;
case S_IFREG:
inode->i_op = &v9fs_file_inode_operations;
inode->i_fop = &v9fs_file_operations;
break;
case S_IFLNK:
if (!v9fs_extended(v9ses)) {
P9_DPRINTK(P9_DEBUG_ERROR,
"extended modes used w/o 9P2000.u\n");
return ERR_PTR(-EINVAL);
}
inode->i_op = &v9fs_symlink_inode_operations;
break;
case S_IFDIR:
inc_nlink(inode);
if (v9fs_extended(v9ses))
inode->i_op = &v9fs_dir_inode_operations_ext;
else
inode->i_op = &v9fs_dir_inode_operations;
inode->i_fop = &v9fs_dir_operations;
break;
default:
P9_DPRINTK(P9_DEBUG_ERROR,
"BAD mode 0x%x S_IFMT 0x%x\n",
mode, mode & S_IFMT);
return ERR_PTR(-EINVAL);
}
} else {
P9_EPRINTK(KERN_WARNING, "Problem allocating inode\n"); P9_EPRINTK(KERN_WARNING, "Problem allocating inode\n");
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
} }
inode->i_mode = mode;
inode->i_uid = current_fsuid();
inode->i_gid = current_fsgid();
inode->i_blocks = 0;
inode->i_rdev = 0;
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
inode->i_mapping->a_ops = &v9fs_addr_operations;
switch (mode & S_IFMT) {
case S_IFIFO:
case S_IFBLK:
case S_IFCHR:
case S_IFSOCK:
if (!v9fs_extended(v9ses)) {
P9_DPRINTK(P9_DEBUG_ERROR,
"special files without extended mode\n");
err = -EINVAL;
goto error;
}
init_special_inode(inode, inode->i_mode, inode->i_rdev);
break;
case S_IFREG:
inode->i_op = &v9fs_file_inode_operations;
inode->i_fop = &v9fs_file_operations;
break;
case S_IFLNK:
if (!v9fs_extended(v9ses)) {
P9_DPRINTK(P9_DEBUG_ERROR,
"extended modes used w/o 9P2000.u\n");
err = -EINVAL;
goto error;
}
inode->i_op = &v9fs_symlink_inode_operations;
break;
case S_IFDIR:
inc_nlink(inode);
if (v9fs_extended(v9ses))
inode->i_op = &v9fs_dir_inode_operations_ext;
else
inode->i_op = &v9fs_dir_inode_operations;
inode->i_fop = &v9fs_dir_operations;
break;
default:
P9_DPRINTK(P9_DEBUG_ERROR, "BAD mode 0x%x S_IFMT 0x%x\n",
mode, mode & S_IFMT);
err = -EINVAL;
goto error;
}
return inode; return inode;
error:
iput(inode);
return ERR_PTR(err);
} }
/* /*
...@@ -338,30 +344,25 @@ v9fs_inode_from_fid(struct v9fs_session_info *v9ses, struct p9_fid *fid, ...@@ -338,30 +344,25 @@ v9fs_inode_from_fid(struct v9fs_session_info *v9ses, struct p9_fid *fid,
ret = NULL; ret = NULL;
st = p9_client_stat(fid); st = p9_client_stat(fid);
if (IS_ERR(st)) { if (IS_ERR(st))
err = PTR_ERR(st); return ERR_CAST(st);
st = NULL;
goto error;
}
umode = p9mode2unixmode(v9ses, st->mode); umode = p9mode2unixmode(v9ses, st->mode);
ret = v9fs_get_inode(sb, umode); ret = v9fs_get_inode(sb, umode);
if (IS_ERR(ret)) { if (IS_ERR(ret)) {
err = PTR_ERR(ret); err = PTR_ERR(ret);
ret = NULL;
goto error; goto error;
} }
v9fs_stat2inode(st, ret, sb); v9fs_stat2inode(st, ret, sb);
ret->i_ino = v9fs_qid2ino(&st->qid); ret->i_ino = v9fs_qid2ino(&st->qid);
p9stat_free(st);
kfree(st); kfree(st);
return ret; return ret;
error: error:
p9stat_free(st);
kfree(st); kfree(st);
if (ret)
iput(ret);
return ERR_PTR(err); return ERR_PTR(err);
} }
...@@ -403,9 +404,9 @@ v9fs_open_created(struct inode *inode, struct file *file) ...@@ -403,9 +404,9 @@ v9fs_open_created(struct inode *inode, struct file *file)
* @v9ses: session information * @v9ses: session information
* @dir: directory that dentry is being created in * @dir: directory that dentry is being created in
* @dentry: dentry that is being created * @dentry: dentry that is being created
* @extension: 9p2000.u extension string to support devices, etc.
* @perm: create permissions * @perm: create permissions
* @mode: open mode * @mode: open mode
* @extension: 9p2000.u extension string to support devices, etc.
* *
*/ */
static struct p9_fid * static struct p9_fid *
...@@ -470,7 +471,10 @@ v9fs_create(struct v9fs_session_info *v9ses, struct inode *dir, ...@@ -470,7 +471,10 @@ v9fs_create(struct v9fs_session_info *v9ses, struct inode *dir,
dentry->d_op = &v9fs_dentry_operations; dentry->d_op = &v9fs_dentry_operations;
d_instantiate(dentry, inode); d_instantiate(dentry, inode);
v9fs_fid_add(dentry, fid); err = v9fs_fid_add(dentry, fid);
if (err < 0)
goto error;
return ofid; return ofid;
error: error:
......
...@@ -81,7 +81,7 @@ static int v9fs_set_super(struct super_block *s, void *data) ...@@ -81,7 +81,7 @@ static int v9fs_set_super(struct super_block *s, void *data)
static void static void
v9fs_fill_super(struct super_block *sb, struct v9fs_session_info *v9ses, v9fs_fill_super(struct super_block *sb, struct v9fs_session_info *v9ses,
int flags) int flags, void *data)
{ {
sb->s_maxbytes = MAX_LFS_FILESIZE; sb->s_maxbytes = MAX_LFS_FILESIZE;
sb->s_blocksize_bits = fls(v9ses->maxdata - 1); sb->s_blocksize_bits = fls(v9ses->maxdata - 1);
...@@ -91,6 +91,8 @@ v9fs_fill_super(struct super_block *sb, struct v9fs_session_info *v9ses, ...@@ -91,6 +91,8 @@ v9fs_fill_super(struct super_block *sb, struct v9fs_session_info *v9ses,
sb->s_flags = flags | MS_ACTIVE | MS_SYNCHRONOUS | MS_DIRSYNC | sb->s_flags = flags | MS_ACTIVE | MS_SYNCHRONOUS | MS_DIRSYNC |
MS_NOATIME; MS_NOATIME;
save_mount_options(sb, data);
} }
/** /**
...@@ -113,14 +115,11 @@ static int v9fs_get_sb(struct file_system_type *fs_type, int flags, ...@@ -113,14 +115,11 @@ static int v9fs_get_sb(struct file_system_type *fs_type, int flags,
struct v9fs_session_info *v9ses = NULL; struct v9fs_session_info *v9ses = NULL;
struct p9_wstat *st = NULL; struct p9_wstat *st = NULL;
int mode = S_IRWXUGO | S_ISVTX; int mode = S_IRWXUGO | S_ISVTX;
uid_t uid = current_fsuid();
gid_t gid = current_fsgid();
struct p9_fid *fid; struct p9_fid *fid;
int retval = 0; int retval = 0;
P9_DPRINTK(P9_DEBUG_VFS, " \n"); P9_DPRINTK(P9_DEBUG_VFS, " \n");
st = NULL;
v9ses = kzalloc(sizeof(struct v9fs_session_info), GFP_KERNEL); v9ses = kzalloc(sizeof(struct v9fs_session_info), GFP_KERNEL);
if (!v9ses) if (!v9ses)
return -ENOMEM; return -ENOMEM;
...@@ -142,7 +141,7 @@ static int v9fs_get_sb(struct file_system_type *fs_type, int flags, ...@@ -142,7 +141,7 @@ static int v9fs_get_sb(struct file_system_type *fs_type, int flags,
retval = PTR_ERR(sb); retval = PTR_ERR(sb);
goto free_stat; goto free_stat;
} }
v9fs_fill_super(sb, v9ses, flags); v9fs_fill_super(sb, v9ses, flags, data);
inode = v9fs_get_inode(sb, S_IFDIR | mode); inode = v9fs_get_inode(sb, S_IFDIR | mode);
if (IS_ERR(inode)) { if (IS_ERR(inode)) {
...@@ -150,9 +149,6 @@ static int v9fs_get_sb(struct file_system_type *fs_type, int flags, ...@@ -150,9 +149,6 @@ static int v9fs_get_sb(struct file_system_type *fs_type, int flags,
goto release_sb; goto release_sb;
} }
inode->i_uid = uid;
inode->i_gid = gid;
root = d_alloc_root(inode); root = d_alloc_root(inode);
if (!root) { if (!root) {
iput(inode); iput(inode);
...@@ -173,10 +169,8 @@ P9_DPRINTK(P9_DEBUG_VFS, " simple set mount, return 0\n"); ...@@ -173,10 +169,8 @@ P9_DPRINTK(P9_DEBUG_VFS, " simple set mount, return 0\n");
simple_set_mnt(mnt, sb); simple_set_mnt(mnt, sb);
return 0; return 0;
release_sb:
deactivate_locked_super(sb);
free_stat: free_stat:
p9stat_free(st);
kfree(st); kfree(st);
clunk_fid: clunk_fid:
...@@ -185,7 +179,12 @@ P9_DPRINTK(P9_DEBUG_VFS, " simple set mount, return 0\n"); ...@@ -185,7 +179,12 @@ P9_DPRINTK(P9_DEBUG_VFS, " simple set mount, return 0\n");
close_session: close_session:
v9fs_session_close(v9ses); v9fs_session_close(v9ses);
kfree(v9ses); kfree(v9ses);
return retval;
release_sb:
p9stat_free(st);
kfree(st);
deactivate_locked_super(sb);
return retval; return retval;
} }
...@@ -207,24 +206,10 @@ static void v9fs_kill_super(struct super_block *s) ...@@ -207,24 +206,10 @@ static void v9fs_kill_super(struct super_block *s)
v9fs_session_close(v9ses); v9fs_session_close(v9ses);
kfree(v9ses); kfree(v9ses);
s->s_fs_info = NULL;
P9_DPRINTK(P9_DEBUG_VFS, "exiting kill_super\n"); P9_DPRINTK(P9_DEBUG_VFS, "exiting kill_super\n");
} }
/**
* v9fs_show_options - Show mount options in /proc/mounts
* @m: seq_file to write to
* @mnt: mount descriptor
*
*/
static int v9fs_show_options(struct seq_file *m, struct vfsmount *mnt)
{
struct v9fs_session_info *v9ses = mnt->mnt_sb->s_fs_info;
seq_printf(m, "%s", v9ses->options);
return 0;
}
static void static void
v9fs_umount_begin(struct super_block *sb) v9fs_umount_begin(struct super_block *sb)
{ {
...@@ -237,7 +222,7 @@ v9fs_umount_begin(struct super_block *sb) ...@@ -237,7 +222,7 @@ v9fs_umount_begin(struct super_block *sb)
static const struct super_operations v9fs_super_ops = { static const struct super_operations v9fs_super_ops = {
.statfs = simple_statfs, .statfs = simple_statfs,
.clear_inode = v9fs_clear_inode, .clear_inode = v9fs_clear_inode,
.show_options = v9fs_show_options, .show_options = generic_show_options,
.umount_begin = v9fs_umount_begin, .umount_begin = v9fs_umount_begin,
}; };
......
...@@ -60,9 +60,9 @@ static struct p9_req_t * ...@@ -60,9 +60,9 @@ static struct p9_req_t *
p9_client_rpc(struct p9_client *c, int8_t type, const char *fmt, ...); p9_client_rpc(struct p9_client *c, int8_t type, const char *fmt, ...);
/** /**
* v9fs_parse_options - parse mount options into session structure * parse_options - parse mount options into client structure
* @options: options string passed from mount * @opts: options string passed from mount
* @v9ses: existing v9fs session information * @clnt: existing v9fs client information
* *
* Return 0 upon success, -ERRNO upon failure * Return 0 upon success, -ERRNO upon failure
*/ */
...@@ -232,7 +232,7 @@ EXPORT_SYMBOL(p9_tag_lookup); ...@@ -232,7 +232,7 @@ EXPORT_SYMBOL(p9_tag_lookup);
/** /**
* p9_tag_init - setup tags structure and contents * p9_tag_init - setup tags structure and contents
* @tags: tags structure from the client struct * @c: v9fs client struct
* *
* This initializes the tags structure for each client instance. * This initializes the tags structure for each client instance.
* *
...@@ -258,7 +258,7 @@ static int p9_tag_init(struct p9_client *c) ...@@ -258,7 +258,7 @@ static int p9_tag_init(struct p9_client *c)
/** /**
* p9_tag_cleanup - cleans up tags structure and reclaims resources * p9_tag_cleanup - cleans up tags structure and reclaims resources
* @tags: tags structure from the client struct * @c: v9fs client struct
* *
* This frees resources associated with the tags structure * This frees resources associated with the tags structure
* *
...@@ -411,14 +411,9 @@ static int p9_check_errors(struct p9_client *c, struct p9_req_t *req) ...@@ -411,14 +411,9 @@ static int p9_check_errors(struct p9_client *c, struct p9_req_t *req)
if (c->dotu) if (c->dotu)
err = -ecode; err = -ecode;
if (!err) { if (!err || !IS_ERR_VALUE(err))
err = p9_errstr2errno(ename, strlen(ename)); err = p9_errstr2errno(ename, strlen(ename));
/* string match failed */
if (!err)
err = -ESERVERFAULT;
}
P9_DPRINTK(P9_DEBUG_9P, "<<< RERROR (%d) %s\n", -ecode, ename); P9_DPRINTK(P9_DEBUG_9P, "<<< RERROR (%d) %s\n", -ecode, ename);
kfree(ename); kfree(ename);
...@@ -430,8 +425,8 @@ static int p9_check_errors(struct p9_client *c, struct p9_req_t *req) ...@@ -430,8 +425,8 @@ static int p9_check_errors(struct p9_client *c, struct p9_req_t *req)
/** /**
* p9_client_flush - flush (cancel) a request * p9_client_flush - flush (cancel) a request
* c: client state * @c: client state
* req: request to cancel * @oldreq: request to cancel
* *
* This sents a flush for a particular requests and links * This sents a flush for a particular requests and links
* the flush request to the original request. The current * the flush request to the original request. The current
......
...@@ -239,7 +239,7 @@ int p9_errstr2errno(char *errstr, int len) ...@@ -239,7 +239,7 @@ int p9_errstr2errno(char *errstr, int len)
errstr[len] = 0; errstr[len] = 0;
printk(KERN_ERR "%s: server reported unknown error %s\n", printk(KERN_ERR "%s: server reported unknown error %s\n",
__func__, errstr); __func__, errstr);
errno = 1; errno = ESERVERFAULT;
} }
return -errno; return -errno;
......
...@@ -119,8 +119,8 @@ struct p9_poll_wait { ...@@ -119,8 +119,8 @@ struct p9_poll_wait {
* @wpos: write position for current frame * @wpos: write position for current frame
* @wsize: amount of data to write for current frame * @wsize: amount of data to write for current frame
* @wbuf: current write buffer * @wbuf: current write buffer
* @poll_pending_link: pending links to be polled per conn
* @poll_wait: array of wait_q's for various worker threads * @poll_wait: array of wait_q's for various worker threads
* @poll_waddr: ????
* @pt: poll state * @pt: poll state
* @rq: current read work * @rq: current read work
* @wq: current write work * @wq: current write work
...@@ -700,9 +700,9 @@ static int p9_fd_cancel(struct p9_client *client, struct p9_req_t *req) ...@@ -700,9 +700,9 @@ static int p9_fd_cancel(struct p9_client *client, struct p9_req_t *req)
} }
/** /**
* parse_options - parse mount options into session structure * parse_opts - parse mount options into p9_fd_opts structure
* @options: options string passed from mount * @params: options string passed from mount
* @opts: transport-specific structure to parse options into * @opts: fd transport-specific structure to parse options into
* *
* Returns 0 upon success, -ERRNO upon failure * Returns 0 upon success, -ERRNO upon failure
*/ */
......
...@@ -67,14 +67,15 @@ ...@@ -67,14 +67,15 @@
* @pd: Protection Domain pointer * @pd: Protection Domain pointer
* @qp: Queue Pair pointer * @qp: Queue Pair pointer
* @cq: Completion Queue pointer * @cq: Completion Queue pointer
* @dm_mr: DMA Memory Region pointer
* @lkey: The local access only memory region key * @lkey: The local access only memory region key
* @timeout: Number of uSecs to wait for connection management events * @timeout: Number of uSecs to wait for connection management events
* @sq_depth: The depth of the Send Queue * @sq_depth: The depth of the Send Queue
* @sq_sem: Semaphore for the SQ * @sq_sem: Semaphore for the SQ
* @rq_depth: The depth of the Receive Queue. * @rq_depth: The depth of the Receive Queue.
* @rq_count: Count of requests in the Receive Queue.
* @addr: The remote peer's address * @addr: The remote peer's address
* @req_lock: Protects the active request list * @req_lock: Protects the active request list
* @send_wait: Wait list when the SQ fills up
* @cm_done: Completion event for connection management tracking * @cm_done: Completion event for connection management tracking
*/ */
struct p9_trans_rdma { struct p9_trans_rdma {
...@@ -154,9 +155,9 @@ static match_table_t tokens = { ...@@ -154,9 +155,9 @@ static match_table_t tokens = {
}; };
/** /**
* parse_options - parse mount options into session structure * parse_opts - parse mount options into rdma options structure
* @options: options string passed from mount * @params: options string passed from mount
* @opts: transport-specific structure to parse options into * @opts: rdma transport-specific structure to parse options into
* *
* Returns 0 upon success, -ERRNO upon failure * Returns 0 upon success, -ERRNO upon failure
*/ */
......
...@@ -57,11 +57,9 @@ static int chan_index; ...@@ -57,11 +57,9 @@ static int chan_index;
* @initialized: whether the channel is initialized * @initialized: whether the channel is initialized
* @inuse: whether the channel is in use * @inuse: whether the channel is in use
* @lock: protects multiple elements within this structure * @lock: protects multiple elements within this structure
* @client: client instance
* @vdev: virtio dev associated with this channel * @vdev: virtio dev associated with this channel
* @vq: virtio queue associated with this channel * @vq: virtio queue associated with this channel
* @tagpool: accounting for tag ids (and request slots)
* @reqs: array of request slots
* @max_tag: current number of request_slots allocated
* @sg: scatter gather list which is used to pack a request (protected?) * @sg: scatter gather list which is used to pack a request (protected?)
* *
* We keep all per-channel information in a structure. * We keep all per-channel information in a structure.
...@@ -92,7 +90,7 @@ static unsigned int rest_of_page(void *data) ...@@ -92,7 +90,7 @@ static unsigned int rest_of_page(void *data)
/** /**
* p9_virtio_close - reclaim resources of a channel * p9_virtio_close - reclaim resources of a channel
* @trans: transport state * @client: client instance
* *
* This reclaims a channel by freeing its resources and * This reclaims a channel by freeing its resources and
* reseting its inuse flag. * reseting its inuse flag.
...@@ -181,9 +179,8 @@ static int p9_virtio_cancel(struct p9_client *client, struct p9_req_t *req) ...@@ -181,9 +179,8 @@ static int p9_virtio_cancel(struct p9_client *client, struct p9_req_t *req)
/** /**
* p9_virtio_request - issue a request * p9_virtio_request - issue a request
* @t: transport state * @client: client instance issuing the request
* @tc: &p9_fcall request to transmit * @req: request to be issued
* @rc: &p9_fcall to put reponse into
* *
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册