From 690789467194899a92cb95e1ee74e43bb8435b44 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 22 Oct 2010 16:06:19 -0700 Subject: [PATCH] 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 --- src/os/FileStore.cc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index eef6ea205ee5d..9978b11ef8737 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 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"); -- 2.39.5