lkml.org 
[lkml]   [2012]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC, PATCH] Extensible AIO interface
On Mon, Oct 01, 2012 at 04:44:39PM -0700, Zach Brown wrote:
> And what about duplicate instances of a given attribute id? Use the
> first? The last? Error? Depends on the id?

I thought of a better idea, instead of explicitly checking for
disallowed dups:

We want to return -ENOTHANDLED for not handled attributes anyways, so
let's just do that for dups - that'll catch erronious usage just fine
and a generic mechanism's better than a one off hack any day.

This does mean we can't punt on return values, which isn't a bad thing.

Also, if we've got duplicate attributes userspace needs to be able to
figure out which return value was for which attribute.

Two possibilities: one, return values come out in the same order
attributes went in. That'd work, but I dislike the subtlety and I expect
it'd be a pain for userspace.

Instead, let's just stick a u64 cookie in the attribute and include that
in the return, just like we do everywhere else.


\
 
 \ /
  Last update: 2012-10-02 04:01    [W:0.474 / U:0.784 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site