public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Paul Menage <menage@google.com>
Cc: Wanlong Gao <gaowanlong@cn.fujitsu.com>,
	lizf@cn.fujitsu.com, axboe@kernel.dk,
	linux-kernel@vger.kernel.org, wanlong.gao@gmail.com
Subject: Re: [PATCH v3] blk-cgroup:be able to remove the record of unplugged device
Date: Tue, 26 Jul 2011 13:41:48 -0400	[thread overview]
Message-ID: <20110726174148.GC13780@redhat.com> (raw)
In-Reply-To: <CAJniumVm=oH_yJAgaTzwVu1XwJfn8eAsHw2Cm0tfvg=unA6hkA@mail.gmail.com>

On Tue, Jul 26, 2011 at 10:17:16AM -0700, Paul Menage wrote:
> On Tue, Jul 26, 2011 at 7:44 AM, Vivek Goyal <vgoyal@redhat.com> wrote:
> >>       char *s[4], *p, *major_s = NULL, *minor_s = NULL;
> >>       int ret;
> >> -     unsigned long major, minor, temp;
> >> +     unsigned long major, minor, weight;
> >
> > Do not replace temp with name weight. The place you are parsing it,
> > it could be weight, bps or iops. So lets keep the generic name in
> > place.
> 
> The variable currently called "temp" is only ever stored in
> newpn->val.weight. iops and bps already have their own local
> variables.

They have but the context where temp is being used to figure out if it
is a deletion rule is generic. So if a rule is being deleted (be it
weight, bps or iops), we are going to parse it early in the function.
So in that context not calling it "weight" makes sense to me.

We use bps, iops names only after knowing the value type.

Thanks
Vivek

  reply	other threads:[~2011-07-26 18:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-25  6:03 [PATCH] cgroup:be able to remove the record of unplugged device Wanlong Gao
2011-07-25 20:45 ` Paul Menage
2011-07-26  0:37 ` [PATCH v2] " Wanlong Gao
2011-07-26  1:29   ` Paul Menage
2011-07-26  1:56 ` [PATCH v3] blk-cgroup:be " Wanlong Gao
2011-07-26  2:23   ` Li Zefan
2011-07-26  3:00     ` [PATCH v4] " Wanlong Gao
2011-07-26 14:44   ` [PATCH v3] " Vivek Goyal
2011-07-26 14:59     ` Wanlong Gao
2011-07-26 17:17     ` Paul Menage
2011-07-26 17:41       ` Vivek Goyal [this message]
2011-07-26 18:40         ` Paul Menage
2011-07-26 19:24           ` Vivek Goyal
2011-07-27  0:11             ` [PATCH v5] " Wanlong Gao
2011-07-27 14:11               ` Vivek Goyal
2011-08-17 12:57                 ` Wanlong Gao
2011-08-17 14:18                   ` Vivek Goyal

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=20110726174148.GC13780@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=gaowanlong@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=menage@google.com \
    --cc=wanlong.gao@gmail.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