qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 07/10] block: Implement bdrv_{pread,pwrite,pwrite_zeroes}(


From: Stefan Hajnoczi
Subject: Re: [PATCH v3 07/10] block: Implement bdrv_{pread,pwrite,pwrite_zeroes}() using generated_co_wrapper
Date: Wed, 8 Jun 2022 13:50:21 +0100

On Mon, Jun 06, 2022 at 05:10:38PM +0100, Alberto Faria wrote:
> Thanks for the feedback, and apologies for the delayed response.
> 
> On Mon, May 30, 2022 at 1:49 PM Stefan Hajnoczi <stefanha@redhat.com> wrote:
> > If you find it's safe to change to -EINVAL then that's consistent with
> > how file I/O syscalls work and I think it would be nice.
> 
> Switching to -EINVAL on negative bytes sounds good to me, but perhaps
> it should be done as a separate series. For now, switching just
> bdrv_{pread,pwrite}() to -EIO will make them consistent with all of
> bdrv_{preadv,pwritev}() and bdrv_co_{pread,pwrite,preadv,pwritev}(),
> accomplishing the purpose of this series with less changes and
> auditing.
> 
> I can work on a subsequent series that changes -EIO to -EINVAL on
> negative bytes for all the bdrv_...() and blk_...() functions.
> 
> Would this make sense?

Yes, that's fine. My main concern is that callers have been audited when
errnos are changed. If you switch bdrv_{pread,pwrite}() to -EIO and have
audited callers, then I'm happy.

Consistent -EINVAL would be nice in the future, but I think it's lower
priority and it doesn't have to be done any time soon.

Stefan

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]