Skip to contentSkip to conversation

gfs2-utils: Remove last traces of unlinked file from gfs2-utils

Cluster-devel Steven Whitehouse 2 participants 3 messages May 25, 2011

lore
Share & tools
lore
#0 lore raw

From c00b77a022ec3f420307364be75bb8a126b1e4c0 Mon Sep 17 00:00:00 2001
From: Steven Whitehouse <[email protected]>
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.

gfs2/convert/gfs2_convert.c +0 -1
index 77103f3..55d020c 100644
@@ -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 */
gfs2/edit/hexedit.c +0 -1
index b15ed28..d445f05 100644
@@ -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);
gfs2/libgfs2/libgfs2.h +0 -2
index 099ba48..be5bdfa 100644
@@ -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)
gfs2/mkfs/main_mkfs.c +0 -7
index d33a424..db2309a 100644
@@ -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);
Signature · 1 line
1.7.4
#1 lore raw

Hi,

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

Andy

Quoted 100 lines · Steven Whitehouse
Quoted 1 line

From c00b77a022ec3f420307364be75bb8a126b1e4c0 Mon Sep 17 00:00:00 2001

From: Steven Whitehouse<[email protected]>
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.

gfs2/convert/gfs2_convert.c +0 -1
index 77103f3..55d020c 100644
@@ -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 */
gfs2/edit/hexedit.c +0 -1
index b15ed28..d445f05 100644
@@ -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);
gfs2/libgfs2/libgfs2.h +0 -2
index 099ba48..be5bdfa 100644
@@ -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)
gfs2/mkfs/main_mkfs.c +0 -7
index d33a424..db2309a 100644
@@ -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);
#2 lore raw

Hi,

Quoted 7 lines · Andrew Price

Hi,

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

Andy

Yes, thats the plan, although I think we are pretty safe in assuming that there are no such scripts in this case :-)

Steve.