aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2008-08-28 06:21:17 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:07 -0400
commit95819c05732c511338b43c115ffbcee978c02888 (patch)
tree4622f326207c53e42e7c9e8e8d14960e17190a30 /fs/btrfs/inode.c
parenteaa47d8612783807ef9703ebc9bf0d0f0455bf62 (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.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 10f26f44532..43d3f2649ca 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -45,6 +45,7 @@
#include "print-tree.h"
#include "volumes.h"
#include "ordered-data.h"
+#include "xattr.h"
struct btrfs_iget_args {
u64 ino;
@@ -3667,10 +3668,10 @@ static struct inode_operations btrfs_dir_inode_operations = {
.symlink = btrfs_symlink,
.setattr = btrfs_setattr,
.mknod = btrfs_mknod,
- .setxattr = generic_setxattr,
- .getxattr = generic_getxattr,
+ .setxattr = btrfs_setxattr,
+ .getxattr = btrfs_getxattr,
.listxattr = btrfs_listxattr,
- .removexattr = generic_removexattr,
+ .removexattr = btrfs_removexattr,
.permission = btrfs_permission,
};
static struct inode_operations btrfs_dir_ro_inode_operations = {
@@ -3728,20 +3729,20 @@ static struct inode_operations btrfs_file_inode_operations = {
.truncate = btrfs_truncate,
.getattr = btrfs_getattr,
.setattr = btrfs_setattr,
- .setxattr = generic_setxattr,
- .getxattr = generic_getxattr,
+ .setxattr = btrfs_setxattr,
+ .getxattr = btrfs_getxattr,
.listxattr = btrfs_listxattr,
- .removexattr = generic_removexattr,
+ .removexattr = btrfs_removexattr,
.permission = btrfs_permission,
};
static struct inode_operations btrfs_special_inode_operations = {
.getattr = btrfs_getattr,
.setattr = btrfs_setattr,
.permission = btrfs_permission,
- .setxattr = generic_setxattr,
- .getxattr = generic_getxattr,
+ .setxattr = btrfs_setxattr,
+ .getxattr = btrfs_getxattr,
.listxattr = btrfs_listxattr,
- .removexattr = generic_removexattr,
+ .removexattr = btrfs_removexattr,
};
static struct inode_operations btrfs_symlink_inode_operations = {
.readlink = generic_readlink,