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

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
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -30,6 +30,8 @@
#define CREATE_TRACE_POINTS
#include <trace/events/9p.h>

#define DEFAULT_MSIZE (128 * 1024)

/*
  * Client Option Parsing (code inspired by NFS code)
  *  - a little lazy - parse all client options
@@ -65,7 +67,7 @@ EXPORT_SYMBOL(p9_is_proto_dotu);

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, ",trans=%s", clnt->trans_mod->name);

@@ -139,7 +141,7 @@ static int parse_opts(char *opts, struct p9_client *clnt)
	int ret = 0;

	clnt->proto_version = p9_proto_2000L;
	clnt->msize = 8192;
	clnt->msize = DEFAULT_MSIZE;

	if (!opts)
		return 0;
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@
#include <linux/syscalls.h> /* killme */

#define P9_PORT 564
#define MAX_SOCK_BUF (64*1024)
#define MAX_SOCK_BUF (1024*1024)
#define MAXPOLLWADDR	2

static struct p9_trans_module p9_tcp_trans;
+3 −1
Original line number Diff line number Diff line
@@ -610,7 +610,7 @@ static int p9_virtio_probe(struct virtio_device *vdev)
	chan->vc_wq = kmalloc(sizeof(wait_queue_head_t), GFP_KERNEL);
	if (!chan->vc_wq) {
		err = -ENOMEM;
		goto out_free_tag;
		goto out_remove_file;
	}
	init_waitqueue_head(chan->vc_wq);
	chan->ring_bufs_avail = 1;
@@ -628,6 +628,8 @@ static int p9_virtio_probe(struct virtio_device *vdev)

	return 0;

out_remove_file:
	sysfs_remove_file(&vdev->dev.kobj, &dev_attr_mount_tag.attr);
out_free_tag:
	kfree(tag);
out_free_vq:
+2 −2
Original line number Diff line number Diff line
@@ -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)
{
	struct xen_9pfs_front_priv *priv = NULL;
	struct xen_9pfs_front_priv *priv;
	RING_IDX cons, prod, masked_cons, masked_prod;
	unsigned long flags;
	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)
			break;
	}
	read_unlock(&xen_9pfs_lock);
	if (!priv || priv->client != client)
	if (list_entry_is_head(priv, &xen_9pfs_devs, list))
		return -EINVAL;

	num = p9_req->tc.tag % priv->num_rings;