From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Liu Subject: Re: Common error in case of running out of the number of ACL entries Date: Fri, 13 Dec 2013 23:02:52 +0800 Message-ID: <52AB219C.6070806@oracle.com> References: <52AB1D21.3000702@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: viro@ZenIV.linux.org.uk, Christoph Hellwig , Eric Sandeen To: linux-fsdevel@vger.kernel.org Return-path: Received: from aserp1040.oracle.com ([141.146.126.69]:28667 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751849Ab3LMPDZ (ORCPT ); Fri, 13 Dec 2013 10:03:25 -0500 In-Reply-To: <52AB1D21.3000702@oracle.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 12/13 2013 22:43 PM, Jeff Liu wrote: > Hi Folks, > > While looking into the behaviour of XFS in case of running out of the > maximum number of supported acl entries, I observed that we would > return various different errors in this situation. As per Christoph's > suggestion, I gathered up them from some common file systems with a > simple tests which were shown as following: > > Btrfs: No space left on device (ENOSPC) > Ext3: No space left on device (ENOSPC) > Ext4: No space left oo long (E2BIG) Sorry, copy-to-paste error. :) Same to Ext3, Ext4 also return ENOSPC. Instead, JFS would return E2BIG as "Argument list too long". Also, I'm willing to collect further more info for other file systems resides at fs/ as far as I can if required. > F2fs: Numerical result out of range (ERANGE) > OCFS2: Argument list too long (E2BIG) > XFS: Invalid argument (EINVAL) > > It seems that return either above error would mislead the end user, though > Eric's Sandeen once pointed out that ENOSPC should be used in this case in > terms of the setxattr(2) man page. > > If there is insufficient space remaining to store the extended attribute, > errno is set to either ENOSPC, or EDQUOT if quota enforcement was the cause. > > However, the "insufficient space" is obscure, it might be the file system > space or no more space in metadata blocks, etc... > > Hence, should we consolidate this scenario to figure out a more clearer > common error? Thanks, -Jeff