From: Greg Farnum Date: Tue, 20 May 2014 20:09:26 +0000 (-0700) Subject: FileStore: remove the user_only param from _fgetattrs X-Git-Tag: v0.83~109^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f9787224baca713bf69de31f88fcc29cd8044f5b;p=ceph.git FileStore: remove the user_only param from _fgetattrs Nobody sets it to true, so remove it! Signed-off-by: Greg Farnum --- diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index 6561fe92a6bd..f155edff6a06 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -2946,7 +2946,7 @@ int FileStore::_clone(coll_t cid, const ghobject_t& oldoid, const ghobject_t& ne { char buf[2]; map aset; - r = _fgetattrs(**o, aset, false); + r = _fgetattrs(**o, aset); if (r < 0) goto out3; @@ -3537,7 +3537,7 @@ int FileStore::_fgetattr(int fd, const char *name, bufferptr& bp) return l; } -int FileStore::_fgetattrs(int fd, map& aset, bool user_only) +int FileStore::_fgetattrs(int fd, map& aset) { // get attr list char names1[100]; @@ -3571,17 +3571,9 @@ int FileStore::_fgetattrs(int fd, map& aset, bool user_only) while (name < end) { char *attrname = name; if (parse_attrname(&name)) { - char *set_name = name; - bool can_get = true; - if (user_only) { - if (*set_name =='_') - set_name++; - else - can_get = false; - } - if (*set_name && can_get) { + if (*name) { dout(20) << "fgetattrs " << fd << " getting '" << name << "'" << dendl; - int r = _fgetattr(fd, attrname, aset[set_name]); + int r = _fgetattr(fd, attrname, aset[name]); if (r < 0) return r; } @@ -3719,7 +3711,7 @@ int FileStore::getattrs(coll_t cid, const ghobject_t& oid, map if (r >= 0 && !strncmp(buf, XATTR_NO_SPILL_OUT, sizeof(XATTR_NO_SPILL_OUT))) spill_out = false; - r = _fgetattrs(**fd, aset, false); + r = _fgetattrs(**fd, aset); if (r < 0) { goto out; } @@ -3790,7 +3782,7 @@ int FileStore::_setattrs(coll_t cid, const ghobject_t& oid, map= 0) { for (map::iterator p = aset.begin(); p != aset.end(); ++p) { char n[CHAIN_XATTR_MAX_NAME_LEN]; @@ -4030,7 +4022,7 @@ int FileStore::collection_getattrs(coll_t cid, map& aset) r = -errno; goto out; } - r = _fgetattrs(fd, aset, false); + r = _fgetattrs(fd, aset); VOID_TEMP_FAILURE_RETRY(::close(fd)); out: dout(10) << "collection_getattrs " << fn << " = " << r << dendl; diff --git a/src/os/FileStore.h b/src/os/FileStore.h index 30d6dc90b93d..e78ad2b00f6e 100644 --- a/src/os/FileStore.h +++ b/src/os/FileStore.h @@ -461,7 +461,7 @@ public: int _remove(coll_t cid, const ghobject_t& oid, const SequencerPosition &spos); int _fgetattr(int fd, const char *name, bufferptr& bp); - int _fgetattrs(int fd, map& aset, bool user_only); + int _fgetattrs(int fd, map& aset); int _fsetattrs(int fd, map &aset); void _start_sync();