cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH 1/2] libgfs2: Added new RGSIZE macros
@ 2011-07-07 13:49 Carlos Maiolino
  2011-07-07 13:57 ` Steven Whitehouse
  0 siblings, 1 reply; 5+ messages in thread
From: Carlos Maiolino @ 2011-07-07 13:49 UTC (permalink / raw)
  To: cluster-devel.redhat.com

This patch add new macros related to
default rgsizes which makes the purpose
of the values easier to understand
---
 gfs2/libgfs2/libgfs2.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h
index be5bdfa..a0c3eea 100644
--- a/gfs2/libgfs2/libgfs2.h
+++ b/gfs2/libgfs2/libgfs2.h
@@ -258,6 +258,11 @@ struct metapath {
 #define GFS2_MIN_GROW_SIZE          (10)
 #define GFS2_EXCESSIVE_RGS          (10000)
 
+#define GFS2_EXP_MIN_RGSIZE         (1)
+#define GFS2_DEFAULT_MIN_RGSIZE     (32)
+/* 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)
-- 
1.7.5.2



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Cluster-devel] [PATCH 1/2] libgfs2: Added new RGSIZE macros
  2011-07-07 13:49 Carlos Maiolino
@ 2011-07-07 13:57 ` Steven Whitehouse
  0 siblings, 0 replies; 5+ messages in thread
From: Steven Whitehouse @ 2011-07-07 13:57 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Hi,

On Thu, 2011-07-07 at 10:49 -0300, Carlos Maiolino wrote:
> This patch add new macros related to
> default rgsizes which makes the purpose
> of the values easier to understand
> ---
>  gfs2/libgfs2/libgfs2.h |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h
> index be5bdfa..a0c3eea 100644
> --- a/gfs2/libgfs2/libgfs2.h
> +++ b/gfs2/libgfs2/libgfs2.h
> @@ -258,6 +258,11 @@ struct metapath {
>  #define GFS2_MIN_GROW_SIZE          (10)
>  #define GFS2_EXCESSIVE_RGS          (10000)
>  
> +#define GFS2_EXP_MIN_RGSIZE         (1)
> +#define GFS2_DEFAULT_MIN_RGSIZE     (32)
> +/* 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)

The limit is due to 32 bit offsets used within the rgrp's data fields,
and there shouldn't be a need to go to a greater size than that really
since the intent is to divide the disk into a reasonably large number of
rgrps to reduce the likelihood of rgrp contention.

Anyway, looks good modulo my comment on the other patch,

Steve.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Cluster-devel] [PATCH 1/2] libgfs2: Added new RGSIZE macros
@ 2011-07-07 14:21 Carlos Maiolino
  2011-07-07 14:22 ` [Cluster-devel] [PATCH 2/2] mkfs: Change hardcoded numbers by new macro definitions Carlos Maiolino
  2011-07-07 14:26 ` [Cluster-devel] [PATCH 1/2] libgfs2: Added new RGSIZE macros Steven Whitehouse
  0 siblings, 2 replies; 5+ messages in thread
From: Carlos Maiolino @ 2011-07-07 14:21 UTC (permalink / raw)
  To: cluster-devel.redhat.com

This patch add new macros related to
default rgsizes which makes the purpose
of the values easier to understand
---
 gfs2/libgfs2/libgfs2.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h
index be5bdfa..73431fa 100644
--- a/gfs2/libgfs2/libgfs2.h
+++ b/gfs2/libgfs2/libgfs2.h
@@ -258,6 +258,11 @@ struct metapath {
 #define GFS2_MIN_GROW_SIZE          (10)
 #define GFS2_EXCESSIVE_RGS          (10000)
 
+#define GFS2_EXP_MIN_RGSIZE         (1)
+#define GFS2_MIN_RGSIZE             (32)
+/* 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)
-- 
1.7.5.2



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Cluster-devel] [PATCH 2/2] mkfs: Change hardcoded numbers by new macro definitions
  2011-07-07 14:21 [Cluster-devel] [PATCH 1/2] libgfs2: Added new RGSIZE macros Carlos Maiolino
@ 2011-07-07 14:22 ` Carlos Maiolino
  2011-07-07 14:26 ` [Cluster-devel] [PATCH 1/2] libgfs2: Added new RGSIZE macros Steven Whitehouse
  1 sibling, 0 replies; 5+ messages in thread
From: Carlos Maiolino @ 2011-07-07 14:22 UTC (permalink / raw)
  To: cluster-devel.redhat.com

The verify_arguments() function makes use of some hardcoded
integers that would best fit as macros.
---
 gfs2/mkfs/main_mkfs.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/gfs2/mkfs/main_mkfs.c b/gfs2/mkfs/main_mkfs.c
index db2309a..b0bb6e3 100644
--- a/gfs2/mkfs/main_mkfs.c
+++ b/gfs2/mkfs/main_mkfs.c
@@ -332,12 +332,11 @@ static void verify_arguments(struct gfs2_sbd *sdp)
 {
 	if (!sdp->expert)
 		test_locking(sdp->lockproto, sdp->locktable);
-	/* Look at this!  Why can't we go bigger than 2GB? */
 	if (sdp->expert) {
-		if (1 > sdp->rgsize || sdp->rgsize > 2048)
+		if (GFS2_EXP_MIN_RGSIZE > sdp->rgsize || sdp->rgsize > GFS2_MAX_RGSIZE)
 			die( _("bad resource group size\n"));
 	} else {
-		if (32 > sdp->rgsize || sdp->rgsize > 2048)
+		if (GFS2_MIN_RGSIZE > sdp->rgsize || sdp->rgsize > GFS2_MAX_RGSIZE)
 			die( _("bad resource group size\n"));
 	}
 
-- 
1.7.5.2



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Cluster-devel] [PATCH 1/2] libgfs2: Added new RGSIZE macros
  2011-07-07 14:21 [Cluster-devel] [PATCH 1/2] libgfs2: Added new RGSIZE macros Carlos Maiolino
  2011-07-07 14:22 ` [Cluster-devel] [PATCH 2/2] mkfs: Change hardcoded numbers by new macro definitions Carlos Maiolino
@ 2011-07-07 14:26 ` Steven Whitehouse
  1 sibling, 0 replies; 5+ messages in thread
