]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os: Fix version_stamp_is_valid() and write_version_stamp() error return
authorDavid Zafman <david.zafman@inktank.com>
Sat, 14 Sep 2013 01:04:29 +0000 (18:04 -0700)
committerDavid Zafman <david.zafman@inktank.com>
Thu, 26 Sep 2013 18:24:31 +0000 (11:24 -0700)
Caused by 341fb208aa32117f58ed4ce623f4b152f64ac72e

Signed-off-by: David Zafman <david.zafman@inktank.com>
src/os/FileStore.cc

index b8d099ae73d3439f49dea9da230feccf3f114d6a..2c256ad0c097d41cafda3c80dc71652c26db626c 100644 (file)
@@ -937,7 +937,7 @@ int FileStore::version_stamp_is_valid(uint32_t *version)
   int ret = safe_read(fd, bp.c_str(), bp.length());
   TEMP_FAILURE_RETRY(::close(fd));
   if (ret < 0)
-    return -errno;
+    return ret;
   bufferlist bl;
   bl.push_back(bp);
   bufferlist::iterator i = bl.begin();
@@ -960,9 +960,7 @@ int FileStore::write_version_stamp()
   
   int ret = safe_write(fd, bl.c_str(), bl.length());
   TEMP_FAILURE_RETRY(::close(fd));
-  if (ret < 0)
-    return -errno;
-  return 0;
+  return ret;
 }
 
 int FileStore::read_op_seq(uint64_t *seq)