lkml.org 
[lkml]   [2015]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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



\
 
 \ /
  Last update: 2015-04-09 19:01    [W:0.089 / U:12.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site