From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yk0-f180.google.com (mail-yk0-f180.google.com [209.85.160.180]) by kanga.kvack.org (Postfix) with ESMTP id 7A4BE9003C8 for ; Wed, 22 Jul 2015 18:24:22 -0400 (EDT) Received: by ykax123 with SMTP id x123so205678229yka.1 for ; Wed, 22 Jul 2015 15:24:22 -0700 (PDT) Received: from aserp1040.oracle.com (aserp1040.oracle.com. [141.146.126.69]) by mx.google.com with ESMTPS id k186si2021211ywd.167.2015.07.22.15.24.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Jul 2015 15:24:21 -0700 (PDT) Message-ID: <55B017EE.5020203@oracle.com> Date: Wed, 22 Jul 2015 15:23:42 -0700 From: Mike Kravetz MIME-Version: 1.0 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 Sender: owner-linux-mm@kvack.org List-ID: 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 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, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org