linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Common error in case of running out of the number of ACL entries
@ 2013-12-13 14:43 Jeff Liu
  2013-12-13 15:02 ` Jeff Liu
  2013-12-13 16:16 ` Carlos Maiolino
  0 siblings, 2 replies; 5+ messages in thread
From: Jeff Liu @ 2013-12-13 14:43 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: viro, Christoph Hellwig, Eric Sandeen

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)
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.
<quote>
       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

Test script:
#!/bin/bash

testfile=$1
touch $testfile
i=0
while :
do
        setfacl -m u:$i:rw- $testfile
        let i+=1
done


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-12-14  8:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-13 14:43 Common error in case of running out of the number of ACL entries Jeff Liu
2013-12-13 15:02 ` Jeff Liu
2013-12-13 16:16 ` Carlos Maiolino
2013-12-13 23:51   ` Dave Chinner
2013-12-14  8:52     ` Jeff Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).