On 04/09/2015 03:30 AM, Dmitry Monakhov wrote:
Jens Axboe <ax...@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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/