public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* Number of ACLs
@ 2011-07-07 12:44 Laurent CARON
  2011-07-07 13:20 ` Emmanuel Florac
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Laurent CARON @ 2011-07-07 12:44 UTC (permalink / raw)
  To: xfs

Hi,

I'd like to know if it is possible in a simple & safe way to increase 
the number of supported ACLs on an already existing FS.

xfs_acl.h:
#define XFS_ACL_MAX_ENTRIES 25

Changing XFS_ACL_MAX_ENTRIES to something higher should do the trick, 
but will it be safe: ie: will I risk corrupting the FS this way ?

I understand it'll imply a performance penalty if I add too many ACLs.

Thanks

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: Number of ACLs
  2011-07-07 12:44 Number of ACLs Laurent CARON
@ 2011-07-07 13:20 ` Emmanuel Florac
  2011-07-07 13:26 ` Emmanuel Florac
  2011-07-08  3:42 ` Dave Chinner
  2 siblings, 0 replies; 5+ messages in thread
From: Emmanuel Florac @ 2011-07-07 13:20 UTC (permalink / raw)
  To: Laurent CARON; +Cc: xfs

Le Thu, 07 Jul 2011 14:44:10 +0200
Laurent CARON <lcaron@lncsa.com> écrivait:

> I'd like to know if it is possible in a simple & safe way to increase 
> the number of supported ACLs on an already existing FS.
> 
> xfs_acl.h:
> #define XFS_ACL_MAX_ENTRIES 25
> 
> Changing XFS_ACL_MAX_ENTRIES to something higher should do the trick, 
> but will it be safe: ie: will I risk corrupting the FS this way ?
> 
> I understand it'll imply a performance penalty if I add too many ACLs.

I asked recently to the list if there was any evolution on this point,
but unfortunately my question went ignored :( 

Actually you can't simply change this entry and hope that it will
work;  from what I understood, at best your filesystem will become
incompatible with any other kernel in the best case and you may need
to recompile the xfs tools too; in the worst case, compilation will
simply fail.

If you really need a lot of ACLs, the best answer so far is to use JFS,
which supports 1024 ACLs per file without tinkering and without pain.
The main culprit with JFS lies in relatively poor ageing (compared to
XFS), and no available tool to contain fragmentation. Imperfect world.

-- 
------------------------------------------------------------------------
Emmanuel Florac     |   Direction technique
                    |   Intellique
                    |	<eflorac@intellique.com>
                    |   +33 1 78 94 84 02
------------------------------------------------------------------------

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: Number of ACLs
  2011-07-07 12:44 Number of ACLs Laurent CARON
  2011-07-07 13:20 ` Emmanuel Florac
@ 2011-07-07 13:26 ` Emmanuel Florac
  2011-07-07 16:20   ` Laurent CARON
  2011-07-08  3:42 ` Dave Chinner
  2 siblings, 1 reply; 5+ messages in thread
From: Emmanuel Florac @ 2011-07-07 13:26 UTC (permalink / raw)
  To: Laurent CARON; +Cc: xfs

Le Thu, 07 Jul 2011 14:44:10 +0200
Laurent CARON <lcaron@lncsa.com> écrivait:

> I'd like to know if it is possible in a simple & safe way to increase 
> the number of supported ACLs on an already existing FS.

I just realised I missed that part : there is absolutely no way to
change an existing filesystem after the fact. 

My previous answer was about the fact that by installing a modified
kernel module, there is a slight possibility that you can create a
NEW filesystem with more ACLs (and beware, this is untested,
unsupported, uncharted territory, "there be dragons" and al). Given that
the modified xfs module actually works, given that the mkfs.xfs and
other tools behave as expected (unlikely), and that the whole setup
won't fall down in flames the first time you actually create 26 ACLs on
a file, etc.

-- 
------------------------------------------------------------------------
Emmanuel Florac     |   Direction technique
                    |   Intellique
                    |	<eflorac@intellique.com>
                    |   +33 1 78 94 84 02
------------------------------------------------------------------------

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: Number of ACLs
  2011-07-07 13:26 ` Emmanuel Florac
@ 2011-07-07 16:20   ` Laurent CARON
  0 siblings, 0 replies; 5+ messages in thread
From: Laurent CARON @ 2011-07-07 16:20 UTC (permalink / raw)
  To: xfs

On 07/07/2011 15:26, Emmanuel Florac wrote:
> Le Thu, 07 Jul 2011 14:44:10 +0200
> Laurent CARON<lcaron@lncsa.com>  écrivait:
>
>> I'd like to know if it is possible in a simple&  safe way to increase
>> the number of supported ACLs on an already existing FS.
>
> I just realised I missed that part : there is absolutely no way to
> change an existing filesystem after the fact.
>
> My previous answer was about the fact that by installing a modified
> kernel module, there is a slight possibility that you can create a
> NEW filesystem with more ACLs (and beware, this is untested,
> unsupported, uncharted territory, "there be dragons" and al). Given that
> the modified xfs module actually works, given that the mkfs.xfs and
> other tools behave as expected (unlikely), and that the whole setup
> won't fall down in flames the first time you actually create 26 ACLs on
> a file, etc.
>

Thanks.

I'll cope with this limit for now and eventually will move to some other 
FS in the future if I still need to use more than 25 ACLs.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: Number of ACLs
  2011-07-07 12:44 Number of ACLs Laurent CARON
  2011-07-07 13:20 ` Emmanuel Florac
  2011-07-07 13:26 ` Emmanuel Florac
@ 2011-07-08  3:42 ` Dave Chinner
  2 siblings, 0 replies; 5+ messages in thread
From: Dave Chinner @ 2011-07-08  3:42 UTC (permalink / raw)
  To: Laurent CARON; +Cc: xfs

On Thu, Jul 07, 2011 at 02:44:10PM +0200, Laurent CARON wrote:
> Hi,
> 
> I'd like to know if it is possible in a simple & safe way to
> increase the number of supported ACLs on an already existing FS.
> 
> xfs_acl.h:
> #define XFS_ACL_MAX_ENTRIES 25
> 
> Changing XFS_ACL_MAX_ENTRIES to something higher should do the
> trick, but will it be safe: ie: will I risk corrupting the FS this
> way ?

It's effectively an on-disk format change. If you add more than 25
ACLs and then downgrade kernel, you won't be able to access those
ACLs.

Hmmm, even worse, looking at the code it would probably cause a
buffer overrun (memory corupting crash) as the old kernels only
allocate an array large enough to hold 25 ACLs and the
xfs_acl_from_disk() function implicitly trusts the number of ACLs in
the xattr fits into the array....

So, that definitely means larger number of ACLs requires a feature
bit in the superblock so that once you go over 25 ACLs you can't use
that filesystem on a kernel that does not support >25 ACLs.  i.e.
it's a typical on-disk versioning change that requires a bunch of
work in both kernel and userspace to support a new feature
superblock feature bit. In this case, the feature bit would
only need to be set by the kernel on existing filesystems when you
first go over 25 ACLs on an inode, so most people wouldn't even care
about the change....

An example for this dynamic setting of a feature bit is the code to
dynamically indicate the filesystem has version 2 inodes in it. See
xfs_bump_ino_vers2() and what it does to add a feature bit when that
transition occurs...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

end of thread, other threads:[~2011-07-08  3:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-07 12:44 Number of ACLs Laurent CARON
2011-07-07 13:20 ` Emmanuel Florac
2011-07-07 13:26 ` Emmanuel Florac
2011-07-07 16:20   ` Laurent CARON
2011-07-08  3:42 ` Dave Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox