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

Re: [Cluster-devel] gfs2-utils: Remove last traces of unlinked file from gfs2-utils



Hi,

Looks good to me. I assume the -u is still accepted but ignored so as not to break existing scripts.

Andy

On 05/25/2011 02:23 PM, Steven Whitehouse wrote:
From c00b77a022ec3f420307364be75bb8a126b1e4c0 Mon Sep 17 00:00:00 2001
From: Steven Whitehouse<swhiteho redhat com>
Date: Wed, 25 May 2011 13:54:41 +0100
Subject: [PATCH] Remove last traces of unlinked file from gfs2-utils

No longer required since we don't need the unlinked file and has
been obsolete since the earliest versions of GFS2.

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

diff --git a/gfs2/convert/gfs2_convert.c b/gfs2/convert/gfs2_convert.c
index 77103f3..55d020c 100644
--- a/gfs2/convert/gfs2_convert.c
+++ b/gfs2/convert/gfs2_convert.c
@@ -1494,7 +1494,6 @@ static int init(struct gfs2_sbd *sbp)
  	/* ---------------------------------------------- */
  	sbp->jsize = GFS2_DEFAULT_JSIZE;
  	sbp->rgsize = GFS2_DEFAULT_RGSIZE;
-	sbp->utsize = GFS2_DEFAULT_UTSIZE;
  	sbp->qcsize = GFS2_DEFAULT_QCSIZE;
  	sbp->time = time(NULL);
  	sbp->blks_total = 0;   /* total blocks         - total them up later */
diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c
index b15ed28..d445f05 100644
--- a/gfs2/edit/hexedit.c
+++ b/gfs2/edit/hexedit.c
@@ -1764,7 +1764,6 @@ static void read_superblock(int fd)
  	bh = bread(&sbd, 0x10);
  	sbd.jsize = GFS2_DEFAULT_JSIZE;
  	sbd.rgsize = GFS2_DEFAULT_RGSIZE;
-	sbd.utsize = GFS2_DEFAULT_UTSIZE;
  	sbd.qcsize = GFS2_DEFAULT_QCSIZE;
  	sbd.time = time(NULL);
  	osi_list_init(&sbd.rglist);
diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h
index 099ba48..be5bdfa 100644
--- a/gfs2/libgfs2/libgfs2.h
+++ b/gfs2/libgfs2/libgfs2.h
@@ -176,7 +176,6 @@ struct gfs2_sbd {
  	unsigned int bsize;	     /* The block size of the FS (in bytes) */
  	unsigned int jsize;	     /* Size of journals (in MB) */
  	unsigned int rgsize;     /* Size of resource groups (in MB) */
-	unsigned int utsize;     /* Size of unlinked tag files (in MB) */
  	unsigned int qcsize;     /* Size of quota change files (in MB) */

  	int debug;
@@ -254,7 +253,6 @@ struct metapath {
  #define GFS2_DEFAULT_BSIZE          (4096)
  #define GFS2_DEFAULT_JSIZE          (128)
  #define GFS2_DEFAULT_RGSIZE         (256)
-#define GFS2_DEFAULT_UTSIZE         (1)
  #define GFS2_DEFAULT_QCSIZE         (1)
  #define GFS2_DEFAULT_LOCKPROTO      "lock_dlm"
  #define GFS2_MIN_GROW_SIZE          (10)
diff --git a/gfs2/mkfs/main_mkfs.c b/gfs2/mkfs/main_mkfs.c
index d33a424..db2309a 100644
--- a/gfs2/mkfs/main_mkfs.c
+++ b/gfs2/mkfs/main_mkfs.c
@@ -64,7 +64,6 @@ print_usage(const char *prog_name)
  		"  -q               Don't print anything\n"
  		"  -r<MB>           Resource Group Size\n"
  		"  -t<name>         Name of the lock table\n"
-		"  -u<MB>           Size of unlinked file\n"
  		"  -V               Print program version information, then exit\n"), prog_name);
  }

@@ -168,7 +167,6 @@ static void decode_arguments(int argc, char *argv[], struct gfs2_sbd *sdp)
  			break;

  		case 'u':
-			sdp->utsize = atoi(optarg);
  			break;

  		case 'V':
@@ -237,7 +235,6 @@ static void decode_arguments(int argc, char *argv[], struct gfs2_sbd *sdp)
  		else
  			printf("  rgsize = %u\n", sdp->rgsize);
  		printf("  table = %s\n", sdp->locktable);
-		printf("  utsize = %u\n", sdp->utsize);
  		printf("  device = %s\n", sdp->device_name);
  		if (sdp->orig_fssize)
  			printf("  block-count = %llu\n",
@@ -350,9 +347,6 @@ static void verify_arguments(struct gfs2_sbd *sdp)
  	if (sdp->jsize<  8 || sdp->jsize>  1024)
  		die( _("bad journal size\n"));

-	if (!sdp->utsize || sdp->utsize>  64)
-		die( _("bad unlinked size\n"));
-
  	if (!sdp->qcsize || sdp->qcsize>  64)
  		die( _("bad quota change size\n"));
  }
@@ -573,7 +567,6 @@ void main_mkfs(int argc, char *argv[])
  	sdp->bsize = -1;
  	sdp->jsize = GFS2_DEFAULT_JSIZE;
  	sdp->rgsize = -1;
-	sdp->utsize = GFS2_DEFAULT_UTSIZE;
  	sdp->qcsize = GFS2_DEFAULT_QCSIZE;
  	strcpy(sdp->lockproto, GFS2_DEFAULT_LOCKPROTO);
  	sdp->time = time(NULL);


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