]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
os/chain_xattr: stripe shortish xattrs over small chunks for XFS
authorSage Weil <sage@redhat.com>
Thu, 19 Mar 2015 18:35:13 +0000 (11:35 -0700)
committerSage Weil <sage@redhat.com>
Fri, 15 May 2015 22:56:57 +0000 (18:56 -0400)
commitc6cdb4081e366f471b372102905a1192910ab2da
treed8b450ef3ddf11924716df9dab5bb934949a8228
parent8614dcebf384b74b283cd352001a65fa26ba925c
os/chain_xattr: stripe shortish xattrs over small chunks for XFS

XFS has a hard limit of 255 (or 254?) bytes for xattrs to be inlined in the
inode due to a single byte for the length in the on-disk format.  If we
have an xattr that is a bit bigger than that it will get kicked out into a
separate extent, but if we stripe it across a few shorter xattrs it can
be inlined when the xfs inode is e.g. 2K.

Adjust the chain_xattr logic to capture this case.  Note that we are doing
this unconditionally regardless of fs type, but that is probably okay
given that most users use XFS and the cost isn't huge.

Reported-by: Ning Yao <yaoning@ruijie.com.cn>
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/chain_xattr.cc
src/os/chain_xattr.h
src/test/objectstore/chain_xattr.cc