Re: [RFC 5/8] xattr: Add per-inode xattr handlers as a new inode operation
On Tue, May 03, 2016 at 12:45:15AM +0200, Andreas Gruenbacher wrote:
> Per-inode xattr handlers allow to mark inodes as bad and dirs as "empty"
> in the usual way even when using generic_getxattr, generic_setxattr, and
> generic_removexattr. This brings us one step closer to getting rid of
> the getxattr, setxattr, and removexattr inode operations.
This is an amazingly convoluted way of doing things. First of all, "empty"
case is not interesting - they might as well have used generic_...xattr for
the filesystem using them. And bad_inode... I'd rather have that checked
in generic_getxattr() et.al. I mean, explicit
... go using ->i_sb->s_xattr
in there won't cost more than your variant and it avoids having a flag
misguised as a pointer to secondary method table in every inode_operations.