From b758fd5f0ebcccdb1641a852d40ee880bad01107 Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Thu, 24 Apr 2014 15:34:24 -0700 Subject: [PATCH] FileStore: set XATTR_NO_SPILL_OUT when creating new files. Fixes: #8205 Backport: firefly Signed-off-by: Greg Farnum (cherry picked from commit e3b995e1567f3ccc6d00ae27ab2aa99ca157228a) --- src/os/FileStore.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index 2fc762a047d..f73d9308580 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -275,6 +275,14 @@ int FileStore::lfn_open(coll_t cid, << ") in index: " << cpp_strerror(-r) << dendl; goto fail; } + r = chain_fsetxattr(fd, XATTR_SPILL_OUT_NAME, + XATTR_NO_SPILL_OUT, sizeof(XATTR_NO_SPILL_OUT)); + if (r < 0) { + VOID_TEMP_FAILURE_RETRY(::close(fd)); + derr << "error setting spillout xattr for oid " << oid << " (" << (*path)->path() + << "):" << cpp_strerror(-r) << dendl; + goto fail; + } } } -- 2.47.3