From: Steven Whitehouse @ 2011-07-07 14:26 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Hi,

On Thu, 2011-07-07 at 11:21 -0300, Carlos Maiolino wrote:
> This patch add new macros related to
> default rgsizes which makes the purpose
> of the values easier to understand
> ---
>  gfs2/libgfs2/libgfs2.h |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h
> index be5bdfa..73431fa 100644
> --- a/gfs2/libgfs2/libgfs2.h
> +++ b/gfs2/libgfs2/libgfs2.h
> @@ -258,6 +258,11 @@ struct metapath {
>  #define GFS2_MIN_GROW_SIZE          (10)
>  #define GFS2_EXCESSIVE_RGS          (10000)
>  
> +#define GFS2_EXP_MIN_RGSIZE         (1)
> +#define GFS2_MIN_RGSIZE             (32)
> +/* 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)

Thats a bit easier to understand. Thanks for fixing it up. Looks good
now,

Steve.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-07-07 14:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-07 14:21 [Cluster-devel] [PATCH 1/2] libgfs2: Added new RGSIZE macros Carlos Maiolino
2011-07-07 14:22 ` [Cluster-devel] [PATCH 2/2] mkfs: Change hardcoded numbers by new macro definitions Carlos Maiolino
2011-07-07 14:26 ` [Cluster-devel] [PATCH 1/2] libgfs2: Added new RGSIZE macros Steven Whitehouse
  -- strict thread matches above, loose matches on Subject: below --
2011-07-07 13:49 Carlos Maiolino
2011-07-07 13:57 ` Steven Whitehouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).