lkml.org 
[lkml]   [2020]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3 4/4] io_uring: add support for zone-append
On Mon, Jul 20, 2020 at 10:44 PM Matthew Wilcox <willy@infradead.org> wrote:
>
> On Mon, Jul 20, 2020 at 10:19:57PM +0530, Kanchan Joshi wrote:
> > On Fri, Jul 10, 2020 at 7:41 PM Kanchan Joshi <joshiiitr@gmail.com> wrote:
> > > If we are doing this for zone-append (and not general cases), "__s64
> > > res64" should work -.
> > > 64 bits = 1 (sign) + 23 (bytes-copied: cqe->res) + 40
> > > (written-location: chunk_sector bytes limit)
>
> No, don't do this.
>
> struct io_uring_cqe {
> __u64 user_data; /* sqe->data submission passed back */
> - __s32 res; /* result code for this event */
> - __u32 flags;
> + union {
> + struct {
> + __s32 res; /* result code for this event */
> + __u32 flags;
> + };
> + __s64 res64;
> + };
> };
>
> Return the value in bytes in res64, or a negative errno. Done.

I concur. Can do away with bytes-copied. It's either in its entirety
or not at all.

\
 
 \ /
  Last update: 2020-07-20 22:19    [W:0.082 / U:0.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site