Skip to content

Commit 34c59da

Browse files
committed
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
2 parents 2d33820 + 9c4d94d commit 34c59da

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

net/9p/client.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
#define CREATE_TRACE_POINTS
3131
#include <trace/events/9p.h>
3232

33+
#define DEFAULT_MSIZE (128 * 1024)
34+
3335
/*
3436
* Client Option Parsing (code inspired by NFS code)
3537
* - a little lazy - parse all client options
@@ -65,7 +67,7 @@ EXPORT_SYMBOL(p9_is_proto_dotu);
6567

6668
int p9_show_client_options(struct seq_file *m, struct p9_client *clnt)
6769
{
68-
if (clnt->msize != 8192)
70+
if (clnt->msize != DEFAULT_MSIZE)
6971
seq_printf(m, ",msize=%u", clnt->msize);
7072
seq_printf(m, ",trans=%s", clnt->trans_mod->name);
7173

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

141143
clnt->proto_version = p9_proto_2000L;
142-
clnt->msize = 8192;
144+
clnt->msize = DEFAULT_MSIZE;
143145

144146
if (!opts)
145147
return 0;

net/9p/trans_fd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#include <linux/syscalls.h> /* killme */
3535

3636
#define P9_PORT 564
37-
#define MAX_SOCK_BUF (64*1024)
37+
#define MAX_SOCK_BUF (1024*1024)
3838
#define MAXPOLLWADDR 2
3939

4040
static struct p9_trans_module p9_tcp_trans;

net/9p/trans_virtio.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ static int p9_virtio_probe(struct virtio_device *vdev)
610610
chan->vc_wq = kmalloc(sizeof(wait_queue_head_t), GFP_KERNEL);
611611
if (!chan->vc_wq) {
612612
err = -ENOMEM;
613-
goto out_free_tag;
613+
goto out_remove_file;
614614
}
615615
init_waitqueue_head(chan->vc_wq);
616616
chan->ring_bufs_avail = 1;
@@ -628,6 +628,8 @@ static int p9_virtio_probe(struct virtio_device *vdev)
628628

629629
return 0;
630630

631+
out_remove_file:
632+
sysfs_remove_file(&vdev->dev.kobj, &dev_attr_mount_tag.attr);
631633
out_free_tag:
632634
kfree(tag);
633635
out_free_vq:

net/9p/trans_xen.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ static bool p9_xen_write_todo(struct xen_9pfs_dataring *ring, RING_IDX size)
138138

139139
static int p9_xen_request(struct p9_client *client, struct p9_req_t *p9_req)
140140
{
141-
struct xen_9pfs_front_priv *priv = NULL;
141+
struct xen_9pfs_front_priv *priv;
142142
RING_IDX cons, prod, masked_cons, masked_prod;
143143
unsigned long flags;
144144
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)
151151
break;
152152
}
153153
read_unlock(&xen_9pfs_lock);
154-
if (!priv || priv->client != client)
154+
if (list_entry_is_head(priv, &xen_9pfs_devs, list))
155155
return -EINVAL;
156156

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

0 commit comments

Comments
 (0)