summaryrefslogtreecommitdiffstats
path: root/src/os/FileStore.cc
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-10-23 01:06:19 +0200
committerSage Weil <sage@newdream.net>2010-10-23 01:06:19 +0200
commit690789467194899a92cb95e1ee74e43bb8435b44 (patch)
tree9efc33049df27e3fecead0f6b44cfc3c2931b00d /src/os/FileStore.cc
parentfilestore: change xattr chunk size to 2048 (diff)
downloadceph-690789467194899a92cb95e1ee74e43bb8435b44.tar.xz
ceph-690789467194899a92cb95e1ee74e43bb8435b44.zip
filestore: ignore ENOSPC on setxattr pending a better workaround
This effectively reverts to old behavior (we weren't checking for ENOSPC errors at all before). Log which object it happened on. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to '')
-rw-r--r--src/os/FileStore.cc15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc
index eef6ea205ee..9978b11ef87 100644
--- a/src/os/FileStore.cc
+++ b/src/os/FileStore.cc
@@ -1388,6 +1388,9 @@ unsigned FileStore::_do_transaction(Transaction& t)
bufferlist bl;
t.get_bl(bl);
r = _setattr(cid, oid, name.c_str(), bl.c_str(), bl.length());
+ if (r == -ENOSPC)
+ dout(0) << " ENOSPC on setxattr on " << cid << "/" << oid
+ << " name " << name << " size " << bl.length() << dendl;
}
break;
@@ -1398,7 +1401,9 @@ unsigned FileStore::_do_transaction(Transaction& t)
map<string, bufferptr> aset;
t.get_attrset(aset);
r = _setattrs(cid, oid, aset);
- }
+ if (r == -ENOSPC)
+ dout(0) << " ENOSPC on setxattrs on " << cid << "/" << oid << dendl;
+ }
break;
case Transaction::OP_RMATTR:
@@ -1499,7 +1504,13 @@ unsigned FileStore::_do_transaction(Transaction& t)
if (r == -ENOSPC) {
// For now, if we hit _any_ ENOSPC, crash, before we do any damage
// by partially applying transactions.
- assert(0 == "ENOSPC handling not implemented");
+
+ // XXX HACK: if it was an setxattr op, silently fail, until we have a better workaround XXX
+ if (op == Transaction::OP_SETATTR || op == Transaction::OP_SETATTRS)
+ dout(0) << "WARNING: ignoring setattr ENOSPC failure, until we implement a workaround for extN"
+ << " xattr limitations" << dendl;
+ else
+ assert(0 == "ENOSPC handling not implemented");
}
if (r == -EIO) {
assert(0 == "EIO handling not implemented");