[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 01/24] DAX: vhost-user: Rework slave return values
From: |
Dr. David Alan Gilbert |
Subject: |
Re: [PATCH 01/24] DAX: vhost-user: Rework slave return values |
Date: |
Thu, 18 Feb 2021 12:18:05 +0000 |
User-agent: |
Mutt/2.0.5 (2021-01-21) |
* Stefan Hajnoczi (stefanha@redhat.com) wrote:
> On Tue, Feb 09, 2021 at 07:02:01PM +0000, Dr. David Alan Gilbert (git) wrote:
> > +static uint64_t vhost_user_slave_handle_vring_host_notifier(
> > + struct vhost_dev *dev,
> > + VhostUserVringArea *area,
> > + int fd)
>
> Indentation looks off. Only worth changing if you respin.
Done.
> > @@ -1398,7 +1399,8 @@ static void slave_read(void *opaque)
> > struct vhost_user *u = dev->opaque;
> > VhostUserHeader hdr = { 0, };
> > VhostUserPayload payload = { 0, };
> > - int size, ret = 0;
> > + int size;
> > + uint64_t ret = 0;
> > struct iovec iov;
> > struct msghdr msgh;
> > int fd[VHOST_USER_SLAVE_MAX_FDS];
> > @@ -1472,7 +1474,7 @@ static void slave_read(void *opaque)
> > break;
> > default:
> > error_report("Received unexpected msg type: %d.", hdr.request);
> > - ret = -EINVAL;
> > + ret = (uint64_t)-EINVAL;
>
> The !!ret was removed below so it would have previously been true (1).
> Now it has changed value.
>
> If there is no specific reason to change the value, please keep it true
> (1) just in case a vhost-user device backend depends on that value.
Done; although moving to errnos there feels a bit better to me; but yes
the callers aren't audited.
Dave
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
- [PATCH 00/24] virtiofs dax patches, Dr. David Alan Gilbert (git), 2021/02/09
- [PATCH 01/24] DAX: vhost-user: Rework slave return values, Dr. David Alan Gilbert (git), 2021/02/09
- [PATCH 02/24] DAX: libvhost-user: Route slave message payload, Dr. David Alan Gilbert (git), 2021/02/09
- [PATCH 03/24] DAX: libvhost-user: Allow popping a queue element with bad pointers, Dr. David Alan Gilbert (git), 2021/02/09
- [PATCH 04/24] DAX subprojects/libvhost-user: Add virtio-fs slave types, Dr. David Alan Gilbert (git), 2021/02/09
- [PATCH 05/24] DAX: virtio: Add shared memory capability, Dr. David Alan Gilbert (git), 2021/02/09
- [PATCH 06/24] DAX: virtio-fs: Add cache BAR, Dr. David Alan Gilbert (git), 2021/02/09