]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: avoid repeatedly computing the size of constant vxattr names
authorAlex Elder <elder@dreamhost.com>
Mon, 23 Jan 2012 21:49:28 +0000 (15:49 -0600)
committerAlex Elder <elder@dreamhost.com>
Thu, 22 Mar 2012 15:47:46 +0000 (10:47 -0500)
commit2101e98f87b0eebdd96a5b38a4e1e28714dffe92
tree43025c030db1741222b96156931b6aa2c8b85e51
parent0caa0c26d37dbf1c4b2d2fc148ffc7b050fb4210
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>
fs/ceph/super.c
fs/ceph/super.h
fs/ceph/xattr.c