Signed-off-by: David Zafman <dzafman@redhat.com>
break;
for (std::map<string,bufferlist>::iterator i = as.data.begin();
i != as.data.end(); ++i) {
- if (i->first == "_" || i->first == "snapset")
+ // The user xattrs that we want all begin with "_" with length > 1.
+ // Drop key "_" and all attributes that do not start with '_'
+ if (i->first == "_" || i->first[0] != '_')
continue;
ret = ioctx.setxattr(ob.hoid.hobj.oid.name, i->first.substr(1).c_str(), i->second);
if (ret) {