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

[Cluster-devel] [PATCH 2/6] libgfs2: Remove 'writes' field from gfs2_sbd



This was only used to print out how many writes mkfs.gfs2 had made
during its run in debug mode, which doesn't really make sense any more
as we don't use bwrite for much of the mkfs process now.

Signed-off-by: Andrew Price <anprice redhat com>
---
 gfs2/libgfs2/buf.c     | 1 -
 gfs2/libgfs2/libgfs2.h | 1 -
 gfs2/mkfs/main_mkfs.c  | 5 -----
 3 files changed, 7 deletions(-)

diff --git a/gfs2/libgfs2/buf.c b/gfs2/libgfs2/buf.c
index 68f0731..6fcdd17 100644
--- a/gfs2/libgfs2/buf.c
+++ b/gfs2/libgfs2/buf.c
@@ -80,7 +80,6 @@ int bwrite(struct gfs2_buffer_head *bh)
 
 	if (pwritev(sdp->device_fd, &bh->iov, 1, bh->b_blocknr * sdp->bsize) != bh->iov.iov_len)
 		return -1;
-	sdp->writes++;
 	bh->b_modified = 0;
 	return 0;
 }
diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h
index 7d2d9ff..e069e9d 100644
--- a/gfs2/libgfs2/libgfs2.h
+++ b/gfs2/libgfs2/libgfs2.h
@@ -311,7 +311,6 @@ struct gfs2_sbd {
 	struct gfs2_inode *master_dir;
 	struct master_dir md;
 
-	unsigned int writes;
 	int metafs_fd;
 	char metafs_path[PATH_MAX]; /* where metafs is mounted */
 	struct special_blocks eattr_blocks;
diff --git a/gfs2/mkfs/main_mkfs.c b/gfs2/mkfs/main_mkfs.c
index 8d5549d..9949a46 100644
--- a/gfs2/mkfs/main_mkfs.c
+++ b/gfs2/mkfs/main_mkfs.c
@@ -590,15 +590,10 @@ static void print_results(struct gfs2_sbd *sdp, uint64_t real_device_size,
 	printf("%-27s%llu\n", _("Resource groups:"), (unsigned long long)sdp->rgrps);
 	printf("%-27s\"%s\"\n", _("Locking protocol:"), sdp->lockproto);
 	printf("%-27s\"%s\"\n", _("Lock table:"), sdp->locktable);
-
-	if (opts->debug) {
-		printf("%-27s%u\n", _("Writes:"), sdp->writes);
-	}
 	/* Translators: "UUID" = universally unique identifier. */
 	printf("%-27s%s\n", _("UUID:"), str_uuid(uuid));
 }
 
-
 /**
  * If path is a symlink, return 1 with *abspath pointing to the absolute path,
  * otherwise return 0. Exit on errors. The caller must free the memory pointed
-- 
1.8.1.4


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