gfs2-utils: master - libgfs2: Remove 'writes' field from gfs2_sbd

Andrew Price andyp at fedoraproject.org
Tue May 14 13:10:02 UTC 2013


Gitweb:        http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=1cebece3e922bfffa52f58ac6594700764868771
Commit:        1cebece3e922bfffa52f58ac6594700764868771
Parent:        a3ab08213c87313ec899c114c23650d05268eef5
Author:        Andrew Price <anprice at redhat.com>
AuthorDate:    Fri Mar 1 16:03:52 2013 +0000
Committer:     Andrew Price <anprice at redhat.com>
CommitterDate: Tue May 14 14:05:11 2013 +0100

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 at redhat.com>
---
 gfs2/libgfs2/buf.c     |    1 -
 gfs2/libgfs2/libgfs2.h |    1 -
 gfs2/mkfs/main_mkfs.c  |    5 -----
 3 files changed, 0 insertions(+), 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 6471600..864ff98 100644
--- a/gfs2/mkfs/main_mkfs.c
+++ b/gfs2/mkfs/main_mkfs.c
@@ -583,15 +583,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


More information about the cluster-commits mailing list