]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/FileStore: For getxattr, enlarge the value size avoid try again. 3974/head
authorJianpeng Ma <jianpeng.ma@intel.com>
Thu, 12 Mar 2015 06:11:04 +0000 (14:11 +0800)
committerJianpeng Ma <jianpeng.ma@intel.com>
Thu, 12 Mar 2015 06:11:04 +0000 (14:11 +0800)
Even the size of content of user.ceph._ is larger than 100. It will try
again. Avoid this, enlarge the buffer size which use
CHAIN_XATTR_MAX_BLOCK_LEN.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
src/os/FileStore.cc

index f6c3bb872a2ea0ad2be85c72a3a9b25f24a670a2..5645c940a3af40f03f1697a7b6c19e0233e43443 100644 (file)
@@ -3745,7 +3745,7 @@ int FileStore::snapshot(const string& name)
 
 int FileStore::_fgetattr(int fd, const char *name, bufferptr& bp)
 {
-  char val[100];
+  char val[CHAIN_XATTR_MAX_BLOCK_LEN];
   int l = chain_fgetxattr(fd, name, val, sizeof(val));
   if (l >= 0) {
     bp = buffer::create(l);