From 41bc77f5f35d114824d8075597907233451db3dc Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sat, 27 Oct 2012 15:32:22 -0700 Subject: [PATCH] os/FileStore: drop _getattr() helpers Signed-off-by: Sage Weil --- src/os/FileStore.cc | 37 ------------------------------------- src/os/FileStore.h | 3 --- 2 files changed, 40 deletions(-) diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index 30572f0e07338..705b5e5dd7e22 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -3698,43 +3698,6 @@ int FileStore::_fgetattrs(int fd, map& 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) diff --git a/src/os/FileStore.h b/src/os/FileStore.h index 66a7de63df432..f9f6222727378 100644 --- a/src/os/FileStore.h +++ b/src/os/FileStore.h @@ -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& 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& aset, const SequencerPosition &spos); int _rmattr(coll_t cid, const hobject_t& oid, const char *name, -- 2.39.5