From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Whitehouse Date: Thu, 07 Jul 2011 14:55:22 +0100 Subject: [Cluster-devel] [PATCH 2/2] mkfs: Change hardcoded numbers by new macro definitions In-Reply-To: <1310046550-30496-2-git-send-email-cmaiolino@redhat.com> References: <1310046550-30496-1-git-send-email-cmaiolino@redhat.com> <1310046550-30496-2-git-send-email-cmaiolino@redhat.com> Message-ID: <1310046922.2730.11.camel@menhir> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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.