Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932734AbbDIQ2N (ORCPT ); Thu, 9 Apr 2015 12:28:13 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:58160 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755709AbbDIQ2K (ORCPT ); Thu, 9 Apr 2015 12:28:10 -0400 Message-ID: <5526A894.6010707@fb.com> Date: Thu, 9 Apr 2015 10:28:04 -0600 From: Jens Axboe User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Dmitry Monakhov , , CC: , Subject: Re: [PATCH 2/7] Add support for per-file stream ID References: <1427296070-8472-1-git-send-email-axboe@fb.com> <1427296070-8472-3-git-send-email-axboe@fb.com> <87h9sp643j.fsf@openvz.org> In-Reply-To: <87h9sp643j.fsf@openvz.org> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [192.168.54.13] X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-04-09_04:2015-04-09,2015-04-09,1970-01-01 signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1434 Lines: 39 On 04/09/2015 03:30 AM, Dmitry Monakhov wrote: > Jens Axboe 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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/