[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] libgfs2: More unused bits (re)moved



>From 3a18369266fdaf9fa2e68824da77a2886c6a3b63 Mon Sep 17 00:00:00 2001
From: Steven Whitehouse <swhiteho redhat com>
Date: Thu, 1 Dec 2011 14:23:26 +0000
Subject: [PATCH] libgfs2: More unused bits (re)moved

Some headers and constants which are not required are removed
and, one set of of constants which is only used internally to
a single file in the library are moved to that file.

Signed-off-by: Steven Whitehouse <swhiteho redhat com>

diff --git a/gfs2/libgfs2/fs_ops.c b/gfs2/libgfs2/fs_ops.c
index fe7fce6..e2e64d6 100644
--- a/gfs2/libgfs2/fs_ops.c
+++ b/gfs2/libgfs2/fs_ops.c
@@ -14,6 +14,10 @@
 #include <linux/types.h>
 #include "libgfs2.h"
 
+#define DATA (1)
+#define META (2)
+#define DINODE (3)
+
 static __inline__ uint64_t *metapointer(struct gfs2_buffer_head *bh,
 					unsigned int height,
 					struct metapath *mp)
diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h
index c8230d6..ef11221 100644
--- a/gfs2/libgfs2/libgfs2.h
+++ b/gfs2/libgfs2/libgfs2.h
@@ -6,9 +6,6 @@
 #include <stdarg.h>
 #include <stdio.h>
 #include <errno.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <linux/types.h>
@@ -143,10 +140,6 @@ struct gfs2_inode {
 	struct gfs2_sbd *i_sbd;
 };
 
-#define BUF_HASH_SHIFT       (13)    /* # hash buckets = 8K */
-#define BUF_HASH_SIZE        (1 << BUF_HASH_SHIFT)
-#define BUF_HASH_MASK        (BUF_HASH_SIZE - 1)
-
 /* FIXME not sure that i want to keep a record of the inodes or the
  * contents of them, or both ... if I need to write back to them, it
  * would be easier to hold the inode as well  */
@@ -275,10 +268,6 @@ struct metapath {
 /* Look at this!  Why can't we go bigger than 2GB? */
 #define GFS2_MAX_RGSIZE             (2048)
 
-#define DATA (1)
-#define META (2)
-#define DINODE (3)
-
 /* bitmap.c */
 struct gfs2_bmap {
 	uint64_t size;
-- 
1.7.4.4




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]