Commit 34c59da4 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag '9p-for-5.15-rc1' of git://github.com/martinetd/linux

Pull 9p updates from Dominique Martinet:
 "A couple of harmless fixes, increase max tcp msize (64KB -> 1MB), and
  increase default msize (8KB -> 128KB)

  The default increase has been discussed with Christian for the qemu
  side of things but makes sense for all supported transports"

* tag '9p-for-5.15-rc1' of git://github.com/martinetd/linux:
  net/9p: increase default msize to 128k
  net/9p: use macro to define default msize
  net/9p: increase tcp max msize to 1MB
  9p/xen: Fix end of loop tests for list_for_each_entry
  9p/trans_virtio: Remove sysfs file on probe failure
parents 2d338201 9c4d94dc
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
#define CREATE_TRACE_POINTS #define CREATE_TRACE_POINTS
#include <trace/events/9p.h> #include <trace/events/9p.h>
#define DEFAULT_MSIZE (128 * 1024)
/* /*
* Client Option Parsing (code inspired by NFS code) * Client Option Parsing (code inspired by NFS code)
* - a little lazy - parse all client options * - a little lazy - parse all client options
...@@ -65,7 +67,7 @@ EXPORT_SYMBOL(p9_is_proto_dotu); ...@@ -65,7 +67,7 @@ EXPORT_SYMBOL(p9_is_proto_dotu);
int p9_show_client_options(struct seq_file *m, struct p9_client *clnt) int p9_show_client_options(struct seq_file *m, struct p9_client *clnt)
{ {
if (clnt->msize != 8192) if (clnt->msize != DEFAULT_MSIZE)
seq_printf(m, ",msize=%u", clnt->msize); seq_printf(m, ",msize=%u", clnt->msize);
seq_printf(m, ",trans=%s", clnt->trans_mod->name); seq_printf(m, ",trans=%s", clnt->trans_mod->name);
...@@ -139,7 +141,7 @@ static int parse_opts(char *opts, struct p9_client *clnt) ...@@ -139,7 +141,7 @@ static int parse_opts(char *opts, struct p9_client *clnt)
int ret = 0; int ret = 0;
clnt->proto_version = p9_proto_2000L; clnt->proto_version = p9_proto_2000L;
clnt->msize = 8192; clnt->msize = DEFAULT_MSIZE;
if (!opts) if (!opts)
return 0; return 0;
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#include <linux/syscalls.h> /* killme */ #include <linux/syscalls.h> /* killme */
#define P9_PORT 564 #define P9_PORT 564
#define MAX_SOCK_BUF (64*1024) #define MAX_SOCK_BUF (1024*1024)
#define MAXPOLLWADDR 2 #define MAXPOLLWADDR 2
static struct p9_trans_module p9_tcp_trans; static struct p9_trans_module p9_tcp_trans;
......
...@@ -610,7 +610,7 @@ static int p9_virtio_probe(struct virtio_device *vdev) ...@@ -610,7 +610,7 @@ static int p9_virtio_probe(struct virtio_device *vdev)
chan->vc_wq = kmalloc(sizeof(wait_queue_head_t), GFP_KERNEL); chan->vc_wq = kmalloc(sizeof(wait_queue_head_t), GFP_KERNEL);
if (!chan->vc_wq) { if (!chan->vc_wq) {
err = -ENOMEM; err = -ENOMEM;
goto out_free_tag; goto out_remove_file;
} }
init_waitqueue_head(chan->vc_wq); init_waitqueue_head(chan->vc_wq);
chan->ring_bufs_avail = 1; chan->ring_bufs_avail = 1;
...@@ -628,6 +628,8 @@ static int p9_virtio_probe(struct virtio_device *vdev) ...@@ -628,6 +628,8 @@ static int p9_virtio_probe(struct virtio_device *vdev)
return 0; return 0;
out_remove_file:
sysfs_remove_file(&vdev->dev.kobj, &dev_attr_mount_tag.attr);
out_free_tag: out_free_tag:
kfree(tag); kfree(tag);
out_free_vq: out_free_vq:
......
...@@ -138,7 +138,7 @@ static bool p9_xen_write_todo(struct xen_9pfs_dataring *ring, RING_IDX size) ...@@ -138,7 +138,7 @@ static bool p9_xen_write_todo(struct xen_9pfs_dataring *ring, RING_IDX size)
static int p9_xen_request(struct p9_client *client, struct p9_req_t *p9_req) static int p9_xen_request(struct p9_client *client, struct p9_req_t *p9_req)
{ {
struct xen_9pfs_front_priv *priv = NULL; struct xen_9pfs_front_priv *priv;
RING_IDX cons, prod, masked_cons, masked_prod; RING_IDX cons, prod, masked_cons, masked_prod;
unsigned long flags; unsigned long flags;
u32 size = p9_req->tc.size; u32 size = p9_req->tc.size;
...@@ -151,7 +151,7 @@ static int p9_xen_request(struct p9_client *client, struct p9_req_t *p9_req) ...@@ -151,7 +151,7 @@ static int p9_xen_request(struct p9_client *client, struct p9_req_t *p9_req)
break; break;
} }
read_unlock(&xen_9pfs_lock); read_unlock(&xen_9pfs_lock);
if (!priv || priv->client != client) if (list_entry_is_head(priv, &xen_9pfs_devs, list))
return -EINVAL; return -EINVAL;
num = p9_req->tc.tag % priv->num_rings; num = p9_req->tc.tag % priv->num_rings;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment