Linux-Fsdevel Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH v3 09/38] virtio_fs: correct tags for config space fields
       [not found] <20200805134226.1106164-1-mst@redhat.com>
@ 2020-08-05 13:43 ` Michael S. Tsirkin
  2020-08-05 13:44 ` [PATCH v3 31/38] virtio_fs: convert to LE accessors Michael S. Tsirkin
  1 sibling, 0 replies; 3+ messages in thread
From: Michael S. Tsirkin @ 2020-08-05 13:43 UTC (permalink / raw)
  To: linux-kernel
  Cc: Vivek Goyal, Cornelia Huck, Jason Wang, Stefan Hajnoczi,
	Miklos Szeredi, virtualization, linux-fsdevel

Since fs is a modern-only device,
tag config space fields as having little endian-ness.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
---
 include/uapi/linux/virtio_fs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/uapi/linux/virtio_fs.h b/include/uapi/linux/virtio_fs.h
index b02eb2ac3d99..3056b6e9f8ce 100644
--- a/include/uapi/linux/virtio_fs.h
+++ b/include/uapi/linux/virtio_fs.h
@@ -13,7 +13,7 @@ struct virtio_fs_config {
 	__u8 tag[36];
 
 	/* Number of request queues */
-	__u32 num_request_queues;
+	__le32 num_request_queues;
 } __attribute__((packed));
 
 #endif /* _UAPI_LINUX_VIRTIO_FS_H */
-- 
MST


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v3 31/38] virtio_fs: convert to LE accessors
       [not found] <20200805134226.1106164-1-mst@redhat.com>
  2020-08-05 13:43 ` [PATCH v3 09/38] virtio_fs: correct tags for config space fields Michael S. Tsirkin
@ 2020-08-05 13:44 ` Michael S. Tsirkin
  2020-08-06 17:28   ` Vivek Goyal
  1 sibling, 1 reply; 3+ messages in thread
From: Michael S. Tsirkin @ 2020-08-05 13:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: Vivek Goyal, Stefan Hajnoczi, Miklos Szeredi, virtualization,
	linux-fsdevel

Virtio fs is modern-only. Use LE accessors for config space.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 fs/fuse/virtio_fs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c
index 4c4ef5d69298..104f35de5270 100644
--- a/fs/fuse/virtio_fs.c
+++ b/fs/fuse/virtio_fs.c
@@ -606,8 +606,8 @@ static int virtio_fs_setup_vqs(struct virtio_device *vdev,
 	unsigned int i;
 	int ret = 0;
 
-	virtio_cread(vdev, struct virtio_fs_config, num_request_queues,
-		     &fs->num_request_queues);
+	virtio_cread_le(vdev, struct virtio_fs_config, num_request_queues,
+			&fs->num_request_queues);
 	if (fs->num_request_queues == 0)
 		return -EINVAL;
 
-- 
MST


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3 31/38] virtio_fs: convert to LE accessors
  2020-08-05 13:44 ` [PATCH v3 31/38] virtio_fs: convert to LE accessors Michael S. Tsirkin
@ 2020-08-06 17:28   ` Vivek Goyal
  0 siblings, 0 replies; 3+ messages in thread
From: Vivek Goyal @ 2020-08-06 17:28 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: linux-kernel, Stefan Hajnoczi, Miklos Szeredi, virtualization,
	linux-fsdevel

On Wed, Aug 05, 2020 at 09:44:39AM -0400, Michael S. Tsirkin wrote:
> Virtio fs is modern-only. Use LE accessors for config space.
> 
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

Acked-by: Vivek Goyal <vgoyal@redhat.com>

Vivek

> ---
>  fs/fuse/virtio_fs.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c
> index 4c4ef5d69298..104f35de5270 100644
> --- a/fs/fuse/virtio_fs.c
> +++ b/fs/fuse/virtio_fs.c
> @@ -606,8 +606,8 @@ static int virtio_fs_setup_vqs(struct virtio_device *vdev,
>  	unsigned int i;
>  	int ret = 0;
>  
> -	virtio_cread(vdev, struct virtio_fs_config, num_request_queues,
> -		     &fs->num_request_queues);
> +	virtio_cread_le(vdev, struct virtio_fs_config, num_request_queues,
> +			&fs->num_request_queues);
>  	if (fs->num_request_queues == 0)
>  		return -EINVAL;
>  
> -- 
> MST
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-06 17:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200805134226.1106164-1-mst@redhat.com>
2020-08-05 13:43 ` [PATCH v3 09/38] virtio_fs: correct tags for config space fields Michael S. Tsirkin
2020-08-05 13:44 ` [PATCH v3 31/38] virtio_fs: convert to LE accessors Michael S. Tsirkin
2020-08-06 17:28   ` Vivek Goyal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).