cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 2/2] mkfs: Change hardcoded numbers by new macro definitions
Date: Thu, 07 Jul 2011 14:55:22 +0100	[thread overview]
Message-ID: <1310046922.2730.11.camel@menhir> (raw)
In-Reply-To: <1310046550-30496-2-git-send-email-cmaiolino@redhat.com>

Hi,

On Thu, 2011-07-07 at 10:49 -0300, Carlos Maiolino wrote:
> 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..c417b29 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_DEFAULT_MIN_RGSIZE > sdp->rgsize || sdp->rgsize > GFS2_MAX_RGSIZE)
>  			die( _("bad resource group size\n"));
>  	}
>  

I'm not sure that "default min" makes sense. If 32 is the min, lets just
call it that otherwise it should just be the default size and not also
called the min size,

Steve.




  reply	other threads:[~2011-07-07 13:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-07 13:49 [Cluster-devel] [PATCH 1/2] libgfs2: Added new RGSIZE macros Carlos Maiolino
2011-07-07 13:49 ` [Cluster-devel] [PATCH 2/2] mkfs: Change hardcoded numbers by new macro definitions Carlos Maiolino
2011-07-07 13:55   ` Steven Whitehouse [this message]
2011-07-07 13:57 ` [Cluster-devel] [PATCH 1/2] libgfs2: Added new RGSIZE macros Steven Whitehouse
  -- strict thread matches above, loose matches on Subject: below --
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1310046922.2730.11.camel@menhir \
    --to=swhiteho@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).