]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
FileStore: set XATTR_NO_SPILL_OUT when creating new files.
authorGreg Farnum <greg@inktank.com>
Thu, 24 Apr 2014 22:34:24 +0000 (15:34 -0700)
committerSage Weil <sage@inktank.com>
Tue, 24 Jun 2014 19:12:25 +0000 (12:12 -0700)
Fixes: #8205
Backport: firefly

Signed-off-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit e3b995e1567f3ccc6d00ae27ab2aa99ca157228a)

src/os/FileStore.cc

index 2fc762a047d2259097596a7afa40d7d2535b8372..f73d93085808f56937fbf5bd2e01f790d70a1247 100644 (file)
@@ -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;
+      }
     }
   }