diff options
author | Christoph Hellwig <hch@lst.de> | 2008-08-28 06:21:17 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:07 -0400 |
commit | 95819c05732c511338b43c115ffbcee978c02888 (patch) | |
tree | 4622f326207c53e42e7c9e8e8d14960e17190a30 /fs/btrfs/inode.c | |
parent | eaa47d8612783807ef9703ebc9bf0d0f0455bf62 (diff) |
Btrfs: optimize btrget/set/removexattr
btrfs actually stores the whole xattr name, including the prefix ondisk,
so using the generic resolver that strips off the prefix is not very
helpful. Instead do the real ondisk xattrs manually and only use the
generic resolver for synthetic xattrs like ACLs.
(Sorry Josef for guiding you towards the wrong direction here intially)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 10f26f445328..43d3f2649ca3 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include "print-tree.h" | 45 | #include "print-tree.h" |
46 | #include "volumes.h" | 46 | #include "volumes.h" |
47 | #include "ordered-data.h" | 47 | #include "ordered-data.h" |
48 | #include "xattr.h" | ||
48 | 49 | ||
49 | struct btrfs_iget_args { | 50 | struct btrfs_iget_args { |
50 | u64 ino; | 51 | u64 ino; |
@@ -3667,10 +3668,10 @@ static struct inode_operations btrfs_dir_inode_operations = { | |||
3667 | .symlink = btrfs_symlink, | 3668 | .symlink = btrfs_symlink, |
3668 | .setattr = btrfs_setattr, | 3669 | .setattr = btrfs_setattr, |
3669 | .mknod = btrfs_mknod, | 3670 | .mknod = btrfs_mknod, |
3670 | .setxattr = generic_setxattr, | 3671 | .setxattr = btrfs_setxattr, |
3671 | .getxattr = generic_getxattr, | 3672 | .getxattr = btrfs_getxattr, |
3672 | .listxattr = btrfs_listxattr, | 3673 | .listxattr = btrfs_listxattr, |
3673 | .removexattr = generic_removexattr, | 3674 | .removexattr = btrfs_removexattr, |
3674 | .permission = btrfs_permission, | 3675 | .permission = btrfs_permission, |
3675 | }; | 3676 | }; |
3676 | static struct inode_operations btrfs_dir_ro_inode_operations = { | 3677 | static struct inode_operations btrfs_dir_ro_inode_operations = { |
@@ -3728,20 +3729,20 @@ static struct inode_operations btrfs_file_inode_operations = { | |||
3728 | .truncate = btrfs_truncate, | 3729 | .truncate = btrfs_truncate, |
3729 | .getattr = btrfs_getattr, | 3730 | .getattr = btrfs_getattr, |
3730 | .setattr = btrfs_setattr, | 3731 | .setattr = btrfs_setattr, |
3731 | .setxattr = generic_setxattr, | 3732 | .setxattr = btrfs_setxattr, |
3732 | .getxattr = generic_getxattr, | 3733 | .getxattr = btrfs_getxattr, |
3733 | .listxattr = btrfs_listxattr, | 3734 | .listxattr = btrfs_listxattr, |
3734 | .removexattr = generic_removexattr, | 3735 | .removexattr = btrfs_removexattr, |
3735 | .permission = btrfs_permission, | 3736 | .permission = btrfs_permission, |
3736 | }; | 3737 | }; |
3737 | static struct inode_operations btrfs_special_inode_operations = { | 3738 | static struct inode_operations btrfs_special_inode_operations = { |
3738 | .getattr = btrfs_getattr, | 3739 | .getattr = btrfs_getattr, |
3739 | .setattr = btrfs_setattr, | 3740 | .setattr = btrfs_setattr, |
3740 | .permission = btrfs_permission, | 3741 | .permission = btrfs_permission, |
3741 | .setxattr = generic_setxattr, | 3742 | .setxattr = btrfs_setxattr, |
3742 | .getxattr = generic_getxattr, | 3743 | .getxattr = btrfs_getxattr, |
3743 | .listxattr = btrfs_listxattr, | 3744 | .listxattr = btrfs_listxattr, |
3744 | .removexattr = generic_removexattr, | 3745 | .removexattr = btrfs_removexattr, |
3745 | }; | 3746 | }; |
3746 | static struct inode_operations btrfs_symlink_inode_operations = { | 3747 | static struct inode_operations btrfs_symlink_inode_operations = { |
3747 | .readlink = generic_readlink, | 3748 | .readlink = generic_readlink, |