cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Bob Peterson <rpeterso@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [GFS2 PATCH] GFS2: Eliminate redundant ip->i_rgd in favor of ip->i_res.rs_rgd
Date: Thu, 5 Jul 2018 09:15:39 -0400 (EDT)	[thread overview]
Message-ID: <1909295817.48133777.1530796539062.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <CAHc6FU6zoNu9D=F-ysjutGpGajdtAZ+Bca1k7qgDrw1TWz_izw@mail.gmail.com>

----- Original Message -----
> On 30 June 2017 at 18:40, Bob Peterson <rpeterso@redhat.com> wrote:
> > Hi,
> >
> > Before this patch, GFS2 remembered the last rgrp it used by way of
> > a variable i_rgd. However, block allocations are made by way of a
> > reservations structure, ip->i_res, which also has a rgrp pointers.
> > These two values are at best redundant, and at worse, confuse the
> > logic and make GFS2 maintain and use two possibly opposing values.
> > The proper solution is to only use a single value. Since new block
> > allocations should be kept close to the last reservation, it makes
> > sense to only use the value in the reservations structure.
> > Therefore, this patch removes i_rgd.
> >
> > Signed-off-by: Bob Peterson <rpeterso@redhat.com>
(snip)
> > --- a/fs/gfs2/super.c
> > +++ b/fs/gfs2/super.c
> > @@ -1660,7 +1660,6 @@ static struct inode *gfs2_alloc_inode(struct
> > super_block *sb)
> >         if (ip) {
> >                 ip->i_flags = 0;
> >                 ip->i_gl = NULL;
> > -               ip->i_rgd = NULL;
> 
> Oops, we want to initialize ip->i_res.rs_rbm.rgd here:
> +               ip->i_res.rs_rbm.rgd = NULL;
> 
> >                 memset(&ip->i_res, 0, sizeof(ip->i_res));

It shouldn't be necessary because of the memset below.

Bob Peterson



  reply	other threads:[~2018-07-05 13:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-30 16:40 [Cluster-devel] [GFS2 PATCH] GFS2: Eliminate redundant ip->i_rgd in favor of ip->i_res.rs_rgd Bob Peterson
2018-07-04 20:37 ` Andreas Gruenbacher
2018-07-05 13:15   ` Bob Peterson [this message]
2018-07-05 14:28     ` Andreas Gruenbacher

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=1909295817.48133777.1530796539062.JavaMail.zimbra@redhat.com \
    --to=rpeterso@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).