Messages in this thread | | | Date | Sat, 28 May 2011 12:42:44 +0100 | From | Al Viro <> | Subject | Re: [PATCH 1/4] Cache xattr security drop check for write |
| |
On Fri, May 27, 2011 at 03:54:02PM -0700, Andi Kleen wrote: > From: Andi Kleen <ak@linux.intel.com> > > Some recent benchmarking on btrfs showed that a major scaling bottleneck > on large systems on btrfs is currently the xattr lookup on every write. > > Why xattr lookup on every write I hear you ask? > > write wants to drop suid and security related xattrs that could set o > capabilities for executables. To do that it currently looks up > security.capability on EVERY write (even for non executables) to decide > whether to drop it or not.
Hm... a) is_sgid() is a bad name for that - at the very least s/g/x/, since anybody would read your variant as "check if it's set-group-id". b) I'd add a helper for filesystems to use, rather than messing with the flags directly.
| |