summaryrefslogtreecommitdiffstats
path: root/fs/ceph/super.h
diff options
context:
space:
mode:
authorAlex Elder2012-01-23 22:49:28 +0100
committerAlex Elder2012-03-22 16:47:46 +0100
commit3ce6cd1233046eb97d6d2bd5d80c1cd40528ea2f (patch)
tree43025c030db1741222b96156931b6aa2c8b85e51 /fs/ceph/super.h
parentceph: encode type in vxattr callback routines (diff)
downloadkernel-qcow2-linux-3ce6cd1233046eb97d6d2bd5d80c1cd40528ea2f.tar.gz
kernel-qcow2-linux-3ce6cd1233046eb97d6d2bd5d80c1cd40528ea2f.tar.xz
kernel-qcow2-linux-3ce6cd1233046eb97d6d2bd5d80c1cd40528ea2f.zip
ceph: avoid repeatedly computing the size of constant vxattr names
All names defined in the directory and file virtual extended attribute tables are constant, and the size of each is known at compile time. So there's no need to compute their length every time any file's attribute is listed. Record the length of each string and use it when needed to determine the space need to represent them. In addition, compute the aggregate size of strings in each table just once at initialization time. Signed-off-by: Alex Elder <elder@dreamhost.com> Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r--fs/ceph/super.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h
index 18d8a866a07b..fc35036d258d 100644
--- a/fs/ceph/super.h
+++ b/fs/ceph/super.h
@@ -733,6 +733,8 @@ extern ssize_t ceph_listxattr(struct dentry *, char *, size_t);
extern int ceph_removexattr(struct dentry *, const char *);
extern void __ceph_build_xattrs_blob(struct ceph_inode_info *ci);
extern void __ceph_destroy_xattrs(struct ceph_inode_info *ci);
+extern void __init ceph_xattr_init(void);
+extern void ceph_xattr_exit(void);
/* caps.c */
extern const char *ceph_cap_string(int c);