Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752724AbbGVWY2 (ORCPT ); Wed, 22 Jul 2015 18:24:28 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:25201 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750779AbbGVWY0 (ORCPT ); Wed, 22 Jul 2015 18:24:26 -0400 Message-ID: <55B017EE.5020203@oracle.com> Date: Wed, 22 Jul 2015 15:23:42 -0700 From: Mike Kravetz User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Andrew Morton CC: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Dave Hansen , Naoya Horiguchi , David Rientjes , Hugh Dickins , Davidlohr Bueso , Aneesh Kumar , Hillf Danton , Christoph Hellwig , Michal Hocko Subject: Re: [PATCH v4 09/10] hugetlbfs: add hugetlbfs_fallocate() References: <1437502184-14269-1-git-send-email-mike.kravetz@oracle.com> <1437502184-14269-10-git-send-email-mike.kravetz@oracle.com> <20150722150345.f8d5b0042cfa7112bd95d9ef@linux-foundation.org> In-Reply-To: <20150722150345.f8d5b0042cfa7112bd95d9ef@linux-foundation.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1003 Lines: 27 On 07/22/2015 03:03 PM, Andrew Morton wrote: > On Tue, 21 Jul 2015 11:09:43 -0700 Mike Kravetz wrote: ... >> + >> + if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE)) >> + return -EOPNOTSUPP; > > EOPNOTSUPP is a networking thing. It's inappropriate here. > > The problem is that if this error is ever returned to userspace, the > user will be sitting looking at "Operation not supported on transport > endpoint" and wondering what went wrong in the networking stack. Trying to follow FALLOCATE(2) man page: "EOPNOTSUPP The filesystem containing the file referred to by fd does not support this operation; or the mode is not supported by the filesystem containing the file referred to by fd." -- Mike Kravetz -- 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/