]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/FileStore: drop _getattr() helpers
authorSage Weil <sage@inktank.com>
Sat, 27 Oct 2012 22:32:22 +0000 (15:32 -0700)
committerSage Weil <sage@inktank.com>
Mon, 5 Nov 2012 08:13:53 +0000 (00:13 -0800)
Signed-off-by: Sage Weil <sage@inktank.com>
src/os/FileStore.cc
src/os/FileStore.h

index 30572f0e0733813561e84b6b45d9c68196cbf9b2..705b5e5dd7e225fd5908faa2ccbbdb131bbd4c8e 100644 (file)
@@ -3698,43 +3698,6 @@ int FileStore::_fgetattrs(int fd, map<string,bufferptr>& aset, bool user_only)
 }
 
 
-// low-level attr helpers
-int FileStore::_getattr(coll_t cid, const hobject_t& oid, const char *name, bufferptr& bp)
-{
-  char val[100];
-  int l = lfn_getxattr(cid, oid, name, val, sizeof(val));
-  if (l >= 0) {
-    bp = buffer::create(l);
-    memcpy(bp.c_str(), val, l);
-  } else if (l == -ERANGE) {
-    l = lfn_getxattr(cid, oid, name, 0, 0);
-    if (l > 0) {
-      bp = buffer::create(l);
-      l = lfn_getxattr(cid, oid, name, bp.c_str(), l);
-    }
-  }
-  return l;
-}
-
-int FileStore::_getattr(const char *fn, const char *name, bufferptr& bp)
-{
-  char val[100];
-  int l = chain_getxattr(fn, name, val, sizeof(val));
-  if (l >= 0) {
-    bp = buffer::create(l);
-    memcpy(bp.c_str(), val, l);
-  } else if (l == -ERANGE) {
-    l = chain_getxattr(fn, name, 0, 0);
-    if (l > 0) {
-      bp = buffer::create(l);
-      l = chain_getxattr(fn, name, bp.c_str(), l);
-    }
-  }
-  assert(!m_filestore_fail_eio || l != -EIO);
-  return l;
-}
-
-
 // objects
 
 int FileStore::getattr(coll_t cid, const hobject_t& oid, const char *name, bufferptr &bp)
index 66a7de63df4327a80b557beee10c58fa7be38f9c..f9f6222727378f24b5338a04c374d059e91021bf 100644 (file)
@@ -405,9 +405,6 @@ public:
   int getattr(coll_t cid, const hobject_t& oid, const char *name, bufferptr &bp);
   int getattrs(coll_t cid, const hobject_t& oid, map<string,bufferptr>& aset, bool user_only = false);
 
-  int _getattr(coll_t cid, const hobject_t& oid, const char *name, bufferptr& bp);
-  int _getattr(const char *fn, const char *name, bufferptr& bp);
-
   int _setattrs(coll_t cid, const hobject_t& oid, map<string,bufferptr>& aset,
                const SequencerPosition &spos);
   int _rmattr(coll_t cid, const hobject_t& oid, const char *name,