Messages in this thread |  | | Date | Thu, 9 Apr 2015 10:28:04 -0600 | From | Jens Axboe <> | Subject | Re: [PATCH 2/7] Add support for per-file stream ID |
| |
On 04/09/2015 03:30 AM, Dmitry Monakhov wrote: > Jens Axboe <axboe@fb.com> writes: > > One small question. > You states that all IDs are equals but can we reserve some IDs > for internal kernel purposes. For example very short lived data (files > opened with O_TEMP) and so on.
Yes, we probably should end up reserving some IDs for specific internal things. O_TEMP to a specific stream would make sense. Journal writes too, for instance.
I just preferred not wiring any of that up, as it then gets closer to being a policy decision. I'm mainly interested in getting this exposed to userspace, and seeing how the hw side develops since that will influence how we actually use this (number of streams, any actions required to manage streams, etc).
>> + case POSIX_FADV_STREAMID: >> + /* >> + * streamid is stored in offset... we don't limit or check >> + * if the device supports streams, or if it does, if the >> + * stream nr is within the limits. 1 is the lowest valid >> + * stream id, 0 is "don't care/know". >> + */ >> + if (offset != (unsigned int) offset) >> + ret = EINVAL; > Shuld be negative ret = -EINVAL;
Indeed it should, thanks!
-- Jens Axboe
|  |