]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common: drop unused get_max_pipe_size() in buffer.cc. 25432/head
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Thu, 6 Dec 2018 22:58:40 +0000 (23:58 +0100)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Mon, 10 Dec 2018 16:48:19 +0000 (17:48 +0100)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/common/buffer.cc
src/include/config-h.in.cmake

index 10cfbc9a0cfb1fb3eb077c4b5d84d7cd37ab5ce7..51861216f66c3b1eacb21f0775aa1074ba617dd6 100644 (file)
@@ -107,41 +107,6 @@ using namespace ceph;
     return buffer_missed_crc;
   }
 
-#ifdef CEPH_HAVE_SETPIPE_SZ
-  static std::atomic<unsigned> buffer_max_pipe_size { 0 };
-  int update_max_pipe_size() {
-    char buf[32];
-    int r;
-    std::string err;
-    struct stat stat_result;
-    if (::stat(PROCPREFIX "/proc/sys/fs/pipe-max-size", &stat_result) == -1)
-      return -errno;
-    r = safe_read_file(PROCPREFIX "/proc/sys/fs/", "pipe-max-size",
-                      buf, sizeof(buf) - 1);
-    if (r < 0)
-      return r;
-    buf[r] = '\0';
-    size_t size = strict_strtol(buf, 10, &err);
-    if (!err.empty())
-      return -EIO;
-    buffer_max_pipe_size = size;
-    return 0;
-  }
-
-  size_t get_max_pipe_size() {
-    size_t size = buffer_max_pipe_size;
-    if (size)
-      return size;
-    if (update_max_pipe_size() == 0)
-      return buffer_max_pipe_size;
-    // this is the max size hardcoded in linux before 2.6.35
-    return 65536;
-  }
-#else
-  size_t get_max_pipe_size() { return 65536; }
-#endif
-
-
   const char * buffer::error::what() const throw () {
     return "buffer::exception";
   }
index 329fb526febc6bc2854e96ba686aed8e103c3402..456ae30403e694415ba7a3e54713ac4bc16ed551 100644 (file)
 /* Define if the C compiler supports __PRETTY_FUNCTION__ */
 #cmakedefine HAVE_PRETTY_FUNC
 
-/* F_SETPIPE_SZ is supported */
-#cmakedefine CEPH_HAVE_SETPIPE_SZ
-
 /* Have eventfd extension. */
 #cmakedefine HAVE_EVENTFD