Skip to contentSkip to conversation

virtio-fs: rename num_queues to num_request_queues

PATCH In review Stefan Hajnoczi 5 participants 6 messages Sep 17, 2019 – Sep 30, 2019

Subsystems (4)
lore
Share & tools
lore

Stefan Hajnoczi

author maintainer
#0 lore raw

PATCH 1/1 virtio-fs: rename num_queues to num_request_queues

The final version of the virtio-fs device specification renamed the num_queues field to num_request_queues. The semantics are unchanged but this name is clearer.

Use the new name in the code.

---
Feel free to squash this patch.

---
 include/uapi/linux/virtio_fs.h |  2 +-
 fs/fuse/virtio_fs.c            | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)
include/uapi/linux/virtio_fs.h +1 -1
index b5e99c217c86..b02eb2ac3d99 100644
@@ -13,7 +13,7 @@ struct virtio_fs_config {
 	__u8 tag[36];
 
 	/* Number of request queues */
-	__u32 num_queues;
+	__u32 num_request_queues;
 } __attribute__((packed));
 
 #endif /* _UAPI_LINUX_VIRTIO_FS_H */
fs/fuse/virtio_fs.c +6 -6
index 392b9e7d9ddf..ccfa4f741f7f 100644
@@ -43,8 +43,8 @@ struct virtio_fs {
 	struct list_head list;    /* on virtio_fs_instances */
 	char *tag;
 	struct virtio_fs_vq *vqs;
-	unsigned int nvqs;            /* number of virtqueues */
-	unsigned int num_queues;      /* number of request queues */
+	unsigned int nvqs;               /* number of virtqueues */
+	unsigned int num_request_queues; /* number of request queues */
 };
 
 struct virtio_fs_forget {
@@ -477,12 +477,12 @@ static int virtio_fs_setup_vqs(struct virtio_device *vdev,
 	unsigned int i;
 	int ret = 0;
 
-	virtio_cread(vdev, struct virtio_fs_config, num_queues,
-		     &fs->num_queues);
-	if (fs->num_queues == 0)
+	virtio_cread(vdev, struct virtio_fs_config, num_request_queues,
+		     &fs->num_request_queues);
+	if (fs->num_request_queues == 0)
 		return -EINVAL;
 
-	fs->nvqs = 1 + fs->num_queues;
+	fs->nvqs = 1 + fs->num_request_queues;
 	fs->vqs = kcalloc(fs->nvqs, sizeof(fs->vqs[VQ_HIPRIO]), GFP_KERNEL);
 	if (!fs->vqs)
 		return -ENOMEM;
Signature · 1 line
2.21.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · * Stefan Hajnoczi ([email protected]) wrote:

The final version of the virtio-fs device specification renamed the num_queues field to num_request_queues. The semantics are unchanged but this name is clearer.

Use the new name in the code.

Consistent with the latest version that's just passed the voting; (see
https://lists.oasis-open.org/archives/virtio-dev/201908/msg00113.html ) so:

Quoted 55 lines

---
Feel free to squash this patch.

---
 include/uapi/linux/virtio_fs.h |  2 +-
 fs/fuse/virtio_fs.c            | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)
include/uapi/linux/virtio_fs.h +1 -1
index b5e99c217c86..b02eb2ac3d99 100644
@@ -13,7 +13,7 @@ struct virtio_fs_config {
 	__u8 tag[36];
 
 	/* Number of request queues */
-	__u32 num_queues;
+	__u32 num_request_queues;
 } __attribute__((packed));
 
 #endif /* _UAPI_LINUX_VIRTIO_FS_H */
fs/fuse/virtio_fs.c +6 -6
index 392b9e7d9ddf..ccfa4f741f7f 100644
@@ -43,8 +43,8 @@ struct virtio_fs {
 	struct list_head list;    /* on virtio_fs_instances */
 	char *tag;
 	struct virtio_fs_vq *vqs;
-	unsigned int nvqs;            /* number of virtqueues */
-	unsigned int num_queues;      /* number of request queues */
+	unsigned int nvqs;               /* number of virtqueues */
+	unsigned int num_request_queues; /* number of request queues */
 };
 
 struct virtio_fs_forget {
@@ -477,12 +477,12 @@ static int virtio_fs_setup_vqs(struct virtio_device *vdev,
 	unsigned int i;
 	int ret = 0;
 
-	virtio_cread(vdev, struct virtio_fs_config, num_queues,
-		     &fs->num_queues);
-	if (fs->num_queues == 0)
+	virtio_cread(vdev, struct virtio_fs_config, num_request_queues,
+		     &fs->num_request_queues);
+	if (fs->num_request_queues == 0)
 		return -EINVAL;
 
-	fs->nvqs = 1 + fs->num_queues;
+	fs->nvqs = 1 + fs->num_request_queues;
 	fs->vqs = kcalloc(fs->nvqs, sizeof(fs->vqs[VQ_HIPRIO]), GFP_KERNEL);
 	if (!fs->vqs)
 		return -ENOMEM;
Signature · 1 line
2.21.0

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK

maintainer
#2 lore raw
Quoted 10 lines · Dr. David Alan Gilbert
Quoted 7 lines · * Stefan Hajnoczi ([email protected]) wrote:

The final version of the virtio-fs device specification renamed the num_queues field to num_request_queues. The semantics are unchanged but this name is clearer.

Use the new name in the code.

Quoted 10 lines

Consistent with the latest version that's just passed the voting; (see
https://lists.oasis-open.org/archives/virtio-dev/201908/msg00113.html ) so:

Quoted 2 lines

---
Feel free to squash this patch.

Thanks, folded this one as well.

Miklos

#3 lore raw
Quoted 18 lines · Miklos Szeredi
Quoted 16 lines · Dr. David Alan Gilbert
Quoted 7 lines · * Stefan Hajnoczi ([email protected]) wrote:

The final version of the virtio-fs device specification renamed the num_queues field to num_request_queues. The semantics are unchanged but this name is clearer.

Use the new name in the code.

Consistent with the latest version that's just passed the voting; (see
https://lists.oasis-open.org/archives/virtio-dev/201908/msg00113.html ) so:

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

---
Feel free to squash this patch.

Thanks, folded this one as well.

Miklos

So what's the plan for merging all this?
Doesn't look like it was sent in the merge window, nor is it in linux-next.

Signature · 1 line
MST
#4 lore raw
Quoted 25 lines · Michael S. Tsirkin
Quoted 23 lines · Miklos Szeredi
Quoted 20 lines · Dr. David Alan Gilbert
Quoted 7 lines · * Stefan Hajnoczi ([email protected]) wrote:

The final version of the virtio-fs device specification renamed the num_queues field to num_request_queues. The semantics are unchanged but this name is clearer.

Use the new name in the code.

Consistent with the latest version that's just passed the voting; (see
https://lists.oasis-open.org/archives/virtio-dev/201908/msg00113.html ) so:

Quoted 2 lines

---
Feel free to squash this patch.

Quoted 7 lines
Quoted 3 lines

Thanks, folded this one as well.

Miklos

So what's the plan for merging all this?
Doesn't look like it was sent in the merge window, nor is it in linux-next.

It should be.

Sent pull request for fuse update today; this includes changes required for virtio-fs. Planning to send pull request for virtio-fs itself tomorrow.

Thanks,
Miklos

#5 lore raw
In reply to Michael S. Tsirkin
Quoted 24 lines · * Michael S. Tsirkin ([email protected]) wrote:
Quoted 23 lines · Miklos Szeredi
Quoted 20 lines · Dr. David Alan Gilbert
Quoted 7 lines · * Stefan Hajnoczi ([email protected]) wrote:

The final version of the virtio-fs device specification renamed the num_queues field to num_request_queues. The semantics are unchanged but this name is clearer.

Use the new name in the code.

Consistent with the latest version that's just passed the voting; (see
https://lists.oasis-open.org/archives/virtio-dev/201908/msg00113.html ) so:

Quoted 2 lines

---
Feel free to squash this patch.

Quoted 7 lines
Quoted 3 lines

Thanks, folded this one as well.

Miklos

So what's the plan for merging all this?
Doesn't look like it was sent in the merge window, nor is it in linux-next.

It's in the version that got merged upstream over the weekend.

Dave

Quoted 2 lines
Signature · 1 line
MST

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK