]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
remove unused fiemap code
authorSage Weil <sage@inktank.com>
Fri, 26 Jul 2013 23:42:41 +0000 (16:42 -0700)
committerSage Weil <sage@inktank.com>
Fri, 26 Jul 2013 23:58:14 +0000 (16:58 -0700)
Signed-off-by: Sage Weil <sage@inktank.com>
COPYING
debian/copyright
src/Makefile.am
src/common/fiemap.cc [deleted file]
src/include/fiemap.h [deleted file]
src/os/FileStore.cc
src/rbd.cc

diff --git a/COPYING b/COPYING
index b374bdc1801768b4ffc33e9e443d12fa9dc0b8da..fe6ffaac0f80f61273d1a96ef5e37f5d8787ec33 100644 (file)
--- a/COPYING
+++ b/COPYING
@@ -15,11 +15,6 @@ Copyright:
     Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
 License: GPL2
 
-Files: src/common/fiemap.cc
-Copyright:
-    Copyright (C) 2010 Canonical
-License: GPL2
-
 Files: src/mount/canonicalize.c
 Copyright: Copyright (C) 1993 Rick Sladkey <jrs@world.std.com>
 License: LGPL2 or later
index 4295a1564f9a38e6d6b0c18a0ee3ceabf52a2ca0..e94a11b99626770d3671a6c45bd4f02a4a39b966 100644 (file)
@@ -16,11 +16,6 @@ Copyright:
     Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
 License: GPL2
 
-Files: src/common/fiemap.cc
-Copyright:
-    Copyright (C) 2010 Canonical
-License: GPL2
-
 Files: src/mount/canonicalize.c
 Copyright: Copyright (C) 1993 Rick Sladkey <jrs@world.std.com>
 License: LGPL2 or later
index 307abf2f9653ae9a6d22e6a3e68370ceb988ffeb..a9bbde3268601e1790a27b6b1f53785e86c26f27 100644 (file)
@@ -504,7 +504,7 @@ ceph_radosacl_SOURCES = radosacl.cc
 ceph_radosacl_LDADD = librados.la $(PTHREAD_LIBS) -lm $(CRYPTO_LIBS) $(EXTRALIBS)
 bin_DEBUGPROGRAMS += ceph_scratchtool ceph_scratchtoolpp ceph_radosacl
 
-rbd_SOURCES = rbd.cc common/fiemap.cc common/secret.c common/TextTable.cc common/util.cc
+rbd_SOURCES = rbd.cc common/secret.c common/TextTable.cc common/util.cc
 rbd_CXXFLAGS = ${AM_CXXFLAGS}
 rbd_LDADD = librbd.la librados.la $(LIBGLOBAL_LDA) -lkeyutils
 if LINUX
@@ -1895,7 +1895,6 @@ noinst_HEADERS = \
         include/encoding.h\
         include/err.h\
         include/error.h\
-        include/fiemap.h\
         include/filepath.h\
         include/frag.h\
         include/hash.h\
diff --git a/src/common/fiemap.cc b/src/common/fiemap.cc
deleted file mode 100644 (file)
index a1d5fbe..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (C) 2010 Canonical
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- * 
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * 
- */
-
-/*
- *  Author Colin Ian King,  colin.king@canonical.com
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-#include <fcntl.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-
-#if defined(__linux__)
-#include <linux/fs.h>
-#endif
-#include "include/inttypes.h"
-#include "include/fiemap.h"
-
-struct fiemap *read_fiemap(int fd)
-{
-  struct fiemap *fiemap;
-  struct fiemap *_realloc_fiemap = NULL;
-  int extents_size;
-  int r;
-
-  if ((fiemap = (struct fiemap*)malloc(sizeof(struct fiemap))) == NULL) {
-    fprintf(stderr, "Out of memory allocating fiemap\n");
-    return NULL;
-  }
-  memset(fiemap, 0, sizeof(struct fiemap));
-
-  fiemap->fm_start = 0;
-  fiemap->fm_length = ~0;              /* Lazy */
-  fiemap->fm_flags = 0;
-  fiemap->fm_extent_count = 0;
-  fiemap->fm_mapped_extents = 0;
-
-  /* Find out how many extents there are */
-  r = ioctl(fd, FS_IOC_FIEMAP, fiemap);
-  if (r < 0) {
-    goto done_err;
-  }
-
-  if (!fiemap->fm_mapped_extents) {
-    goto done_err;
-  }
-
-  /* Read in the extents */
-  extents_size = sizeof(struct fiemap_extent) * (fiemap->fm_mapped_extents);
-
-  /* Resize fiemap to allow us to read in the extents */
-
-  if ((_realloc_fiemap = (struct fiemap*)realloc(fiemap,sizeof(struct fiemap) +
-                                        extents_size)) == NULL) {
-    fprintf(stderr, "Out of memory allocating fiemap\n");
-    goto done_err;
-  } else {
-    fiemap = _realloc_fiemap;
-  }
-
-  memset(fiemap->fm_extents, 0, extents_size);
-  fiemap->fm_extent_count = fiemap->fm_mapped_extents;
-  fiemap->fm_mapped_extents = 0;
-
-  if (ioctl(fd, FS_IOC_FIEMAP, fiemap) < 0) {
-    fprintf(stderr, "fiemap ioctl() failed\n");
-    goto done_err;
-  }
-
-  return fiemap;
-done_err:
-  free(fiemap);
-  return NULL;
-}
-
diff --git a/src/include/fiemap.h b/src/include/fiemap.h
deleted file mode 100644 (file)
index 846adb1..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef __CEPH_FIEMAP_H
-#define __CEPH_FIEMAP_H
-
-#include "acconfig.h"
-
-/*
- * the header is missing on most systems.  for the time being at
- * least, include our own copy in the repo.
- */
-#ifdef HAVE_FIEMAP_H
-# include <linux/fiemap.h>
-#else
-# include "linux_fiemap.h"
-#endif
-
-#if defined(__linux__)
-#include <linux/ioctl.h>
-#elif defined(__FreeBSD__)
-#include <sys/ioctl.h>
-#endif
-#ifndef FS_IOC_FIEMAP
-# define FS_IOC_FIEMAP                        _IOWR('f', 11, struct fiemap)
-#endif
-
-extern "C" struct fiemap *read_fiemap(int fd);
-
-#endif
index 28f81b7547fd022760bc0038a00bc0fe1281a80c..108a857ab9fc9a8403dc110557c04d0f9f2cd179 100644 (file)
@@ -36,7 +36,7 @@
 #endif
 
 #include "include/compat.h"
-#include "include/fiemap.h"
+#include "include/linux_fiemap.h"
 
 #include "common/xattr.h"
 #include "chain_xattr.h"
index c9b2f0a272ca31e27b76a0fb8f902ef075f5476e..7f90c1f118eaf76a1229cf3aa01c4291e2fec80b 100644 (file)
@@ -60,8 +60,6 @@
 #include <sys/param.h>
 #endif
 
-#include "include/fiemap.h"
-
 #define MAX_SECRET_LEN 1000
 #define MAX_POOL_NAME_SIZE 128